[BPI-R4] Imagebuilder R4 ArchlinuxArm

Added instructions for nvme boot install:

Setup booting from NVME on R3/R3mini/R4

Anyway, if pcie nvme is working stable, that is…

Tested on R3 mini, but should be same on R4.

1 Like

I’ll give it a try, thanks.

John has been working on supporting PCIe NVMe in U-Boot on recent MediaTek SoC’s, he will publish his code soon and that will allow you to implement e.g. ARM SystemReady standard boot with U-Boot sitting on any of the flash options and have it perform UEFI standard boot from USB (for installer) or NVMe (for production system). Then you don’t need a distro-specific bootloader any more and can just use ARM SR with UEFI like on most ARM SBCs by now.

1 Like

I’ve updated the images here:.

https://www.woudstra.mywire.org//test-builds

Latest linux from @dangowrt 's mt7988-for-next branch.

Do not update the linux-bpir64-git package, as this is a specially build package.

There is a SD and EMMC version.

Also can find the package (archive) with pre-build linux kernel.

Also, the script is functional for R4, except that one does need to install the R4 linux package manually.

I’m sorry for this question if it’s obvious. I am new to banana pi, but not routers, openwrt, or linux. I just received my R4 and really excited to try it. I’d like to follow your instructions but am a little confused as this is my first time. You say to boot from nand to install this on the EMMC. Does that mean that I should first install to sdcard, then boot, then use USB to install image to nand, then change boot device to nand, then burn emmc image to usb drive, once booted use serial to follow your instructions to burn to emmc? I guess my question is what image should I flash to the nand if I first need to boot from nand?

If you are new, first start with sd.

I would recommend SanDisk sd cards.

I have a brand new 16gb SanDisk card for just this purpose. So if I flash your sd image to the sdcard and set the boot device to sdcard the R4 will bootup just fine? Thanks for taking the time to answer a newb’s question.

It should.

These image are so new, I haven’t tested them yet myself.

But they were build by my script, it usually is fine …

I will post my results when I get a moment. Will likely be tomorrow. I was trying to build the image myself but their build script kept failing(GitHub - BPI-SINOVOIP/BPI-R4-MT76-OPENWRT-V21.02). Glad to see yours posted.

But… Mine isn’t openwrt…

That’s fine. I just want to boot the R4.

Probably a discussion by itself, and one worth having imho:

In my experience SanDisk SD cards are fine – as long as what you buy turns out to be actually “made” by SanDisk (or at least intended by SanDisk to carry their logo…). Out of 10 times buying micro SD cards in major retail shops, I had more than half of them turn out to be fake (easy to identify using mmc-utils as vendor/product IDs don’t match). Chances of getting fakes turns out to be the highest for SanDisk and Kingston brands, probably because those are known and popular brands but selling different things made in different factories.

So general recommendation regarding microSD cards, no matter which brand: Buy them directly from the manufacturer and avoid any intermediates because they will fool you. I got so annoyed by seeing micro SD cards having problems before even written completely full for the first time, at some point I ordered a batch of super high end Samsung Pro EVO cards from samsung.com and those work fine now for a long time, total written data in the terrabytes for a 32 GiB card. I had many cards flying around, Kingston, Sandisk, Toshiba, Transcend, … all of them have died in the meantime. One very cheap AData one seems to survive for a surprising high number of writes, but that can be a coincident :wink:

tl;dr: Buy high-end cards directly from the company which makes them.

early beta of mainline OpenWrt image is here in case you want to try: http://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz

Hey Daniel,

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.

I guess, when done tinkering around, then better move to Emmc.

Fixed images, was missing CONFIG_PHY_MTK_XFI_TPHY=y

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).

Only AccessPoint version until now.

ALERT!!!

Upgrading systemd will break router function (disable ipforward)

See this post, how to fix:

Added network config option ‘router without sfp’ to build.sh script. Prebuild image follows in the next hour.

It only sets up lan and wan ports in nat (masquerading) setup. lan0 is setup as the wan port.

Network config fix for newest systemd-networkd is included.

Updated kernel from latest dangowrt’s mt7988-for-next branch, v6.10-next.