[BPI-R4] Imagebuilder R4 ArchlinuxArm

ArchlinuxArm for BananaPi R4.

The script is not finished yet, but first experimental booting image for R4 is built.

For those who like to try an image (376 MB):



Or checkout other images:


User: root

Passwd: admin

It boots without U-Boot, uses fat32 boot partition.

Don’t upgrade the linux package, there is one manually installed, based on dangowrt’s mt7988-for-next branch.


Doesn’t appear to be a clickable link at least for me here. Can you post the URL as plain text?

Should be ok now.

I wonder if the gpt table needs to be copied to secondary location with parted, before it can boot.

I tested the same but created directly an image on my sd with the script so did not have that problem.

Looking forward to official Linux builds on this.

I may try it out.

Me too, but that depends what you consider an official build.

Added emmc image (offline at the moment):



Copy the bpir4-emmc.img.gz to a FAT formatted usb-stick and plug it in to the board.

Boot the board in NAND mode with UART connected. Boot to Openwrt Busybox command prompt.

echo 0 > /sys/block/mmcblk0boot0/force_ro

gunzip -c /mnt/sda1/bpir4-emmc.img.gz | dd of=/dev/mmcblk0 bs=4M conv=fsync

dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=17K skip=1 count=32 conv=fsync

mmc bootpart enable 1 1 /dev/mmcblk0

Switch boot-switch to EMMC and reboot.

Think it’ll eventually be possible to run from an nvme drive instead of flash?

Yes, possible. The ATF and boot partition on emmc and root partition on nvme.

So setup emmc booting system. Then boot into initrd. Partition the nvme and format a root partition Then copy emmc root files to nvme root partition… Then edit kernel cmdline to setup new root.

Only thing, I have to add nano and parted and mkfs.btrfs to the initrd. (if I did not already)

I need to check if ATF and linux packages like this setup, may have to add a little code.

Just curious, wouldn’t this also fit into NAND instead of emmc? Because atf and boot are rather small.

Or is it better to keep NAND with a backup / recovery system?

Boot holds the Linux kernel image and will be updated with every linux package update. Nand is not suitable.

Only small part of emmc will be used. After successfully booting nvme then emmc rootfs can be deleted only keep small ATF and boot partition there

Indeed have nand openwrt image as last resort backup is a good idea. It will be same as R3mini, where we MUST have a good backup system on nand, or may brick the board.

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


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.