[BPI-R4] Successfully upgraded 8GB RAM on BPI-R4

Can someone please write an easy-to-follow tutorial on this? Something an average person can understand.

  • Patching 8GB
  • Allowing the 8GB emmc storage to be used for packages
  • Getting 2.5gbps on the WAN

I don’t mean to come off as entitled but guys are intelligent with all of this and some other people have no idea. And, why isn’t there a normal image that has the 8GB patch built-in?

It is not a patch. It is different bootloader config which is not compatible with 4gb version. Maybe openwrt already exposes 8gb version.but storing in my case 400MB image twice (debian/ubuntu) only for less than 100kB difference does not make much sense. Imho openwrt images are much smaller (around 50MB afaik).

You should tell us which board Ou have and which os do you use (i guess openwrt as you mention the emmc use full size issue).

I bought it from this listing https://www.aliexpress.com/item/1005008819130229.html?spm=a2g0o.order_list.order_list_main.5.78051802nkzVoH#nav-description

It’s the BPI-R4 8gb ram 2.5GbE edition with OpenWRT 24.10.2. Only bought it 2 months ago. Or do I need to look at the board itself to be more specific?

It is enough. Openwrt only have the 2g5 variant to start. Afaik bl2 should be compatible with mine.

So flash openwrt to sdcard and then my 8g bl2 over it in partition 1.

https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-07-bpi-2025.07-2025-08-20_1042/bpi-r4_sdmmc_8GB_bl2.img

For nand you will need to use the ubi 8g bl2

https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-07-bpi-2025.07-2025-08-20_1042/bpi-r4_spim-nand_ubi_8GB_bl2.img

And flash to offset 0x0

I’m not too savvy with the technical stuff. What are the instructions for flashing the 8gb bl2 over partition 1?

Same with offset 0x0. I have zero idea about what that is, lol. You’re way smarter than me at this stuff

Sdcards have partitions defined,you can see them in gparted or windows drive manager. First 4 partitions are not containing a filesystem and so not mounted or assigned in windows to a drive letter. The first partition contains the second stage bootloader (bl2).

For nand 0x0 is beginning of the flash (first address),you can flash from openwrt or uboot once booted from sdcard. But i guess you need a bit more time with these things before using nand. So stay on sdmmc for now.

I hope it is more clear now.

This sounds promising for if I manage to create a custom VyOS build for it. It is based on Debian, so I would presumably need to use the non-ubi BL2? :slight_smile:

“ubi” in this case refers to Unsorted Block Images?

Hello everybody, I am quite new to the combination of OpenWRT on a BPI-R4. A few days ago I got the 8 GB RAM model.

The image I used was newly created using the https://firmware-selector.openwrt.org/ on 6th September 2025. I left the default packages, this gave me the file `openwrt-24.10.2-2e81dc88fd0e-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz. Today i managed to install the img from SD-Card to NAND, and then from NAND to eMMC.

As described I a currently booting from NAND, have copied the file bl2_emmc_8g.img to /tmp/bl2_emmc_8g.img and try to execute the listed commands. Following these described steps to be able to use the full 8GB while booting from eMMC all looked fine.

root@OpenWrt:~# echo 0 > /sys/block/mmcblk0boot0/force_ro
root@OpenWrt:~# dd if=/tmp/bl2_emmc_8g.img of=/dev/mmcblk0boot0
496+1 records in
496+1 records out

until I came across to execute this command:

This was the response message I got

root@OpenWrt:~# mmc bootpart enable 1 1 /dev/mmcblk0
-ash: mmc: not found

To try to eliminate my beginner errors I just downloaded the latest sdcard image from https://downloads.openwrt.org/releases/24.10.3/targets/mediatek/filogic/openwrt-24.10.3-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz, but unfortunatelly I am still getting the same error message after flashing from sd-card to NAND and the from NAND to eMMC.

Is there anybody who could help me find a solution to this?

you can compile it yourself

git clone https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git
cd mmc-utils
sudo apt install sparse
make

on R4…seems it is ignoring CROSS_COMPILE variable…

added this to makefile

CC=$(CROSS_COMPILE)gcc
LD=$(CROSS_COMPILE)ld

and run

CROSS_COMPILE=aarch64-linux-gnu- make

mmc (425,7 KB)

readme told this:

CC=aarch64-linux-gnu-gcc CFLAGS=' -g -O2 -static' make

