Hi @Bob_NXP_user
We are working with a custom i.MX8M Plus DDR4 board that includes 32 MB QSPI NOR flash.
Our objective is to boot U-Boot, Linux kernel, device tree, and initramfs (rootfs.img) entirely from QSPI flash, without using SD/eMMC.
We are able to successfully boot up to U-Boot (flash.bin) from QSPI flash.
-----Flash Layout and Image Sizes----------------
QSPI flash size: 32 MB
flash.bin (U-Boot + SPL) ~2.4 MB
Image.gz (Kernel) ~15 MB
imx8mp-evk.dtb ~85 KB
rootfs.img ~12.6 MB
----QSPI Offset Layout----------
flash.bin @ 0x00000000
Image.gz @ 0x0024D000
imx8mp-evk.dtb @ 0x010A6B00
rootfs.img @ 0x010BB800
U-Boot Environment Setup
After booting into U-Boot from QSPI, we configure the following environment variables to load the kernel, device tree, and initramfs from flash:
sf probe 0
setenv loadaddr 0x40480000 // kernel
setenv fdt_addr 0x43000000 //dtb
setenv initrd_addr 0x43800000 //rootfs (minimal initramfs)
setenv kernel_comp_addr_r 0x50000000
setenv kernel_comp_size 0x04000000
Reading Images from QSPI Flash
sf read ${loadaddr} 0x0024D000 0x00E59A6F
sf read ${fdt_addr} 0x010A6B00 0x00014BBA
sf read ${initrd_addr} 0x010BB800 0x00C04DB0
Boot Command
setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} rdinit=/dev
booti ${loadaddr} ${initrd_addr} ${fdt_addr}
Issue Observed
When using the following boot arguments:
setenv bootargs setenv bootargs "console=ttymxc1,115200 earlycon root=/dev/ram0 rw rdinit=/sbin/init loglevel=8"
Attached the kernel DTS and kernel defconfig for reference.
Kindly let us know if any modifications are required.
Also getting same error like you Unable to handle kernel paging request at virtual address. can you please give any suggistions to resolve it and successful kernel boot.
Questions:
1. Are there any recommended changes required in the kernel DTS for booting initramfs entirely from QSPI on a custom i.MX8M Plus DDR4 board?
2. Are there any additional boot arguments recommended by NXP for initramfs-based boot on i.MX8MP from QSPI flash?
3. What could be the possible reason for the kernel not booting correctly?
We followed the same procedure that works successfully on the i.MX8MP LPDDR4 EVK, where the kernel and root filesystem boot properly from QSPI flash.
The only differences in our setup are the flash.bin and device tree, which were modified according to the DDR configuration of our custom board.
thank you.