refactoring

This commit is contained in:
Gwenhael Le Moine 2014-03-01 09:45:41 +01:00
parent 05f9b5a77e
commit 5b034360bf

View file

@ -340,32 +340,35 @@ EOT
echo "remove the preconfigured boot and setup ours"
rm -rf $DEST/image/sdcard/boot/*
TARGET=/image/sdcard
if [ -x /sbin/makepkg ] && [ -x /sbin/installpkg ]; then
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
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
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST/pkg-linux-sunxi/boot/
( cd $DEST/pkg-linux-sunxi/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 )
echo "setup video output"
cp $BINARIES_DIR/cubie_configs/script-*.bin $DEST$TARGET/boot/
( cd $DEST$TARGET/boot/
rm script.bin
case $CUBIETRUCK_DISPLAY in
VGA) ln script-vga.bin script.bin
;;
HDMI) ln script-hdmi.bin script.bin
;;
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/
echo "Installing kernel"
cp $BINARIES_DIR/linux-sunxi/uImage $DEST$TARGET/boot/
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/
PRGNAM=linux-sunxi
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
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
sync