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

@frank-w

as I am new to bpi-r4 and not so experienced I apologize for the simple question:

To clarify, which bl2 file is required to flash on BPI-R4 8GB to boot from NAND from your link?

there are 2 different BL2 8gb there: bpi-r4_spim-nand_8GB_bl2.img and bpi-r4_spim-nand_ubi_8GB_bl2.img

Only the bl2 File must be flashed? or the respective fip.bin must be flashed too?

I have the same issue when booting from NAND shows 4GB instead of 8GB because I used a snapshot image from openwrt and NAND bl2 has been overwritten.

If yor nand is empty you need fip too. For continue with openwrt you need the ubi bl2,for debian/ubuntu the non-ubi

thank you for your prompt reply, really appreciate. I will have a try when back home and let you know

It is recommended to flash it over the uboot menu? is there any way to get the original nand bl2 8gb? that was the bl2 2.11.0 version.

nice day!

From linux you can read the target and write to a file…uboot afaik can only read files.

For flashing bl2 and fip i have a variable which you can use.

E.g. (adjust filenames)

run useusb
setenv bl2file bpi-r4_bl2_spimnand_8G.img
setenv fipfile bpi-r4_fip_spimnand.bin
run wrspimnand

for emmc use different filenames and the wremmc var at the end.

@frank-w Hallo Frank,

It has been fixed after flashing your file bpi-r4_spim-nand_ubi_8GB_bl2.img The only issue now is that there are many notices on booting that: NOTICE: UBI: Bad EC magic in block 1008 ffffffff but it is booting to nand and the 8gb is now recognized.

NOTICE: BL2: v2.12.0(release):d50bccad1-bpi-r4-spim-nand NOTICE: BL2: Built : 15:56:22, May 28 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: LVTS: Enable thermal HW reset NOTICE: SPI_NAND parses attributes from parameter page. NOTICE: SPI_NAND Detected ID 0xef NOTICE: Page size 2048, Block size 131072, size 268435456 NOTICE: UBI: scanning [0x200000 - 0x10000000] … NOTICE: UBI: Bad EC magic in block 1008 ffffffff NOTICE: UBI: Bad EC magic in block 1009 ffffffff NOTICE: UBI: Bad EC magic in block 1010 ffffffff NOTICE: UBI: Bad EC magic in block 1011 ffffffff NOTICE: UBI: Bad EC magic in block 1012 ffffffff NOTICE: UBI: Bad EC magic in block 1013 ffffffff NOTICE: UBI: Bad EC magic in block 1014 ffffffff NOTICE: UBI: Bad EC magic in block 1015 ffffffff NOTICE: UBI: Bad EC magic in block 1016 ffffffff

NOTICE: UBI: Bad EC magic in block 2029 ffffffff NOTICE: UBI: Bad EC magic in block 2030 ffffffff NOTICE: UBI: Bad VID magic in block 2031 4e4d4d30 NOTICE: UBI: scanning is finished NOTICE: UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes NOTICE: UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 NOTICE: UBI: Volume fip (Id #0) size is 2097152 bytes NOTICE: BL2: Booting BL31 NOTICE: BL31: v2.10.0 (release):OpenWrt v2024.01.17~bacca82a-3 (mt7988-spim-nand-ubi-comb) NOTICE: BL31: Built : 23:09:37, Feb 3 2025

U-Boot 2024.10-OpenWrt-r28427-6df0e3d02a (Feb 03 2025 - 23:09:37 +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 UBI… Read 126976 bytes from volume ubootenv to 00000000ff7c1c00 Read 126976 bytes from volume ubootenv2 to 00000000ff7e0c40 OK In: serial@11000000 Out: serial@11000000 Err: serial@11000000 reset button found Loading Environment from UBI… UBI partition ‘ubi’ already selected Read 126976 bytes from volume ubootenv to 00000000ff7c1c00 Read 126976 bytes from volume ubootenv2 to 00000000ff7e0c40 OK Net: eth0: ethernet@15100000

    ( ( ( OpenWrt ) ) )  [SPI-NAND]       U-Boot 2024.10-OpenWrt-r28427-6df0e3d02a (Feb 03 2025 - 23:09:37 +0000)

  1. Run default boot command.
  2. Boot system via TFTP.
  3. Boot production system from NAND.
  4. Boot recovery system from NAND.
  5. Load production system via TFTP then write to NAND.
  6. Load recovery system via TFTP then write to NAND.
  7. Load BL31+U-Boot FIP via TFTP then write to NAND.
  8. Load BL2 preloader via TFTP then write to NAND.
  9. Install bootloader, recovery and production to eMMC.
  a. Reboot.
  b. Reset all settings to factory defaults.
  0. Exit

I have only flashed the bpi-r4_spim-nand_ubi_8GB_bl2.img because I don’t know what you mean if fip is empty or not, :frowning: how can I see that? I am a novice on those things… should I proceed flashing the fip as well with the fip file?

Thanks again :slight_smile:

Fip is uboot packed into bl31…so when you see uboot (the openwrt menu above) you have a fip installed

Our store offers the official 8GB RAM WiFi 7 kit for $244 and the 4GB RAM WiFi 7 kit for $216. Stock is limited, so hurry and place your order through the link below.

8GB RAM:Amazon.com: youyeetoo Banana Pi BPI-R4 WiFi 7 Router Development Board, 8GB RAM, 8GB eMMC, MediaTek MT7988A Chip, 2X 10Gbe SFP Slots, 4X Gbe Ports, Metal Case (Wi-Fi 7 Paket Bulk) : Electronics

4GB RAM:Amazon.com: youyeetoo Banana Pi BPI R4 WiFi 7 Router Single Board Computer - Assembled, 4GB RAM, 8GB eMMC, MediaTek MT7988A Chip, 2X 10Gbe SFP Slots, 4X Gbe Ports, Metal Case (Wi-Fi 7 Paket Bulk) : Electronics

I solved it but only flash in emmc and it detects the 8gb of ram.