All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel-uimage: build per-architecture target image
@ 2016-04-07  7:40 Ruslan Bilovol
  2016-04-07 10:56 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Ruslan Bilovol @ 2016-04-07  7:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: marex, xe-linux-external

Commit e69525: "kernel: Build uImage only when really
needed" hardcoded target kernel image to zImage for
case if uImage is generated by OpenEmbedded buildsystem.

However not all kernel architectures support zImage
target, for example AArch64 doesn't, so building of
kernel is failing on this step. Moreover, possible
target images may vary depending on arch.

So instead of hardcoding it to zImage, let it be
architecture-dependent. Currently added for and
verified with AArch64.

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
---
 meta/classes/kernel-uimage.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index f73965b..a6a5912 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -1,6 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
+    import re
+
     kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
     if kerneltype == 'uImage':
         depends = d.getVar("DEPENDS", True)
@@ -13,7 +15,12 @@ python __anonymous () {
 	# KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into
 	# the uImage .
 	if d.getVar("KEEPUIMAGE", True) != 'yes':
-            d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+            kernelarch = d.getVar('ARCH', True)
+
+            if re.match('arm64', kernelarch): target_image = 'Image'
+            else: target_image = 'zImage'
+
+            d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", target_image)
 }
 
 do_uboot_mkimage() {
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-12 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07  7:40 [PATCH] kernel-uimage: build per-architecture target image Ruslan Bilovol
2016-04-07 10:56 ` Marek Vasut
2016-04-12 13:07   ` Ruslan Bilovol

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.