This sounds like a really great solution. Will this work with the official U-Boot or will it require a custom build that includes all those features you mentioned - pcie, nvme, usb, uefi?
I would imagine having this as the main bootloader on the NAND storage, which then automatically boots from available sources, first usb, if connected, then nvme, lastly failsafe from NAND itself. Thus not requiring an active serial console.
Of course the usage of nvme, usb, failsafe and order should be configurable.
And then the option for booting from SD or emmc still remains via the dip switches.
So now the BPI-R4 is fully part of script. A different linux is installed, based on dangowrt’s mt7988-for-next branch, so not rolling-stable yet. But the linux package now is up-gradable (when I build a newer version, or you build one yourself).
Got one of the ready images also used your script to create a new sdcard both AP and router but I cant set the interfaces up due to memory and apparently something is wrong with the system not recognizing the memory correctly
[root@bpir4 ~]# free -hm
total used free shared buff/cache available
Mem: 231Mi 165Mi 14Mi 684Ki 66Mi 66Mi
Swap: 0B 0B 0B
Also during boot there are sine services failing.
[**FAILED**] Failed to start **Setup MAC addresses**.
See 'systemctl status setmac.service' for details.
[**FAILED**] Failed to start **Netfilter Tables**.
See 'systemctl status nftables.service' for details.
The last time I updated the linux for the R4 is a long time ago. It was a fork of dangowrt’s linux. I’ve been quite busy with other bpi-board related improvements.
You can build a new package:
git clone --branch=linux-bpir-git https://github.com/ericwoud/archlinuxarm-repo.git testlinux
cd testlinux
nano PKGBUILD
Change:
_gitroot="https://github.com/ericwoud/linux.git"
To:
_gitroot="https://github.com/dangowrt/linux.git"
TARGET=bpir4 makepkg
You can do this on a BPI (aarch64) board running archlinux , but also on x86_64 archlinux. If you have no archlinux, you could run it in a chroot. I would use tokland/arch-bootstrap for that.
May have to add new CONFIG_XXX to defconfig, if there are new ones that apply to the R4.
Edit:
The prebuid package is being updated now. It is being build on the oracle aarch64 free-tier It should be enough to update the linux-bpir4-git package , available soon. Still not sure if there are new CONFIG_XXX
I tried the new img and I’m already logged in as root/admin. Very nice, thank you. Now I have a working R64 toy. And sorry for being in a different thread.
One is always free to implement a initrd of one’s choice.
I’ m working on a much more functional, more tailor suited, initrd, with many possibilities For now it is running on R3, but when all functional I will add R4.
Just a few things working on:
Uboot Distro-boot sd/emmc - nvme - nand. Scanning for extlinux.conf on the devices in that order. Where on nand there is also a resque initrd.
This initrd can make connection through dhcp-client. Run my installscript or debootstrap, to install any linux on the R3 directly from initrd.
Anyway, still in development, partly functional. Maybe in a month or so it is usable.
It is all tested and looks good, setting up a usefull NAND image, from where it is quite easy to install any linux distro on nvme (or emmc), or use some linux tools to fix the reason the board is not booting correctly.
In case the R3-Mini (or any other board) is bricked, this is how to get linux running and fix whatever is needed:
with your nand distro-boot + recovery i made a ubuntu image and installed it on emmc. No i am having troubles getting ipv6 working from the router itself. its no prob from the lan side but using wan times out. when checking if all modules have been loaded i noticed the absence of nf_conntrack_ipv6 module, so this seems kinda important ;). when building a new kernel did you somewhere outlined the procedure on how to get the new kernel and modules on the emmc afterwords?
I would be greatful for some hints :). Also i would like to thank you for your great work. When im done i will post my config (systemd-networkd, nftables, suricata etc ) on this board in case anyone might wanna use it. i will include a setup script for the most important stuff.So far your builds are working fine ipv4 and ipv6 wise when not on the router itself.
Thanks again for all the great work you and Frank W. are making. Appreciate it alot.