mirror of
https://bitbucket.org/gwenhael/cubietruck-slackware.git
synced 2024-12-26 21:58:20 +01:00
refactoring
This commit is contained in:
parent
05f9b5a77e
commit
5b034360bf
1 changed files with 19 additions and 37 deletions
48
build.sh
48
build.sh
|
@ -340,32 +340,35 @@ 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/*
|
||||||
|
|
||||||
|
TARGET=/image/sdcard
|
||||||
if [ -x /sbin/makepkg ] && [ -x /sbin/installpkg ]; then
|
if [ -x /sbin/makepkg ] && [ -x /sbin/installpkg ]; then
|
||||||
mkdir -p $DEST/pkg-linux-sunxi/{boot,lib}/
|
mkdir -p $DEST/pkg-linux-sunxi/{boot,lib}/
|
||||||
|
TARGET=/pkg-linux-sunxi
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF > $DEST/pkg-linux-sunxi/boot/uEnv.txt
|
cat <<EOF > $DEST$TARGET/boot/uEnv.txt
|
||||||
root=/dev/mmcblk0p1 ro rootwait
|
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
|
||||||
|
|
||||||
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/pkg-linux-sunxi/boot/
|
echo "setup video output"
|
||||||
( cd $DEST/pkg-linux-sunxi/boot/
|
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST$TARGET/boot/
|
||||||
|
( cd $DEST$TARGET/boot/
|
||||||
|
rm script.bin
|
||||||
case $CUBIETRUCK_DISPLAY in
|
case $CUBIETRUCK_DISPLAY in
|
||||||
VGA) rm script.bin
|
VGA) ln script-vga.bin script.bin
|
||||||
ln script-vga.bin script.bin
|
|
||||||
break
|
|
||||||
;;
|
;;
|
||||||
HDMI) rm script.bin
|
HDMI) ln script-hdmi.bin script.bin
|
||||||
ln script-hdmi.bin script.bin
|
|
||||||
break
|
|
||||||
;;
|
;;
|
||||||
esac )
|
esac )
|
||||||
|
|
||||||
cp $BINARIES_DIR/linux-sunxi/uImage $DEST/pkg-linux-sunxi/boot/
|
echo "Installing kernel"
|
||||||
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST/pkg-linux-sunxi/lib/
|
cp $BINARIES_DIR/linux-sunxi/uImage $DEST$TARGET/boot/
|
||||||
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST/pkg-linux-sunxi/lib/
|
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST$TARGET/lib/
|
||||||
|
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST$TARGET/lib/
|
||||||
|
|
||||||
|
if [ -x /sbin/makepkg ] && [ -x /sbin/installpkg ]; then
|
||||||
mkdir -p $DEST/pkg-linux-sunxi/install/
|
mkdir -p $DEST/pkg-linux-sunxi/install/
|
||||||
PRGNAM=linux-sunxi
|
PRGNAM=linux-sunxi
|
||||||
cat <<EOF > $DEST/pkg-linux-sunxi/install/slack-desc
|
cat <<EOF > $DEST/pkg-linux-sunxi/install/slack-desc
|
||||||
|
@ -396,27 +399,6 @@ EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
installpkg --root $DEST/image/sdcard/ $DEST/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
installpkg --root $DEST/image/sdcard/ $DEST/$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
|
|
||||||
VGA) ln script-vga.bin script.bin
|
|
||||||
;;
|
|
||||||
HDMI) ln script-hdmi.bin script.bin
|
|
||||||
;;
|
|
||||||
esac )
|
|
||||||
|
|
||||||
echo "Installing kernel"
|
|
||||||
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/firmware/ $DEST/image/sdcard/lib/
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
Loading…
Reference in a new issue