Missing:
NOTICE: EMI: DDR4 4BG mode
From bl2 output, so you are using the bl2 for the 4gb board.
Missing:
NOTICE: EMI: DDR4 4BG mode
From bl2 output, so you are using the bl2 for the 4gb board.
It is the default bl2 from openwrt,not mine…you have to flash bl2 to partition #1 of the sdcard.
when i write your bl2 and fip to card I can no longer boot??? @ericwoud
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sudo fdisk -l /dev/sdb
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device.
Disk /dev/sdb: 7.38 GiB, 7929331712 bytes, 15486976 sectors
Disk model: Micro SD/M2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5452574F-2211-4433-5566-778899AABB00
Device Start End Sectors Size Type
/dev/sdb1 34 8191 8158 4M Linux filesystem
/dev/sdb2 8192 9215 1024 512K Linux filesystem
/dev/sdb3 9216 13311 4096 2M Linux filesystem
/dev/sdb4 13312 21503 8192 4M EFI System
/dev/sdb5 24576 90111 65536 32M EFI System
/dev/sdb6 90112 131071 40960 20M EFI System
/dev/sdb7 131072 1179647 1048576 512M unknown
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sudo dd if=bpi-r4_sdmmc_8GB_bl2.img of=/dev/sdb1 status=progress
488+1 records in
488+1 records out
250190 bytes (250 kB, 244 KiB) copied, 0.0827971 s, 3.0 MB/s
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sha256sum bpi-r4_sdmmc_8GB_bl2.img
e3a1f08c191969e307a00012e2638d338a7f932c7b7ba3cc561c1b0d50e08706 bpi-r4_sdmmc_8GB_bl2.img
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sudo dd if=/dev/sdb1 bs=1 count=$(stat -c%s bpi-r4_sdmmc_8GB_bl2.img) | sha256sum
250190+0 records in
250190+0 records out
250190 bytes (250 kB, 244 KiB) copied, 0.170731 s, 1.5 MB/s
e3a1f08c191969e307a00012e2638d338a7f932c7b7ba3cc561c1b0d50e08706 -
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sudo dd if=bpi-r4_sdmmc_8GB_fip.bin of=/dev/sdb4 status=progress
723+1 records in
723+1 records out
370453 bytes (370 kB, 362 KiB) copied, 0.0769057 s, 4.8 MB/s
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sha256sum bpi-r4_sdmmc_8GB_fip.bin
ab57e99d14e64dbd9a5446671e312a83d1b391acf2010cf7bff535ee6c877d8e bpi-r4_sdmmc_8GB_fip.bin
(base) λ ~/git/bpir4/openwrt/ bpi-r4-8gb sudo dd if=/dev/sdb4 bs=1 count=$(stat -c%s bpi-r4_sdmmc_8GB_fip.bin) | sha256sum
370453+0 records in
370453+0 records out
370453 bytes (370 kB, 362 KiB) copied, 0.280015 s, 1.3 MB/s
ab57e99d14e64dbd9a5446671e312a83d1b391acf2010cf7bff535ee6c877d8e -
what do u think??
I think, use archlinuxarm instead of openwrt ![]()
I do not use openwrt, but it should only be necessary to change bl2.
How does the bootlog looks like? Do not replace fip when using openwrt…only bl2! Openwrt uses different uboot to load their things
is there a way to build openwrt that has the 8gb built in? I build my openwrt builds from their git and I dont want to have to add an extra bl2?
To be clear I am a novice. When i build openwrt from the openwrt git it automatically gets the 4gb ram. What would I need to change/add to get it to build the 8gb.
you could try modify package/boot/arm-trusted-firmware-mediatek/Makefile to pass DDR4_4BG_MODE to ATF compile process and then tell openwrt build system to use the right file in target/linux/mediatek/image/filogic.mk .
had not yet tested it, but compile works now after full day working on it…
my current state:
if anyone wants to try it out here are my openwrt image binaries for 8G variants:
https://drive.google.com/drive/folders/12u0af8eUu-ATqse4-Qg5cTYfe2XXtwQu?usp=drive_link
I cherry picked the 4 commits and got it compile but im still only sitting at 4gb of memory.
The compile finished and I get an output that upgrades my build but I dont see the full 8gb.
You’ve selected the 8gb board?
tested my image created on sunday on my 8GB phy board (poe in openwrt)
NOTICE: BL2: v2.10.0 (release):OpenWrt v2024.01.17~bacca82a-3 (mt7988-sdmmc-comb-8g)
NOTICE: BL2: Built : 14:46:56, Oct 19 2025
NOTICE: WDT: [40000000] Software reset (reboot)
NOTICE: CPU: MT7988
NOTICE: EMI: DDR4 4BG mode
NOTICE: EMI: Using DDR unknown settings
NOTICE: EMI: Detected DRAM size: 8192 MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.10.0 (release):OpenWrt v2024.01.17~bacca82a-3 (mt7988-sdmmc-comb-8g)
NOTICE: BL31: Built : 14:46:56, Oct 19 2025
U-Boot 2024.10-OpenWrt-r28952-2174e3a54b53 (Oct 19 2025 - 15:34:01 +0000)
CPU: MediaTek MT7988
Model: Bananapi BPI-R4
DRAM: 8 GiB
so i guess you have not selected one of the 2 new 8GB boards in menuconfig
I’m not sure it is the best way to add support for 8g as i’m new to openwrt build system and i do not mainly use openwrt. Just want to stop the discussion about 8gb support ![]()
I selected the 8gb non poe version and after I didnt get 8gb after flash I did a make PROFILE=“bananapi_bpi-r4-8g” DDR4_4BG_MODE=1 -j21 and an additional make PROFILE=“bananapi_bpi-r4-8g” as well as a normal make each time i had is selected. this was my output dir:
config.buildinfo
feeds.buildinfo
mt7981-ram-ddr3-bl2.bin
mt7981-ram-ddr4-bl2.bin
mt7986-ram-ddr3-bl2.bin
mt7986-ram-ddr4-bl2.bin
mt7988-ram-comb-bl2.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-emmc-bl31-uboot.fip
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-emmc-preloader.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-initramfs-recovery.itb
openwrt-mediatek-filogic-bananapi_bpi-r4-8g.manifest
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-sdcard.img.gz
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-snand-bl31-uboot.fip
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-snand-preloader.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-8g-squashfs-sysupgrade.itb
packages
profiles.json
sha256sums
version.buildinfo
config.buildinfo has this inside: CONFIG_TARGET_mediatek_filogic_DEVICE_bananapi_bpi-r4-8g=y
I am very new to all of this also. Do I have to do anything more than just upgrade my image. From what i’ve been reading the openwrt-mediatek-filogic-bananapi_bpi-r4-8g-squashfs-sysupgrade.itb should be all I have to complete. But Im not sure.
Build way should be right…but then flash the sdcard img…sysupgrade is imho not enough (afaik does not replace bl2 and fip, only kernel and openwrt rootfs/initramfs).
I flashed openwrt-mediatek-filogic-bananapi_bpi-r4-8g-sdcard.img.gz and it flashed perfect but its still only 4gb of memory. everything works and I had no build errors that I detected.
Can you give bootlog please?
did test with my “normal” (2 x sfp variant) and it also works
NOTICE: BL2: v2.10.0 (release):OpenWrt v2024.01.17~bacca82a-3 (mt7988-sdmmc-comb-8g)
NOTICE: BL2: Built : 14:46:56, Oct 19 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: 8192 MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.10.0 (release):OpenWrt v2024.01.17~bacca82a-3 (mt7988-sdmmc-comb-8g)
NOTICE: BL31: Built : 14:46:56, Oct 19 2025
U-Boot 2024.10-OpenWrt-r28951+1-798efafbe9fa (Oct 19 2025 - 15:34:01 +0000)
CPU: MediaTek MT7988
Model: Bananapi BPI-R4
DRAM: 8 GiB
Core: 64 devices, 23 uclasses, devicetree: embed
spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
MMC: mmc@11230000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
and also in openwrt itself
root@OpenWrt:~# free
total used free shared buff/cache available
Mem: 8138728 92580 8015404 452 30744 7978052
Swap: 0 0 0
root@OpenWrt:~#
maybe you had missed any patch? maybe try my binaries i’ve uploaded to gdrive or use at least my repo to compile
My builds worked (based on your cherry picks). Your pre-built binary worked for me also. I had to write image to sdcard boot and then flash internal emmc. I just dont think you can update the os to recognize the new 8gb ram when the os could only see 4gb ram using webgui or sysupgrade. I am curious why it didn’t but I am happy I have 8gb ram now on my 8gb r4
I did cherry pick the new updates you had 2 days ago and my build was with those and it worked. So my cherry pick went from 4 to 3 but my build from today and your build from the 19th also worked.
7907288K free
Thanks for the openwrt update!
Yes,you had to update nand/emmc too,but first test sdmmc. Uboot install should work too,but i have not tested. Afaik sysupgrade is not enough,as this imho does not replace bootloaders.And there is imho no detection possible which checks if it is a 8gb board with 4gb available.
do you think I need to build every future openwrt that will include your cherry picks or now that my bl2 and other low level boot loaders are on the 8gb path can I just build the regular openwrt?
Afaik you can continue with normal sysupgrade as it does not replace bl2. Obly if you flash image or replace bl2 by uboot or similar,you have to use the 8gb variant.