LS1024A: Booting rootfs RAMdisk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LS1024A: Booting rootfs RAMdisk

2,924 次查看
agnesamreetha
Contributor I

Hi,

I am using LS1024ARDB board, in which I am trying to load the RAMdisk root file system during booting,

and facing issue,

Steps followed:

     1.   In make -> menuconfig command, TargetImages -> Generate comcerto ramdisk image

             In include->kernel-defaults.mk file changing the values as CONFIG_BLK_DEV_RAM_SIZE=26624

              and compiled kernel image & RAM disk image.  (openwrt-comcerto2000-gpp-uImage.img &  openwrt-comcerto2000-gpp-ramdisk.cpio.gz)

      2.  In Barebox bootloader prompt,

        environment values are changed as,

        kernel_loc=tftp

        rootfs_loc=initrd

        bootargs="$bootargs root=/dev/ram0 rootfstype=ramfs rdinit=/linuxrc"

        bootargs="${bootargs} mtdparts=comcertoflash.0:128k(uloader)ro,512k(barebox)ro,128k(env),4M(kernel),48M(rootfs)"

      3.   The below commands are executed

        addpart /dev/ram0 8M@32M(kernel); tftp openwrt-comcerto2000-gpp-uImage.img /dev/ram0.kernel       //kernel image

        addpart /dev/ram0 48M@40M(rootfs);tftp openwrt-comcerto2000-gpp-ramdisk.cpio.gz /dev/ram0.rootfs //rootfs image

        bootm /dev/ram0.kernel /dev/ram0.rootfs

Error Faced:

        6.437055] VFS: Mounted root (ramfs filesystem) on device 0:13.

        [    6.443263] Freeing init memory: 188K

        [    6.446956] Failed to execute /etc/preinit.  Attempting defaults...

        [    6.453270] Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

Can any one guide in this to boot the ramdisk rootfs in LS1024RDB?

标签 (1)
0 项奖励
回复
2 回复数

1,801 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Agnes Amreetha,

Would you please provide console log of your operation? Or provide the whole Kernel boot up log?

Actually I didn't understand why you ran ramdisk boot with this way.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

34 次查看
Sunil_13
Contributor I

Hi @yipingwang 

Currently  working on  i.MX8M Plus EVK board and would like to boot file system using initramfs (ramfs.img / ramfs.cpio.gz) as the root filesystem, loaded directly from an SD card with boot partition only(FAT32). 

The SD card does not contain a separate root filesystem partition.

Current Setup

  • SD card contains only one FAT32 boot partition

  • Files present on the FAT32 partition:

    • Image(U-boot+kernel)

    • Device Tree Blob (.dtb)

    • initramfs image

Below are the exact U-Boot commands and behavior.

U-Boot Commands Used

u-boot=> setenv bootargs console=ttymxc1,115200 root=/dev/ram rw
u-boot=> fatload mmc 1:1 ${loadaddr} Image_copy.gz 13450466 bytes read in 282 ms (45.5 MiB/s)
u-boot=> fatload mmc 1:1 ${fdt_addr} imx8mp-evk.dtb 82784 bytes read in 4 ms (19.7 MiB/s)
u-boot=> fatload mmc 1:1 ${ramdisk_addr_r} core-image-minimal-initramfs-imx8mp-ddr4-evk.cpio.gz 12602736 bytes read in 264 ms (45.5 MiB/s)
u-boot=> booti ${loadaddr} ${ramdisk_addr_r}:${filesize} ${fdt_addr}
 

After executing the booti command, the kernel starts booting, but it does not mount or use the initramfs (cpio.gz) as root filesystem.

I have attached the full kernel boot log for reference.

Questions

  1. What could be the possible reasons for the kernel not loading the initramfs (cpio.gz) even though it is correctly loaded into memory by U-Boot?

  2. Are there any mandatory kernel configuration options required for initramfs support that I should verify?

  3. Is the bootargs configuration correct for booting with initramfs on i.MX8M Plus, or are additional parameters required?

 

0 项奖励
回复