Is it possible to make NVME as boot instead of sdcard or NAND or EMMC?

Hello Is it possible to burn the image on nvme and make it the default boot instead using sdcard or EMMC ? If yes how to do that ?

Thank you

No you cannot directly boot from nvme…it is only possible booting from api or mmc and acessing nvme from uboot stage to load kernel and userspace from nvme

The problem is I have file .img I did following commands from NAND to EMMC

echo 0 > /sys/block/mmcblk0boot0/force_ro

dd if=file.img of=/dev/mmcblk0
 mmc bootpart enable 1 1 /dev/mmcblk0
sync

But after reboot and change to EMMC bootstrap, it not wrote and system halt

I do not see that you write bl2 to boot0 partition

Because debian11, Does bl2 for openwrt only or even for debian11 ?

how to change uboot TFTP server IP address to locate the debian11 .img to install it directly to EMMC ?

For my images (debian bookworm,ubuntu jammy/noble) from gdrive (automatic images) you can get uboot/atf files from my uboot github repo in releases

Not sure if they are compatible to bpi images,but you can try. Openwrt uses fip in ubi,i still use fixed offset

My uboot supports usb and nvme :slight_smile: and you could override serverip environment variable (and if net differs ipaddr/netmask).but full image could be bit large for using tftp.

What I’ve done is baked a u-boot image with the following default command into my NAND:

bootcmd=pci enum; nvme scan; nvme info; if fatload nvme 0:1 $loadaddr boot.scr; then source $loadaddr; fi

That way I can just have a u-boot script on a small fat (could even be ext4 or something, u-boot can read that) partition, and can update the kernel without needing to ever touch the NAND.

What I’d still like to add is a way to detect if this is a cold boot or a reboot. To load a different kernel on each, to have a fallback if a new kernel does not come up after a reboot.

There was another thread for this topic. I’d really like to find some people to work on this together.

I’d like to take U-Boot source and make some modifications so we have a build that creates a NAND image that we can put on the R4 and it will just work.

Would you be interested?

Could even make it so that we have a failsafe in the NAND with double firmware. Like a micro loader and then either load ubootA or ubootB.

And inside U-Boot we have USB boot, NVME boot and the usual SD and MMC boot. Or network. And the web failsafe from the mediatek u-boot fork. That would be absolutely awesome. Because with the web failsafe, you don’t even need a serial console.

It is very good idea I would help you but I don’t have experience with uboot and hardware upgrades, I am new with this side

But please let me know if any progress happens because I am interested such like this idea