Optimise tinyipa boot time

This patch reduces tinyipa boot time significantly by preinstalling all
required system packages at build time instead of the traditional
tinycorelinux method of loading them at runtime, cutting many seconds
of unpacking squashfs files out of the boot procedure.

Change-Id: If10cb64ea6b64972df0cdbd1056d84f136fec94a
This commit is contained in:
Sam Betts
2016-05-04 19:04:36 +01:00
parent 062c6bfd31
commit 046994a04f

View File

@@ -4,7 +4,7 @@ set -ex
WORKDIR=$(readlink -f $0 | xargs dirname) WORKDIR=$(readlink -f $0 | xargs dirname)
BUILDDIR="$WORKDIR/tinyipabuild" BUILDDIR="$WORKDIR/tinyipabuild"
FINALDIR="$WORKDIR/tinyipafinal" FINALDIR="$WORKDIR/tinyipafinal"
BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-false} BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-true}
TC=1001 TC=1001
STAFF=50 STAFF=50
@@ -61,11 +61,11 @@ mkdir $FINALDIR/tmp/overides
cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overides/uname cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overides/uname
while read line; do while read line; do
$TC_CHROOT_CMD tce-load -wi $line $TC_CHROOT_CMD tce-load -wic $line
done < $WORKDIR/build_files/finalreqs.lst done < $WORKDIR/build_files/finalreqs.lst
echo "tgt.tcz" | $TC_CHROOT_CMD tee -a /tmp/builtin/onboot.lst $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/tgt.tcz
echo "qemu-utils.tcz" | $TC_CHROOT_CMD tee -a /tmp/builtin/onboot.lst $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/qemu-utils.tcz
# If flag is set install the python now # If flag is set install the python now
if $BUILD_AND_INSTALL_TINYIPA ; then if $BUILD_AND_INSTALL_TINYIPA ; then
@@ -75,7 +75,7 @@ fi
# Unmount /proc and clean up everything # Unmount /proc and clean up everything
sudo umount $FINALDIR/proc sudo umount $FINALDIR/proc
sudo umount $FINALDIR/tmp/tcloop/* sudo rm -rf $FINALDIR/tmp/builtin
sudo rm -rf $FINALDIR/tmp/tcloop sudo rm -rf $FINALDIR/tmp/tcloop
sudo rm -rf $FINALDIR/usr/local/tce.installed sudo rm -rf $FINALDIR/usr/local/tce.installed
sudo mv $FINALDIR/etc/resolv.conf.old $FINALDIR/etc/resolv.conf sudo mv $FINALDIR/etc/resolv.conf.old $FINALDIR/etc/resolv.conf