because of size i had to compress it (gunzip mmc.gz) for uploading

mmc.gz (453,3 KB)

Thanks for your reply with all this information. :heart_eyes_cat: Thanks to this I managed to identify the correct package, in this case mmc-utils. Then I build a new image using the firmware-selector OpenWrt by adding this to the predefined default packages. With this newly created and downloaded image I was able to complete the last command. After all this I started from eMMC with the full 8GB RAM available. :partying_face:

Hello forum,

I have to disagree with the opinion expressed here that a separate 8 GB image is not necessary.

I have been trying for two days to flash my BananaPI BPI-R4 with 8 GB so that it recognizes it.

My plan was to write the SD card image to the NAND via U-Boot, then boot from the NAND and flash the NAND content to the eMMC – also via U-Boot. At least, that’s what I read in the OpenWRT forum.

But none of the advice and descriptions I found here worked, and as a result, my BPI-R4 doesn’t even boot into the U-Boot menu. It gets stuck on the message that my BPI-R4 has 0 GB of DRAM.

What did I do to get this result:

I used frank-w’s image for the 8 GB SD card bootloader (https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-07-bpi-2025.07-2025-07-22_1719/bpi-r4_sdmmc_8GB_bl2.img) to the directory

/home/user/Downloads

Then I downloaded the latest OpenWRT 24.10.3 (https://downloads.openwrt.org/releases/24.10.3/targets/mediatek/filogic/openwrt-24.10.3-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz) for my BPI-R4 to the above download directory and unzipped it.

I flashed the OpenWRT image onto a 64 GB SD card using balenaEtcher and viewed the result with GParted:

Then, as suggested by frank-w, I wrote his bl2 image to partition 1 (/dev/sdc1):

$ cd /home/user/Downloads
$ sudo dd if=bpi-r4_sdmmc_8GB_bl2.img of=/dev/sdc1

[sudo] Password for user:
488+1 records in
488+1 records out
250190 bytes (250 KB, 244 KiB) copied, 0.123012 s, 2.0 MB/s

The output via minicom is as follows:


F0: 102B 0000
FA: 1042 0000
FA: 1042 0000 [0200]
F9: 1041 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 380E 5012
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000

BP: 0600 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
MK: 0000 0000 [0000]
T0: 0000 0192 [0101]
Jump to BL

NOTICE: BL2: v2.12.0(release):a385740df-bpi-r4-sdmmc
NOTICE: BL2: Built : 10:59:19, Aug 20 2025
NOTICE: WDT: Cold boot
NOTICE: WDT: disabled
NOTICE: CPU: MT7988
NOTICE: EMI: DDR4 4BG mode
NOTICE: EMI: Using DDR unknown settings
NOTICE: EMI: Detected DRAM size: 0 MB

Not very satisfactory. And I’m probably not the only one with this problem, see for example theonlyrko…

So it would be very nice if one of the pros could create an SD card image for the 8GB version that even inexperienced users could flash right away.

Thanks in advance

Are you sure you have the 8GB version of the board?

I have a 8GB archlinuxarm image, but I’ve never tried it, I only have a 4GB version…

https://ftp.woudstra.mywire.org/images/

I have not tested my bl2 with openwrt,only with my bootchain…maybe openwrt also provides the 8gb bl2

And please test an actual one,first builds were done before i had the 8gb board and were broken because i used older atf code.

https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-07-bpi-2025.07-2025-08-20_1042/bpi-r4_sdmmc_8GB_bl2.img

Yes, I have the 8 GByte version

Unfortunately I haven’t found an 8GByte bl2 on the OpenWRT pages…

@frank-w @ericwoud

Disregard all I’ve written - they really sold me a 4 GByte version :face_vomiting: But thanks for help

Is it safe to use attended system upgrade in luci to get the new update without it affecting the 8gb patch?

I purchased a BPI-R4 8 GB RAM board from official site. Unfortunately, it is not recognized with the openwrt release 24.10.3. But luckily, it is recognized with the workaround from @frank-w bl2-image for 8 GB.

1 Like

Thanks for the report. At least for nand you have to use the ubi version for openwrt (and for my ubinized image too if you already use/test it…but it is not yet production ready). This searches fip (uboot) in a ubi partition named “fip” instead of fixed offset like the non-ubi variant.

But my fan is not running on the 8GB RAM board. Did someone have the same problem?