BPI-R4-8G can`t use 8G RAM

hi,all
i have a BPI-R4,it ues 8GB RAM , i use OpenWRT 24.10 , it only show 3.8GB RAM ,not is 8GB RAM, how can i set to 8GB RAM ?

You sure you installed the 64-bit (aarch64) version of OpenWrt? Cuz the 32-bit version cannot address more than ~4GB RAM

2 Likes


I don't know if it's aarch64,the webpage does not show arrch64

Well yes it is. Check here: https://openwrt.org/inbox/toh/sinovoip/bananapi_bpi-r4

Go through the document and see if you can find anything. Personally I don't have any experience with Bananapi but I suggest you to try snapshot version too

where did you read it has 8G RAM?

ToH states it only has RAM 4 GiB DDR4

Banana Pi BPI-R4 | BananaPi Docs
It has an 8GB version , I bought its 8GB version 。

Congratulations on being the first person on the OpenWrt forum with the 8G DDR4 version.
Are there any other differences, the reason you can not access the full 8G is because the BPI-R4 device config is set to 4G DDR4.

:rofl::rofl::rofl:
There is no difference except for RAM.
So how to configure 8GB RAM ?

by submitting a PR where the model (8GB) and memory value's updated -

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts;h=b4bf3400ffdc692673b38ebb7983f2e463aaf798;hb=f16dc4b42fb265affb2298e815a7ce0a13d60da6

2 Likes

I also found this: https://forum.banana-pi.org/t/bpi-r4-successfully-upgraded-8gb-ram-on-bpi-r4/17882/44

Basically, he modified bootloader configuration to recognize the increased memory. Then recompiled and flashed.

@frollic beat me to it lol

you need to flash patch bl2 img for BPI R4 8GB

The second option works with any OpenWrt version and allows to use the full 8GB:
I used the official OpenWrt Firmware Selector and picked the latest stable release, 24.10. After selecting the packages I needed, I wrote the image to an SD card and used it to install OpenWrt to the NAND using U-Boot, and from NAND to eMMC.
This results in OpenWrt 24.10 being installed to eMMC (also on SD and Nand) but initially, only 4GB of RAM is detected.

To fix that, I booted OpenWrt again from NAND and re-flashed the BL2 partition of the eMMC using the bl2_emmc_8g.img file (same one included in the snapshot 21.02 files I mentioned above).

Here’s the process I used while booted into NAND:

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=bl2_emmc_8g.img of=/dev/mmcblk0boot0
mmc bootpart enable 1 1 /dev/mmcblk0
After rebooting from eMMC, the system properly detected the full 8GB while still running the stable OpenWrt 24.10.
3 Likes

thnx for this, added info to the BPI-R4 wiki page.

There's a mod to replace the 8G emmc with a 256G emmc if you're so inclined.

how can i tell openwrt add information to wiki webpage ?

i suspect is a matter of changing the arm-trusted-firmware-mediatek
and enable the Config.in and set _MT7988_DDR4_8GB to default y

or/and

change the Makefile

add to TFA_MAKE_FLAGS a 8gb string like

$(if $(findstring 8gb,$(DDR_SIZE)),DDR4_4BG_MODE=1)

and

define Trusted-Firmware-A/mt7988-ram-ddr4
NAME:=MediaTek MT7988 (RAM/ddr4)
BOOT_DEVICE:=ram
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
RAM_BOOT_UART_DL:=1
HIDDEN:=
DEFAULT:=TARGET_mediatek_filogic
DDR_TYPE:=ddr4
DDR_SIZE:=8gb
endef

don't have a 8gb model to try it out but feel it would be something like this

@daniel ?

POST EDIT - I am unsure on the impact of having 8gb enabled wide for all bananapi4 ... if there is one will need to create a separate entry for the 8gb model

Hi guys, yeah 8GB support isn't upstreamed to OpenWRT yet: https://forum.banana-pi.org/t/bpi-r4-successfully-upgraded-8gb-ram-on-bpi-r4/17882/92

Hopefully we can get this soon.

Because it technically isn't required, read this thread.