I’m trying to do a proof of concept with the colibri iMX7d to replace a fleet of ~500 raspberry Pi’s used in an automation environment.
We must run a rootfs from NFS but do not want to TFTP load the kernel/DT at each boot.
I’ve been trying to setup U-boot to do this but I keep hanging at Starting Kernel…
Essentially, I am using the ubiboot action and replacing the bootargs passed to the kernel so it loads the rootfs from NFS in lieu of the flash. I suspect that being new to u boot I am missing something simple, but need some other eyes to tell me what it is.
I’ve attached the full u-boot env, here, but in a nutshell here are the interesting ones:
nfs_bakery=root=/dev/nfs rootfstype=nfs ip=dhcp
nfsroot=17.222.232.115:/Volumes/Oven/trdx/rootfs,udp,vers=3
setup=setenv setupargs console=tty1 console=${console},${baudrate}n8 ${memargs} consoleblank=0 ${mtdparts}
bakeryboot=run setup; setenv bootargs ${defargs} ${nfs_bakery} ${setupargs}; echo Booting Production; ubi part ubi && run m4boot && ubi read ${kernel_addr_r} kernel && ubi read ${fdt_addr_r} dtb && run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_t}
When I execute run bakeryboot the response is this:
Colibri iMX7 # run bakeryboot
Booting Production
UBI: detaching mtd1 from ubi0
UBI: mtd1 is detached from ubi0
UBI: default fastmap pool size: 200
UBI: default fastmap WL pool size: 25
UBI: attaching mtd1 to ubi0
UBI: attached by fastmap
UBI: fastmap pool size: 200
UBI: fastmap WL pool size: 100
UBI: attached mtd1 (name "mtd=3", size 507 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 4056, bad PEBs: 4, corrupted PEBs: 0
UBI: user volume: 4, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 0, total reserved PEBs: 4056, PEBs reserved for bad PEB handling: 76
Read 0 bytes from volume kernel to 81000000
No size specified -> Using max size (5113928)
Read 0 bytes from volume dtb to 82000000
No size specified -> Using max size (40257)
Kernel image @ 0x81000000 [ 0x000000 - 0x4e0848 ]
Starting kernel ...
And hangs. I know the nfs server is up and running, and it looks like the kernel and device tree are loaded. I don’t understand why the reads say 0 bytes, but they say the same thing during a successful boot from flash
It doesn’t seem like this should be this hard which is why I suspect I’m missing something simple.
Anyone see anything obvious or have debugging hints to find out what is going on?