[yocto] kernel.bbclass do_bundle_initramfs did not work

JH jupiter.hce at gmail.com
Mon Oct 7 02:57:57 PDT 2019


Hi Moritz,

On 10/4/19, Moritz Porst <moritz.porst at gmx.de> wrote:
> Hey JH,
>
> I had a similiar problem before. What branch and revision do you have
> checked out for your meta-layers ? Mine looks like the following and I
> get an initramfs built into my image:
>
> meta-yocto-bsp       = "warrior:01b8a8b54bc569e5ef3f5e6fc6abcee365ab25d9"
> meta-intel           = "warrior:6bd7b2edafe90e61a3a52cd089432080b82a7891"
> meta-qt5             = "warrior:2a5f9415e48a38f6f4eb0cf375737a2d8438e2fe"
> meta-mingw           = "warrior:10695afe8cd406844e0d0dd868c11677e07557d4"
> meta-initramfs       = "warrior:8d5dcd6522e9d15e68637b6d7dda0401f9bb91d0"

I am using thud, I guess the major problem is how to define the
variables correctly according to the the class. Correct me if I am
wrong, but I think the initramfs is implemented in kernel.bbclass, the
INITRAMFS_IMAGE and INITRAMFS_IMAGE_BUNDLE = "1" need be defined to
run copy_initramfs() and do_bundle_initramfs (). For some reason, both
functions were not called. Did you define INITRAMFS_IMAGE and
INITRAMFS_IMAGE_BUNDLE in local.conf to get it work?

> Further more what happens if you build only an initramfs ?
>
> bitbake core-image-minimal-initramfs

That was fine for building it on qemux86, but I could not build for imx6:

ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
core-image-minimal-initramfs was skipped: incompatible with host
arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)

I hacked to add arm-oe-linux-gnueabi to COMPATIBLE_HOST in
core-image-minimal-initramfs.bb, it still got the same error.

> Any error messages ? If not, how is your initramfs =called ? The issue
> *could* also be a misspelling in zImage-initramfs.

Did you refer the initramfs in core-image-minimal-initramfs qemux86 build?

core-image-minimal-initramfs-qemux86-20191004234320.rootfs.cpio.gz
core-image-minimal-initramfs-qemux86-20191004234320.qemuboot.conf
bzImage--4.18.27+git0+9e348b6f9d_62f0a3acff-r0-qemux86-20191004234320.bin
......

I guess that bzImage--4.18.27+git0+9e348b6f9d_62f0a3acff-r0-qemux86-20191004234320.bin
should be an initramfs zImage file. If I could build
core-image-minimal-initramfs for imx, I could verify it in my test
machine.

Still looking at it.

Thanks Moritz

>
> On 04.10.19 13:26, JH wrote:
>> Hi,
>>
>> It seems to me if both INITRAMFS_IMAGE and INITRAMFS_IMAGE_BUNDLE are
>> set it should generate initramfs, but I did not get. I set up in my
>> image:
>>
>> INITRAMFS_IMAGE = "zImage-initramfs"
>> INITRAMFS_IMAGE_BUNDLE = "1"
>>
>> But it did not build zImage-initramfs, what I could be missing here?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>


More information about the yocto mailing list