Even if initramfs_bundle_path was used, a wrong compression was reflected
in output its template file. Use linux.bin as universal kernel image.
The linux.bin file covers both cases.

Use linux.bin as a replacement for zImage in selftest. We know,
that zImage is a compressed one, so get the compression type.

Signed-off-by: Andrej Valek <[email protected]>
Signed-off-by: Walter Schweizer <[email protected]>
---
 meta/classes/kernel-fitimage.bbclass     | 17 +----------------
 meta/lib/oeqa/selftest/cases/fitimage.py |  8 +++-----
 2 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 886ed13029..8718ce7e16 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -495,22 +495,7 @@ fitimage_assemble() {
        fitimage_emit_section_maint $1 imagestart
 
        uboot_prep_kimage
-
-       if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
-               
initramfs_bundle_path="arch/"${UBOOT_ARCH}"/boot/"${KERNEL_IMAGETYPE_REPLACEMENT}".initramfs"
-               if [ -e "$initramfs_bundle_path" ]; then
-
-                       #
-                       # Include the kernel/rootfs bundle.
-                       #
-
-                       fitimage_emit_section_kernel $1 $kernelcount 
"$initramfs_bundle_path" "$linux_comp"
-               else
-                       bbwarn "$initramfs_bundle_pat not found."
-               fi
-       else
-               fitimage_emit_section_kernel $1 $kernelcount linux.bin 
"$linux_comp"
-       fi
+       fitimage_emit_section_kernel $1 $kernelcount linux.bin "$linux_comp"
 
        #
        # Step 2: Prepare a DTB image section
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index 184c8778d2..39c1cf9dd1 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -741,7 +741,6 @@ UBOOT_ARCH = "arm"
 UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
 UBOOT_EXTLINUX = "0"
 FIT_GENERATE_KEYS = "1"
-KERNEL_IMAGETYPE_REPLACEMENT = "zImage"
 FIT_HASH_ALG = "sha256"
 """
         self.write_config(config)
@@ -763,9 +762,8 @@ FIT_HASH_ALG = "sha256"
 
         kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
         kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
-        initramfs_bundle_format = 
str(get_bb_var('KERNEL_IMAGETYPE_REPLACEMENT'))
+        kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
         uboot_arch = str(get_bb_var('UBOOT_ARCH'))
-        initramfs_bundle = "arch/" + uboot_arch + "/boot/" + 
initramfs_bundle_format + ".initramfs"
         fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
 
         its_file = open(fitimage_its_path)
@@ -775,11 +773,11 @@ FIT_HASH_ALG = "sha256"
         exp_node_lines = [
             'kernel-1 {',
             'description = "Linux kernel";',
-            'data = /incbin/("' + initramfs_bundle + '");',
+            'data = /incbin/("linux.bin");',
             'type = "kernel";',
             'arch = "' + uboot_arch + '";',
             'os = "linux";',
-            'compression = "none";',
+            'compression = "' + kernel_compression + '";',
             'load = <' + kernel_load + '>;',
             'entry = <' + kernel_entry + '>;',
             'hash-1 {',
-- 
2.31.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156902): 
https://lists.openembedded.org/g/openembedded-core/message/156902
Mute This Topic: https://lists.openembedded.org/mt/86286120/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to