mirror of
https://bitbucket.org/gwenhael/cubietruck-slackware.git
synced 2024-12-26 21:58:20 +01:00
package kernel and boot ina real package + fix mounting / ro on boot
This commit is contained in:
parent
f1822eb672
commit
888e32ec45
3 changed files with 78 additions and 24 deletions
|
@ -25,11 +25,6 @@ Installation steps Slackware for Cubietruck
|
||||||
99. Enjoy Slackware :)
|
99. Enjoy Slackware :)
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
|
||||||
Peculiarities
|
|
||||||
---------------------------------------------------------
|
|
||||||
* / is mount read-write from the start and this disturbs /etc/rc.d/rc.S so there will be a warning message during boot. Just press Enter to continue booting
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
FAQ
|
FAQ
|
||||||
|
|
5
TODO.org
5
TODO.org
|
@ -1,12 +1,13 @@
|
||||||
# --- TODO
|
# --- TODO
|
||||||
|
|
||||||
* TODO [#A] in order of preference try kernel.org, linux-sinxi kernels to replace patwood
|
* TODO [#A] try kernel.org kernel
|
||||||
|
* TODO [#A] detail post-install instruction
|
||||||
* TODO [#A] add --clean
|
* TODO [#A] add --clean
|
||||||
* TODO [#B] build rootfs from slackwarearm-current
|
* TODO [#B] build rootfs from slackwarearm-current
|
||||||
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/scripts/
|
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/scripts/
|
||||||
* TODO [#B] compile out-of-tree
|
* TODO [#B] compile out-of-tree
|
||||||
* TODO [#B] switch userland to hard-float binaries
|
* TODO [#B] switch userland to hard-float binaries
|
||||||
* TODO [#B] package the kernel in a real slackware package
|
* DONE package the kernel in a real slackware package
|
||||||
* DONE offer pre-built binaries
|
* DONE offer pre-built binaries
|
||||||
* DONE configure by passing --parameters
|
* DONE configure by passing --parameters
|
||||||
* DONE UNTESTED allow for running on ARM host
|
* DONE UNTESTED allow for running on ARM host
|
||||||
|
|
80
build.sh
80
build.sh
|
@ -338,17 +338,74 @@ EOT
|
||||||
|
|
||||||
|
|
||||||
echo "remove the preconfigured boot and setup ours"
|
echo "remove the preconfigured boot and setup ours"
|
||||||
rm -rf $DEST/image/sdcard/boot/
|
rm -rf $DEST/image/sdcard/boot/*
|
||||||
mkdir -p $DEST/image/sdcard/boot/
|
|
||||||
cat <<EOF > $DEST/image/sdcard/boot/uEnv.txt
|
if [ -x /sbin/makepkg ] && [ -x /sbin/installpkg ]; then
|
||||||
root=/dev/mmcblk0p1
|
mkdir -p $DEST/pkg-linux-sunxi/{boot,lib}/
|
||||||
|
|
||||||
|
cat <<EOF > $DEST/pkg-linux-sunxi/boot/uEnv.txt
|
||||||
|
root=/dev/mmcblk0p1 ro rootwait
|
||||||
extraargs=console=tty0,115200 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait
|
extraargs=console=tty0,115200 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait
|
||||||
panic=10 rootfstype=ext4 rootflags=discard
|
panic=10 rootfstype=ext4 rootflags=discard
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "setup video output"
|
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/pkg-linux-sunxi/boot/
|
||||||
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/image/sdcard/boot/
|
( cd $DEST/pkg-linux-sunxi/boot/
|
||||||
( cd $DEST/image/sdcard/boot/
|
case $CUBIETRUCK_DISPLAY in
|
||||||
|
VGA) rm script.bin
|
||||||
|
ln script-vga.bin script.bin
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
HDMI) rm script.bin
|
||||||
|
ln script-hdmi.bin script.bin
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac )
|
||||||
|
|
||||||
|
cp $BINARIES_DIR/linux-sunxi/uImage $DEST/pkg-linux-sunxi/boot/
|
||||||
|
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST/pkg-linux-sunxi/lib/
|
||||||
|
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST/pkg-linux-sunxi/lib/
|
||||||
|
|
||||||
|
mkdir -p $DEST/pkg-linux-sunxi/install/
|
||||||
|
PRGNAM=linux-sunxi
|
||||||
|
cat <<EOF > $DEST/pkg-linux-sunxi/install/slack-desc
|
||||||
|
$PRGNAM: $PRGNAM (Linux sunxi kernel)
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM: Linux is a clone of the operating system Unix, written from scratch by
|
||||||
|
$PRGNAM: Linus Torvalds with assistance from a loosely-knit team of hackers
|
||||||
|
$PRGNAM: across the Net. It aims towards POSIX and Single UNIX Specification
|
||||||
|
$PRGNAM: compliance.
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM: It has all the features you would expect in a modern fully-fledged Unix
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM: http://github.com/linux-sunxi/linux-sunxi
|
||||||
|
$PRGNAM:
|
||||||
|
EOF
|
||||||
|
|
||||||
|
VERSION=$(cat $DEST/linux-sunxi/Makefile | grep "^VERSION" | sed "s|^VERSION = \(.*\)$|\1|g")
|
||||||
|
VERSION=$VERSION.$(cat $DEST/linux-sunxi/Makefile | grep "^PATCHLEVEL" | sed "s|^PATCHLEVEL = \(.*\)$|\1|g")
|
||||||
|
VERSION=$VERSION.$(cat $DEST/linux-sunxi/Makefile | grep "^SUBLEVEL" | sed "s|^SUBLEVEL = \(.*\)$|\1|g")
|
||||||
|
# VERSION=$VERSION.$(cat $DEST/linux-sunxi/Makefile | grep "^EXTRAVERSION" | sed "s|^EXTRAVERSION = \(.*\)$|\1|g")
|
||||||
|
ARCH=arm
|
||||||
|
BUILD=1
|
||||||
|
TAG=cyco
|
||||||
|
|
||||||
|
( cd $DEST/pkg-linux-sunxi
|
||||||
|
|
||||||
|
makepkg -l y -c n $DEST/image/sdcard/root/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||||
|
)
|
||||||
|
|
||||||
|
installpkg --root $DEST/image/sdcard/ $DEST/image/sdcard/root/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||||
|
else
|
||||||
|
cat <<EOF > $DEST/image/sdcard/boot/uEnv.txt
|
||||||
|
root=/dev/mmcblk0p1 ro rootwait
|
||||||
|
extraargs=console=tty0,115200 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait
|
||||||
|
panic=10 rootfstype=ext4 rootflags=discard
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "setup video output"
|
||||||
|
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/image/sdcard/boot/
|
||||||
|
( cd $DEST/image/sdcard/boot/
|
||||||
case $CUBIETRUCK_DISPLAY in
|
case $CUBIETRUCK_DISPLAY in
|
||||||
VGA) ln script-vga.bin script.bin
|
VGA) ln script-vga.bin script.bin
|
||||||
;;
|
;;
|
||||||
|
@ -356,10 +413,11 @@ cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/image/sdcard/boot/
|
||||||
;;
|
;;
|
||||||
esac )
|
esac )
|
||||||
|
|
||||||
echo "Installing kernel"
|
echo "Installing kernel"
|
||||||
cp $BINARIES_DIR/linux-sunxi/uImage $DEST/image/sdcard/boot/
|
cp $BINARIES_DIR/linux-sunxi/uImage $DEST/image/sdcard/boot/
|
||||||
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST/image/sdcard/lib/
|
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST/image/sdcard/lib/
|
||||||
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST/image/sdcard/lib/
|
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST/image/sdcard/lib/
|
||||||
|
fi
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue