OpenWrt - Boot from EMMC or NFS

None of the kernel options seems to make the uEnv.txt work. I have now set the cmdline in kernel menuconfig and will try if this works.

Then something like this;

ipaddr=192.168.20.110
netmask=255.255.255.0
serverip=192.168.20.5
bootfile=uImage1
nfsip=192.168.0.10
nfsdir=/srv/nfs/bpirootfs

set_nfsargs=setenv nfsargs "console=ttyS0,115200 ip=${ipaddr}:${serverip}:${serverip}:${netmask}::wan::${serverip}:192.168.20.5 root=/dev/nfs rw nfsroot=${nfsip}:${nfsdir},nfsvers=3,tcp nfsrootdebug"
bootnfs=run set_nfsargs; setenv bootargs "${nfsargs}"; tftp 0x80200000 ${bootfile};bootm

#run bootnfs

NOTE: On my board I maybe run something before "run bootnfs" that initialises network....easy to test that on your board just manually booting something from tftp...

I can confirm now that I have a bootable Banana PI via NFS with OpenWRT 18.06.4! Thanks a lot @anon50098793, you helped me a lot!

At the moment I achieved that by "hardcoding" the boot cmd line in the kernel settings and compiling that way. This is, obviously, not the cleanest way of doing it, but I will stick with this for now.

I am still not very clear about the usage of uEnv.txt, as it seems to only have a small effect on how the BPI is booting up.

Still a lot to learn but I am happy that my router now boots over network and not from the SD card, which is prone to damages... Next thing to do is to create a backup script to make sure, system is backed up like all my other PIs :slight_smile: Any suggestions on how to backup complete system? On my raspberries I have a nice script called "raspiBackup" which creates an image of the root partition and additionally rsyncs the complete file system keeping a defined number of versions.

Thanks!

Bye

One question: what is the best way to update the system?

with opkg I can update particular packages, which works fine. But "base-files" cannot be updated that way. On the OpenWRT site there are "sysupgrade" images avilable, but those are claiming to be for "squashfs", which might not match my configuration. The other way would be to compile from source again, which is a lot of work... Is there any other way?

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.