summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2021-06-13 00:14:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-26 15:24:08 +0100
commit60d51ca484e43f4ef38f313956e510c25dcd7dac (patch)
treecaea7132a96dbc9bed13ca967d28643f6031ad58 /meta
parentc9f0e842cd659207a8487d647b9e654d3f7ca87a (diff)
downloadpoky-60d51ca484e43f4ef38f313956e510c25dcd7dac.tar.gz
kernel.bbclass: fix do_sizecheck() comparison
The routine do_sizecheck() was historically needed by legacy devices with limited flash memory. The lowest extreme is probably with Zaurus collie having exactly 1024*1024 = 1048576 bytes for the kernel partition. In the years the KERNEL_IMAGE_MAXSIZE has been converted to kilobytes thus rounded so we have now KERNEL_IMAGE_MAXSIZE_collie = "1024". The effect is that now the check fails because we hit curiously this | WARNING: This kernel zImage (size=1024(K) > 1024(K)) is too big for... even though zImage is 1047288 bytes (kernel + kexecboot-klibc-initramfs). Fix this case using test -gt (greater) instead of -ge (greater or equal). (From OE-Core rev: 61feebd88960eb4e074a80a0e45b36a7a1db869c) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 254ca956d63b4ce6aa294213b60bb943f9f3a9e6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8693ab86be..379bed44f2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -714,7 +714,7 @@ do_sizecheck() {
714 at_least_one_fits= 714 at_least_one_fits=
715 for imageType in ${KERNEL_IMAGETYPES} ; do 715 for imageType in ${KERNEL_IMAGETYPES} ; do
716 size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'` 716 size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'`
717 if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then 717 if [ $size -gt ${KERNEL_IMAGE_MAXSIZE} ]; then
718 bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device." 718 bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device."
719 else 719 else
720 at_least_one_fits=y 720 at_least_one_fits=y