To run a system without any ROM completely in RAM, on a efusa9x module, I tried the following steps, but failed to load the ROOTFS in the RAM from the LINUX kernel.
Following the steps here to configured a minimal system and started it from RAM:
https://imxdev.gitlab.io/tutor…o_boot_imx_using_ramdisk/
The used buildroot configuration for the filesystem is the following:
Code
- [ ] axfs root filesystem │ │
- │ │ [ ] btrfs root filesystem │ │
- │ │ [ ] cloop root filesystem for the target device │ │
- │ │ [ ] cpio the root filesystem (for use as an initial RAM filesystem) │ │
- │ │ [ ] cramfs root filesystem │ │
- │ │ [*] ext2/3/4 root filesystem │ │
- │ │ ext2/3/4 variant (ext2 (rev1)) ---> │ │
- │ │ () filesystem label │ │
- │ │ (40M) exact size │ │
- │ │ (0) exact number of inodes (leave at 0 for auto calculation) │ │
- │ │ (5) reserved blocks percentage │ │
- │ │ (-O ^64bit) additional mke2fs options │ │
- │ │ Compression method (gzip) ---> │ │
- │ │ [ ] f2fs root filesystem │ │
- │ │ [ ] initial RAM filesystem linked into linux kernel │ │
- │ │ [ ] jffs2 root filesystem │ │
- │ │ [ ] romfs root filesystem │ │
- │ │ [ ] squashfs root filesystem │ │
- │ │ [ ] tar the root filesystem │ │
- │ │ [ ] ubi image containing an ubifs root filesystem │ │
- │ │ [ ] ubifs root filesystem │ │
- │ │ [ ] yaffs2 root filesystem
And starting the system with the following UBOOT commands leads to the error under [1]:
Code
- # requirements
- # - bootfile set (kernel)
- setenv bootfile zImage
- # - bootfdt set (DTB)
- setenv bootfdt efusa9x.dtb
- tftpboot . ${bootfile}
- tftpboot ${fdtaddr} ${bootfdt}
- tftpboot 83000000 rootfs.ext2.gz.uboot
- setenv initrd_size ${filesize}
- setenv bootargs 'console=ttymxc0,115200 login_tty=ttymxc0,115200 root=/dev/ram rw'
- bootz 81000000 83000000 82000000
[1]:
Code
- …
- caam_jr 2101000.jr0: Instantiated RNG4 SH1.
- caam algorithms registered in /proc/crypto
- caam_jr 2101000.jr0: registering rng-caam
- caam-snvs 20cc000.caam-snvs: can't get snvs clock
- caam-snvs 20cc000.caam-snvs: violation handlers armed - non-secure state
- NET: Registered protocol family 26
- NET: Registered protocol family 17
- can: controller area network core (rev 20120528 abi 9)
- NET: Registered protocol family 29
- can: raw protocol (rev 20120528)
- can: broadcast manager protocol (rev 20161123 t)
- can: netlink gateway (rev 20130117) max_hops=1
- 8021q: 802.1Q VLAN Support v1.8
- Key type dns_resolver registered
- cpu cpu0: Registered imx6q-cpufreq
- imx_thermal 2000000.aips-bus:tempmon: Extended Commercial CPU temperature grade - max:105C critical:100CC
- rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
- rtc-pcf8563 0-0051: retrieved date/time is not valid.
- rtc-pcf8563 0-0051: hctosys: unable to read the hardware clock
- List of all partitions:
- 0100 8192 ram0 (driver?)
- 0101 8192 ram1 (driver?)
- 0102 8192 ram2 (driver?)
- 0103 8192 ram3 (driver?)
- 0104 8192 ram4 (driver?)
- 0105 8192 ram5 (driver?)
- 0106 8192 ram6 (driver?)
- 0107 8192 ram7 (driver?)
- 1f00 262144 mtdblock0 (driver?)
- No filesystem could mount root, tried: ext2
- Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
P.s.:
Additional I tried to define the ROOTFS by its address and size like mentioned here:
https://lists.denx.de/pipermail/u-boot/2009-June/054782.html
Code
- tftpboot . ${bootfile}
- tftpboot ${fdtaddr} ${bootfdt}
- tftpboot 83000000 rootfs.ext2.gz.uboot
- #setenv initrd_size ${filesize}
- #setenv bootargs 'console=ttymxc0,115200 login_tty=ttymxc0,115200 root=/dev/ram rw'
- setenv bootargs "console=ttymxc0,115200 login_tty=ttymxc0,115200 root=/dev/ram0 rd_start=83000000 rd_size=${filesize} rootfstype=ext2 rw"
- bootz 81000000 83000000 82000000
But this results in the same error as in [1].
How can I successfully let the kernel find the root filesystem?