From 63ec73ed1a4fd5c1a6b6b3cdeb805dc4e6dcfdfe Mon Sep 17 00:00:00 2001 From: ficus Date: Fri, 23 Nov 2012 19:48:20 +0100 Subject: document kernel copy scripts --- config/hooks/kernel-image.sh.binary | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'config/hooks/kernel-image.sh.binary') diff --git a/config/hooks/kernel-image.sh.binary b/config/hooks/kernel-image.sh.binary index 2b4d094..65ed75a 100755 --- a/config/hooks/kernel-image.sh.binary +++ b/config/hooks/kernel-image.sh.binary @@ -2,5 +2,20 @@ set -e +# This script is necessary for squashfs (or any not-plainroot) builds, where +# the usual /live images end up inside the filesystem. + +# In these cases the kernel ships in three places, which is inefficient: +# enclosing binary /live (mangled) +# rootfs /live (mangled) +# rootfs /boot (original) + echo "(re)Copying in kernel images..." cp -a chroot/live/uInitrd chroot/live/uImage chroot/live/dtb binary/live/ + +# This reduces final image size significantly; original raw kernel files are +# still duplicated in /boot. +# Don't stop on errors, because this script may have already been run. +echo "Removing redundant kernel images..." +rm binary/live/vmlinuz-* || true +rm binary/live/initrd.img-* || true -- cgit v1.2.3