Howto initramfs with yocto on efusA7ULL

  • Hello all


    I would like to know if there are any instruction or howto for setup a initramfs on efusA7ULL module using yocto.


    - How to generate a initramfs with my applications and configurations in yocto.

    - How to save the initramfs on efus board.

    - How to configure F&S U-Boot to boot with initramfs


    Thanks in advanced

  • Hello,


    unfortunately we have no instructions for initramfs on efusA7ULL, but there are already some recipes in Yocto, which you could use as a template.


    Ecspecially the recipe meta-freescale/classes/mfgtool-initramfs-image.bbclass´


    You can try to to add the initramfs configuration e.g to the fus-image-std recipe i guess it would be something like this:


    IMAGE_FSTYPES += "cpio.gz.u-boot"

    IMAGE_FSTYPES_mxs += "cpio.gz.u-boot"

    IMAGE_ROOTFS_SIZE ?= "8192"


    As the efua7ull does not have that much DRAM you may have to reduce the image size.


    Then a rootfs with the extension .cpio.gz.u-boot should be built.


    Unfortunately, the config for initramfs is not activated by default in the kernel of the fsimx6ul-Y2020.03 release so you will have to build a new kernel with


    CONFIG_BLK_DEV_INITRD=y



    Copy kernel and rootfs to the board via tftp or usb stick.


    You will have to edit the rootfs environment variable to load the rootfs from ram


    setenv rootfs 'root=/dev/ram0 '


    Also, you will have to edit the bootm command to boot the initramfs . It is executed in the fdt variable


    setenv fdt 'nand read 82000000 FDT; bootm 81000000 83000000 82000000'


    81000000 is the location of the kernel 83000000 is the location if the initramfs and 82000000 is the location of the DTS.


    Make sure to copy the initramfs to 83000000.



    Now running the boot command should give you something like this






    I have only made some quick tests, so I cannot guarantee that it will work out of the box, but it should help to get you started.


    Your F&S Support Team