How to load initramfs on imx6ulevk(build by yocto)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to load initramfs on imx6ulevk(build by yocto)

1,864 Views
michaelwesley
Contributor I

Hi,

I made changes in the initramfs recipie located at /sources/poky/meta/recipes-core/initrdscripts/ to get initramfs.bin file in deploy folder, it has 14MB in size(kernel is 6M and ramdisk is 8M) but when i load this file, it gives an error as below,

Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

1) What did i missed here?

2) Does the initramfs image comes with .dtb file.

3) What are the bootargs & bootcmd commands to initiate initramfs?

Thanks in advance.

Labels (1)
0 Kudos
2 Replies

923 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Michael Wesley,

I’m sorry to hear you’re having problems with the initramfs file.

I see that you have participated on the following thread that handles this matter. There is some useful information there, but I understand that you are still having problems.

 https://community.nxp.com/message/451293

The initramfs does not have neither the kernel nor the device tree blob. U-boot reads the .dtb and starts the Kernel and then it should load the initramfs file.

There is also more information on how to boot a initramfs on the following thread. Please note that you need to enable the initramfs support for the kernel (as it may not enabled by default), I’m not sure if you have done this.

https://community.nxp.com/thread/301459

I hope this helps!

Regards,

0 Kudos

923 Views
georgechiao
Contributor II

Hi Michael,

Sorry I know it's been almost 6 months so a long shot for me.  Did you manage to figure out as I have similar issue.  I also manage to build my initramfs.bin but I come to the same error.

gusarambula's reply actually confuses me as I thought the generated 'initramfs.bin' should contain kernel as well, as it's the whole point for having 'initramfs' for me that I wanted to have a single file with everything in it (apart from u-boot and device tree). 

I thought 'u-boot', 'device tree' and 'initramfs.bin' are three separate par, and they are the only three parts that I need (please correct me otherwise).   One thing I think I might be wrong is that I might have a wrong u-boot image, which ended up reading kernel in wrong address and hence the error.

0 Kudos