kernel-fitimage: use correct kernel image

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 because it's beying created from
vmlinux.

We know, that vmlinux is created inside compressed directory already,
so no external compression will be used.

(From OE-Core rev: 27fbbeaf972bb7e2535c1b23375cfa9d66b69db6)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andrej Valek
2021-10-16 22:01:47 +02:00
committed by Richard Purdie
parent 2b5f5e295e
commit ea92f2ee91
2 changed files with 5 additions and 20 deletions

View File

@@ -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

View File

@@ -742,6 +742,7 @@ UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
UBOOT_EXTLINUX = "0"
FIT_GENERATE_KEYS = "1"
KERNEL_IMAGETYPE_REPLACEMENT = "zImage"
FIT_KERNEL_COMP_ALG = "none"
FIT_HASH_ALG = "sha256"
"""
self.write_config(config)
@@ -763,9 +764,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 +775,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 {',