diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2021-06-13 00:14:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-06-19 16:59:29 +0100 |
commit | f8c304e07a82921c3f6b7bc482b17cb46d004dc5 (patch) | |
tree | 410a8fb8fd1fd6b918e31d6ea0a034d022db2954 /meta | |
parent | 643cb4f63958db606dff95f7050870d5bf5ee172 (diff) | |
download | poky-f8c304e07a82921c3f6b7bc482b17cb46d004dc5.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: f5fc716d744745d5c2ea83f0b1d63907cfe04c06)
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: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 518aaef724..85c6594c27 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -680,7 +680,7 @@ do_sizecheck() { | |||
680 | at_least_one_fits= | 680 | at_least_one_fits= |
681 | for imageType in ${KERNEL_IMAGETYPES} ; do | 681 | for imageType in ${KERNEL_IMAGETYPES} ; do |
682 | size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'` | 682 | size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'` |
683 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then | 683 | if [ $size -gt ${KERNEL_IMAGE_MAXSIZE} ]; then |
684 | bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device." | 684 | bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device." |
685 | else | 685 | else |
686 | at_least_one_fits=y | 686 | at_least_one_fits=y |