From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [hardknott][PATCH 13/13] kernel.bbclass: fix do_sizecheck() comparison
Date: Tue, 22 Jun 2021 17:50:32 +0800 [thread overview]
Message-ID: <61feebd88960eb4e074a80a0e45b36a7a1db869c.1624352878.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1624352878.git.anuj.mittal@intel.com>
From: Andrea Adami <andrea.adami@gmail.com>
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).
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>
---
meta/classes/kernel.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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() {
at_least_one_fits=
for imageType in ${KERNEL_IMAGETYPES} ; do
size=`du -ks ${B}/${KERNEL_OUTPUT_DIR}/$imageType | awk '{print $1}'`
- if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
+ if [ $size -gt ${KERNEL_IMAGE_MAXSIZE} ]; then
bbwarn "This kernel $imageType (size=$size(K) > ${KERNEL_IMAGE_MAXSIZE}(K)) is too big for your device."
else
at_least_one_fits=y
--
2.31.1
next prev parent reply other threads:[~2021-06-22 9:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 9:50 [hardknott][PATCH 00/13] review request Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 01/13] curl: cleanup CVE patches for hardknott Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 02/13] libx11: fix CVE-2021-31535 Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 03/13] util-linux.inc: Do not modify BPN Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 04/13] native.bbclass: Do not remove "-native" in the middle of recipe names Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 05/13] linux-yocto/5.4: update to v5.4.124 Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 06/13] lttng-tools: upgrade 2.12.3 -> 2.12.4 Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 07/13] linux-yocto/5.4: update to v5.4.125 Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 08/13] linuxloader: Be aware of riscv32 ldso Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 09/13] valgrind: remove buggy ptest from arm64 Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 10/13] valgrind: Actually install list of non-deterministic ptests Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 11/13] perf: Use python3targetconfig to ensure we use target libraries Anuj Mittal
2021-06-22 9:50 ` [hardknott][PATCH 12/13] avahi: apply fix for CVE-2021-3468 Anuj Mittal
2021-06-22 9:50 ` Anuj Mittal [this message]
2021-06-26 14:29 ` [OE-core] [hardknott][PATCH 00/13] review request Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61feebd88960eb4e074a80a0e45b36a7a1db869c.1624352878.git.anuj.mittal@intel.com \
--to=anuj.mittal@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.