I received my BPI-R4 8GB version today and I was hoping it would be an easy swap from my 4GB version. Unfortunately that does not seem to be the case. The new BPI-R4 does not seem to recognise the NVME drive.
Does anyone know if any hardware changes have been made to the BPI-R4 8GB version besides the added RAM?
Perhaps unrelated I also seem to have gotten a version with many bad NAND blocks:
NOTICE: BL2: v2.9(release):7154cf66405 spim-nand
NOTICE: BL2: Built : 09:15:14, Feb 27 2025
NOTICE: WDT: Cold boot
NOTICE: WDT: disabled
NOTICE: CPU: MT7988
NOTICE: EMI: Using DDR unknown settings
NOTICE: EMI: Detected DRAM size: 4096 MB
NOTICE: EMI: complex R/W mem test passed
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 2027 ffffffff
NOTICE: UBI: Bad EC magic in block 2028 ffffffff
NOTICE: UBI: Bad EC magic in block 2029 ffffffff
NOTICE: UBI: Bad EC magic in block 2030 ffffffff
NOTICE: UBI: Bad EC magic in block 2031 ffffffff
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.9(release):7154cf66405 spim-nand
Can anyone suggest how to fix the UBI partition to prevent this from showing? It’s quite annoying as it ads 2-3s or so the boot process.
I received the new BPI-R4 8GB version today as well. Here is my output booting from NAND out of the box:
NOTICE: BL2: v2.11.0(release):
NOTICE: BL2: Built : 11:21:00, Mar 8 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
WARNING: CASN page check failed
WARNING: Fail to read CASN page. Try reading parameter page
NOTICE: SPI_NAND parses attributes from parameter page.
NOTICE: SPI_NAND Detected ID 0xef
NOTICE: Page size 2048, Block size 131072, size 268435456
NOTICE: Initializing NMBM ...
NOTICE: Signature found at block 2047 [0x0ffe0000]
NOTICE: First info table with writecount 2 found in block 1920
NOTICE: Second info table with writecount 2 found in block 1923
NOTICE: NMBM has been successfully attached in read-only mode
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.11.0(release):
NOTICE: BL31: Built : 11:21:04, Mar 8 2025
Did you overwrite the BL2 with an older version? My output shows BL2: v2.11.0 (release) while yours displays v2.9.
Also, your system is only detecting 4GB of RAM when it should be 8GB.
NOTICE: EMI: Detected DRAM size: 4096 MB
If you flashed a BL2 version from the 4GB RAM variant onto a board with 8GB, it may cause issues. The documentation states:
Thanks @Dot_Brian. I did use some older bl2 and fip images, but they were the same exact ones I use on my BPI-R4 4GB version. On that one the NVME works flawlessly in u-boot (and the kernel), so I was expecting it would work here too, assuming no changes to HW besides the RAM. I also noticed the 4GB limit on my uboot but thought I’d shelf then for now.
If you don’t mind and have an NVME device plugged in, could you please check if it is suppoerted in uboot on your board, perhaps by running pci enum; nvme scan; nvme info.
Sorry about that, in the location where I am at the moment, I just checked several of the mini-PCs I have with me, and all of them either have the storage soldered or use old SSDs.
Hopefully, someone else who has received the 8GB version can do a quick test with the NVMe.
If I’m not mistaken, even the 4GB variant requires modifying the BL2 if you manually upgrade the RAM to 8GB.
Edit: Oh, sorry, I misread. You meant the other way around, that the 8GB is compatible with the 4GB. Yeah, definitely not compatible, according to the official doc.
Another quick update. Managed to get all the 8GB working using the initial instructions
Log appended at the end.
I am still getting the UBI: Bad EC magic warning. Help or suggestions welcome for this.
NVME seems to be detected if but not from cold boot. I have a Lexar drive which might need some querks or patches to work. I’ll see if I can find some other drive to test with.
Device 0: Vendor: 0x1e4b Rev: 9256 Prod: ----------------------
Type: Hard Disk
Capacity: 488386.3 MB = 476.9 GB (1000215216 x 512)
Log for the BPi-R4-8GB boot:
F0: 102B 0000
FA: 1042 0000
FA: 1042 0000 [0200]
F9: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0600 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [1000]
MK: 0000 0000 [0000]
T0: 0000 01A6 [0101]
Jump to BL
NOTICE: BL2: v2.9(release):4a09cff84e9-dirty spim-nand
NOTICE: BL2: Built : 22:33:21, Apr 1 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: 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 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.9(release):4a09cff84e9-dirty spim-nand
NOTICE: BL31: Built : 22:33:48, Apr 1 2025
U-Boot 2025.01-g3934839f01ec-dirty (Apr 01 2025 - 22:29:36 +0100)
CPU: MediaTek MT7988
Model: mt7988-rfb
DRAM: 8 GiB
Core: 50 devices, 20 uclasses, devicetree: separate
MMC: mmc@11230000: 0
Loading Environment from UBI... 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
ubi0: attaching mtd2
ubi0: scanning is finished
ubi0: attached mtd2 (name "ubi", size 126 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 1007, bad PEBs: 1, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 929, total reserved PEBs: 78, PEBs reserved for bad PEB handling: 39
does the AVAIL_DRAM_SIZE change break bl2 for 4GB version or only the compile-switch (DDR4_4BG_MODE)? i guess last one…
have you tested adding this to make call instead of modifying the Makefile?
have you used my mtk-atf branch or any other source? current mediatek atf code seems to miss some parts (at least mmc driver), i was not able to compile it (but maybe steps for compiling have changed).
and have you only added the DDR4_4BG_MODE parameter or dropped the other DDR-parameter (DRAM_USE_COMB=1)
So do we need to build the 8GB verion with DDR4_4BG_MODE=1 ?
Is there any build that can run on both 4GB and 8GB R4? That would be nice for making images. If not, I’ll have to make separate images for 4GB and 8GB R4’s.
If it is possible, then 1 image would be enough and one can ‘upgrade’ to 8GB once running from the image…
4gb images run basicly on 8gb,but do show only 4gb ram.to have full 8gb,only bl2 needs to be replaced. Imho no need for extra image which is much larger than bl2
Uboot does detect the RAM correctly,but it has to be initilized the right way…this does bl2. For sdcard you can flash 4gb image to card and overwrite bl2 afterwards with 8gb variant. For the other storages you have to use the right bl2. But basicly 4gb version runs on 8gb board…at least with debian only ubi seems to have issues with it. But 8gb does not run on 4gb board.
Not sure if atf can be changed to probe for 4bg mode and if it failes fallback to non_4bg mode.
You should not write bl2 of system you currently run (e.g. booting from nand and flashing nand). It does not affect running system but it can brick your currently booted system on reboot.
Have not done something with emmc on the 5gb boards,but it should not be different to other r4 except of bl2 of course…my pipeline generates 8gb bl2 for all devices