[OE-core] [meta][PATCH 1/2] Fix some issues in the fitImage generation

Thomas Perrot thomas.perrot at tupi.fr
Wed Oct 25 07:32:47 UTC 2017


- Bad image type replacement for aarch64
- Fix DTB path in fitimage.its
- Ignore fitImage type in do_bundle_initramfs task because the packaging is made by do_assemble_fitimage_initramfs
- the images for arm64 are not compressed the linux_comp variable must therefore be none

Signed-off-by: Thomas Perrot <thomas.perrot at tupi.fr>
---
 meta/classes/kernel-fitimage.bbclass |  7 +++++--
 meta/classes/kernel-uboot.bbclass    | 11 ++++++++---
 meta/classes/kernel.bbclass          |  4 +++-
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 179185b6b2..0789ba611f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -7,10 +7,13 @@ python __anonymous () {
         depends = "%s u-boot-mkimage-native dtc-native" % depends
         d.setVar("DEPENDS", depends)
 
-        if d.getVar("UBOOT_ARCH") == "mips":
+        uarch = d.getVar("UBOOT_ARCH")
+        if uarch == "mips":
             replacementtype = "vmlinuz.bin"
-        elif d.getVar("UBOOT_ARCH") == "x86":
+        elif uarch == "x86":
             replacementtype = "bzImage"
+        elif uarch == "arm64":
+            replacementtype = "Image"
         else:
             replacementtype = "zImage"
 
diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
index 87f02654fa..06d293039a 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -1,5 +1,5 @@
 uboot_prep_kimage() {
-	if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
+	if [ -e arch/${ARCH}/boot/compressed/vmlinux ] ; then
 		vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
 		linux_suffix=""
 		linux_comp="none"
@@ -11,8 +11,13 @@ uboot_prep_kimage() {
 		linux_comp="none"
 	else
 		vmlinux_path="vmlinux"
-		linux_suffix=".gz"
-		linux_comp="gzip"
+		if [ "${ARCH}" = "arm64" ] ; then
+			linux_suffix=""
+			linux_comp="none"
+		else
+			linux_suffix=".gz"
+			linux_comp="gzip"
+		fi
 	fi
 
 	[ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 756707a3c2..7f8c8985f3 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -208,7 +208,9 @@ do_bundle_initramfs () {
 		# Backing up kernel image relies on its type(regular file or symbolic link)
 		tmp_path=""
 		for type in ${KERNEL_IMAGETYPES} ; do
-			if [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then
+			if [ "$type" = "fitImage" ] ; then
+				continue
+			elif [ -h ${KERNEL_OUTPUT_DIR}/$type ] ; then
 				linkpath=`readlink -n ${KERNEL_OUTPUT_DIR}/$type`
 				realpath=`readlink -fn ${KERNEL_OUTPUT_DIR}/$type`
 				mv -f $realpath $realpath.bak
-- 
2.13.6




More information about the Openembedded-core mailing list