Skip to contentSkip to conversation

Use zImage instead of linux.bin in fitImage

DISCUSSION [email protected] 2 participants 2 messages Jan 25, 2023 – Jan 27, 2023

lore
Share & tools
lore
#0 lore raw

I'm trying to build a fit image for an ARM target and am struggling to configure kernel-fitimage in such a way that it includes zImage as the fitImage kernel instead of linux.bin.  zImage is significantly smaller than linux.bin and can be used on my system without needing to modify u-boot's CONFIG_SYS_BOOTM_LEN due to the large kernel size.

I've tried several permutations of the following settings in my machine.conf file without success:
KERNEL_CLASSES += "kernel-fitimage"
KERNEL_IMAGETYPE = "fitImage"
KERNEL_IMAGETYPES += "zImage"
KERNEL_IMAGETYPE_REPLACEMENT = "zImage"

I've also tried patterning my config on oe-core/meta/lib/oeqa/selftest/cases/fitimage.py which uses several combinations of the settings above.  In every case, linux.bin is the kernel included in the resulting fitImage.  Is there some combination of settings that will enable zImage in my fit image?

Thanks,
Dave

#1 lore raw

Hi Dave,

Quoted 10 lines · dowens via lists.openembedded.org

I'm trying to build a fit image for an ARM target and am struggling to configure kernel-fitimage in such a way that it includes zImage as the fitImage kernel instead of linux.bin.  zImage is significantly smaller than linux.bin and can be used on my system without needing to modify u-boot's CONFIG_SYS_BOOTM_LEN due to the large kernel size.

I've tried several permutations of the following settings in my machine.conf file without success:
KERNEL_CLASSES += "kernel-fitimage"
KERNEL_IMAGETYPE = "fitImage"
KERNEL_IMAGETYPES += "zImage"
KERNEL_IMAGETYPE_REPLACEMENT = "zImage"

I've also tried patterning my config on oe-core/meta/lib/oeqa/selftest/cases/fitimage.py which uses several combinations of the settings above.  In every case, linux.bin is the kernel included in the resulting fitImage.  Is there some combination of settings that will enable zImage in my fit image?

I believe the issue is this line here:
https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/kernel-fitimage.bbclass#n572

I would naively suggest to replace linux.bin with ${KERNEL_IMAGETYPE_REPLACEMENT} and see where this leads you?

Cheers,
Quentin