poky/meta/classes/kernel-uboot.bbclass
Bonnans, Laurent 646b596c99 kernel-uboot: compress arm64 kernels
AArch64 images are not self-decompressing, thus usually much larger.
Boot times can be reduced by compressing them in FIT and uImages.

(From OE-Core rev: a725d188b5d6b5d3c5cf21cc2f3070a0fe711e18)

Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-18 11:23:48 +01:00

31 lines
764 B
Plaintext

uboot_prep_kimage() {
if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
linux_suffix=""
linux_comp="none"
elif [ -e arch/${ARCH}/boot/Image ] ; then
vmlinux_path="vmlinux"
linux_suffix=".gz"
linux_comp="gzip"
elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then
rm -f linux.bin
cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin
vmlinux_path=""
linux_suffix=""
linux_comp="none"
else
vmlinux_path="vmlinux"
linux_suffix=".gz"
linux_comp="gzip"
fi
[ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
if [ "${linux_comp}" != "none" ] ; then
gzip -9 linux.bin
mv -f "linux.bin${linux_suffix}" linux.bin
fi
echo "${linux_comp}"
}