sparkie
October 10, 2025, 11:39am
1
I setup a new BPI-R3 with following commands:
git clone [email protected] :frank-w/BPI-Router-Images.git
cd BPI-Router-Images
buildimg.sh bpi-r3 bookworm
gunzip -c bpi-r3_bookworm_6.12.51-main_sdmmc.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sde
# <== /dec/sde is the device of my microSDXC
I then lifted all dip switches of my R3 (are all up). Put the microSDXC into the slot.
When booting I get the following messages on the serial console. Basically I checked /dev/mmcblk0p5 and /dev/mmcblk0p6 . I can’t see a problem there.
Another microSDXC I built the same way some months ago does not show the issue.
How to diagnose?
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 300C 0028
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
T0: 0000 0276 [010F]
Jump to BL
NOTICE: BL2: v2.12.0(release):eb33cc192-bpi-r3-sdmmc
NOTICE: BL2: Built : 20:22:18, Oct 6 2025
NOTICE: WDT: Cold boot
NOTICE: WDT: disabled
NOTICE: CPU: MT7986 (2000MHz)
NOTICE: EMI: Using DDR4 settings
NOTICE: EMI: Detected DRAM size: 2048MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.12.0(release):eb33cc192-bpi-r3-sdmmc
NOTICE: BL31: Built : 20:22:21, Oct 6 2025
U-Boot 2025.10-bpi-g24b03111ecc9-dirty (Oct 06 2025 - 20:21:51 +0000)
CPU: MediaTek MT7986
Model: BananaPi BPi-R3
DRAM: 2 GiB
Core: 48 devices, 23 uclasses, devicetree: separate
MMC: mmc@11230000: 0
Loading Environment from MMC... Reading from MMC(0)... *** Warning - bad CRC, using default environment
In: serial@11002000
Out: serial@11002000
Err: serial@11002000
=> board_late_init...
Net: MediaTek MT7531
Warning: ethernet@15100000 (eth0) using random MAC address - 4a:00:bc:51:39:0f
eth0: ethernet@15100000
BPI-R3>
ericwoud
(Eric W.)
October 10, 2025, 12:26pm
2
That may already be your answer. U-Boot cannot handle some sdcards, even though they are working perfectly in arm-trusted-firmware and linux.
On my archlinuxarm images, the default bootchain for sdmmc and emmc even skips U-Boot, to avoid this problem.
that’s a good point. To verify this I now copied the complete image of another working BPI-R3 setup to the microSD in question. To my surprise it works.
So I setup the microSD with ‘bpi-r3_sdmmc.img.gz’ (intermediate image generated by buildimg.sh bpi-r3 bookworm)
completed manually the /boot and / partition but the issue remains.
It appears something in ‘bpi-r3_sdmmc.img.gz’ now is wrong.
I tried to narrow down the issue:
https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-07-bpi-2025.07-2025-07-22_1607/bpi-r3_sdmmc.img.gz
works
https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-06_2015/bpi-r3_sdmmc.img.gz
no longer works
frank-w
(Frank W.)
October 10, 2025, 5:25pm
5
But basicly you get the uboot prompt instead of the bootmenu…so no atf issue,looks like only uboot-env one
Can you try running this on uboot cli?
run loadenv;bootmenu;
frank-w:
run loadenv;bootmenu;
*** U-Boot Boot Menu ***
0. Exit
Hit any key to stop autoboot: 2
Press UP/DOWN to move, ENTER to select, ESC to quit
frank-w
(Frank W.)
October 10, 2025, 6:39pm
7
Thats strange…is there anything in your environment?
printenv
It should have these vars inside
board=bpi-r3
device=mmc
partition=0:5
bootenv=uEnv.txt
bootdevice=sd
fit=bpi-r3.itb
#bootconf="#conf-2"
#initrd=rootfs.cpio.zst
loadaddr=0x46000000
uaddr=0x41e00000
kaddr=0x46000000
rdaddr=0x48000000
root=/dev/mmcblk0p6 rootfstype=ext4 rootwait
console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11002000
bootopts=debug=7
sata_en=0
This file has been truncated. show original
You can also try
run newboot
To bootup linux (but not on the img.gz on u-boot repo…this does not contain kernel+rootfs),but i guess somehow environment is broken
Have you a uEnv.txt on bpi-boot partition?
BPI-R3> printenv
baudrate=115200
bootdelay=2
bootmedia=sd
ethaddr=ce:ce:0b:d0:d9:97
fdtcontroladdr=bf7fba10
loadaddr=0x46000000
mtdids=nmbm0=nmbm0
mtdparts=nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),65536k(ubi)
stderr=serial@11002000
stdin=serial@11002000
stdout=serial@11002000
Environment size: 280/524284 bytes
BPI-R3>
BPI-R3> run newboot
## Error: "newboot" not defined
partitions are ok
/dev/sde1: PARTLABEL="bl2" PARTUUID="c4816d06-76f4-4f51-8c9d-013b3c9ef32e"
/dev/sde2: PARTLABEL="u-boot-env" PARTUUID="209937a1-6170-42cb-9f5f-8d8f801f16b1"
/dev/sde3: PARTLABEL="factory" PARTUUID="701e2e0d-ebbd-4daa-9283-bb0642dd14d6"
/dev/sde4: PARTLABEL="fip" PARTUUID="281295e1-f9c1-4faf-8ab7-0f28667699b9"
/dev/sde5: SEC_TYPE="msdos" LABEL_FATBOOT="BPI-BOOT" LABEL="BPI-BOOT" UUID="51D9-846B" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="236be8b8-982d-4f2b-a174-83cbae886c93"
/dev/sde6: LABEL="BPI-ROOT" UUID="a638b22d-0a1b-4fed-9c12-c261333e67d8" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="376c01d0-e08b-4db4-9b72-970039122bb4"
like said something is wrong with the last release:
CI-BUILD-2025-07-bpi-2025.07-2025-07-22_1607 works
CI-BUILD-2025-10-bpi-2025.10-2025-10-06_2015 works not
frank-w
(Frank W.)
October 10, 2025, 7:15pm
9
it looks like this is the cause:
committed 06:15PM - 20 Jun 25 UTC
Rename the variable and add ENV_ prefix, so that all configuration
options which… are related to environment would have an CONFIG_ENV_
prefix. No functional change.
Also rename USE_DEFAULT_ENV_FILE to USE_ENV_DEFAULT_ENV_TEXT_FILE .
Signed-off-by: Marek Vasut <[email protected] >
pushed fixing commit, but i also see the numbering duplicated now in bootmenu…have to fix this too
*** U-Boot Boot Menu ***
1. 1. Enter kernel-name to boot from SD/EMMC.
2. 2. Boot kernel from TFTP.
3. 3. Boot from SD/EMMC.
4. 4. Boot kernel from NVME.
0. Exit
Seems to be caused by this commit: cmd: bootmenu: permit to select bootmenu entry with a shortcut · u-boot/u-boot@8c98652 · GitHub
Because now the number is assigned to a key it is automaticly printed and should not be added to the entry text itself.
edit: also fixed…pipeline running
sparkie
October 11, 2025, 3:37am
10
tested with:
CI-BUILD-2025-10-bpi-2025.10-2025-10-10_2016
→ it fixes the issue. thank you.
out of curiosity it tested ‘bpi-r3_sdmmc.img.gz’ and ‘bpi-r3_emmc.img.gz’
with:
bpi-r3_sdmmc.img.gz allowing boot from SD and EMMC
bpi-r3_emmc.img.gz allowing boot from EMMC only
so what are the advantages of bpi-r3_emmc.img.gz? Why is it there?
frank-w
(Frank W.)
October 11, 2025, 6:04am
11
The emmc image contains the emmc dts in uboot. Sdmmc will bootup but cannot access emmc. Some users wanted them because flashing sdmmc image and replacing fip was too difficult. So i created the 7mb base image too.it is also prepared to allow creating emmc full image with my images repo (not ready yet).
sparkie
October 11, 2025, 6:26am
12
Thanks for clarifying that.
brucerry
(bruce)
October 11, 2025, 1:42pm
13
I created bpi-r3_emmc.img.gz and used to generate a full Ubuntu image. And just flashed it into eMMC is okay:
gunzip -c bpi-r3_noble_6.12.47-main_sdmmc.img.gz | dd bs=512 conv=notrunc,fsync of=/dev/mmcblk0
I referred to the instructions here: [bpi-r4] Debian or Ubuntu on emmc - #3 by chkdsk88