I boot from SD, It’s boot ok, and I see
But When I use boot from Nvme, kernel name key in “bpi-r4.itb”, I can’t boot and display “Can’t set block device”
How to boot from Nvme? What files or images need put Nvme partition 1?
I boot from SD, It’s boot ok, and I see
But When I use boot from Nvme, kernel name key in “bpi-r4.itb”, I can’t boot and display “Can’t set block device”
How to boot from Nvme? What files or images need put Nvme partition 1?
I success to boot from Nvme.
The installation steps as follows:
Flush frank-w u-boot to NAND or SD.
After flush, we can see this screen:
Use normal frank-w BPI-R4 Debian boot
Fdisk Nvme
For Nvme boot requirements,
First Partition must FAT32
Second Partition must ext4
Use fdisk maybe better.
Put frank-w BPI-R4 Debian to Nvme
BPI-BOOT/ => nvme0n1p1/
Debian rootfs => nvme0n1p2/
umount & reboot to u-boot menu
Boot from Nvme
kernel name: bpi-r4.itb
That’s finish, we use Nvme to boot.
How to debug u-boot boot?
u-boot menu and boot scripts are defined in printenv.
Boot to u-boot menu and Select Exit to u-boot cmd
printenv
Nvme boot script
run askbootnvme
askbootnvme=run usenvme; if test “$device” = “nvme”; then run askkernel;if printenv kernelinput; then setenv fit $kernelinput;run newboot;fi;fi
run usenvme
run askkernel
setenv fit $kernelinput (here is bpi-r4.itb)
run newboot
newboot=run checkrd; run setbootconf; run buildargs;if printenv fit;then setenv kernel ${fit};if run loadkernel; then bootm ${kaddr}${bootconf}; fi;fi;
loadkernel=fatload $device $partition $kaddr ${kernel}
Error message “Can’t set block device” occurred at stage “loadkernel”.
fatload $device $partition $kaddr ${kernel}
So, we fdisk Nvme first partition as FAT32 and boot ok.
You can overwrite the defaults when booting from mmc using a uEnv.txt.
Or change builtin env when compile your own
See ci pipeline for compile steps
Of course you can patch out the askkernel to boot fixed file automaticly.