I used your gpt, bl2 and fip but don’t know why it still get stucked before loading kernel:
BPI-R3> gpt read mmc 0
Partition 1:
Start 0MiB, size 0MiB
Block size 512, name gpt
Type U-Boot, bootable 0
UUID df7a38f6-9df4-11ec-a1e0-1c1b0d6d28f5
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
Partition 2:
Start 4MiB, size 0MiB
Block size 512, name u-boot-env
Type U-Boot, bootable 0
UUID 19a4763a-6b19-4a4b-a0c4-8cc34f4c2ab9
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
Partition 3:
Start 4MiB, size 2MiB
Block size 512, name factory
Type U-Boot, bootable 0
UUID 8142c1b2-1697-41d9-b1bf-a88d76c7213f
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
Partition 4:
Start 6MiB, size 2MiB
Block size 512, name fip
Type U-Boot, bootable 0
UUID 18de6587-4f17-4e08-a6c9-d9d3d424f4c5
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
Partition 5:
Start 8MiB, size 32MiB
Block size 512, name kernel
Type U-Boot, bootable 0
UUID 971f7556-ef1a-44cd-8b28-0cf8100b9c7e
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
Partition 6:
Start 40MiB, size 256MiB
Block size 512, name rootfs
Type U-Boot, bootable 0
UUID 309a3e76-270b-41b2-b5d5-ed8154e7542b
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4
success!
BPI-R3> fatload usb 0:1 $loadaddr BananaPi/gpt_emmc_100m6g.img
17408 bytes read in 2 ms (8.3 MiB/s)
BPI-R3> mmc erase 0x0 0x400;mmc write ${loadaddr} 0x0 0x400
MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK
MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK
BPI-R3> setenv bl2file BananaPi/bpi-r3_emmc_bl2.img
BPI-R3> setenv fipfile BananaPi/bpi-r3_emmc_fip.bin
BPI-R3> run wremmc
bl2file=BananaPi/bpi-r3_emmc_bl2.img
200793 bytes read in 16 ms (12 MiB/s)
MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK
MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK
fipfile=BananaPi/bpi-r3_emmc_fip.bin
280749 bytes read in 21 ms (12.7 MiB/s)
MMC erase: dev # 0, block # 13312, count 4096 ... 4096 blocks erased: OK
MMC write: dev # 0, block # 13312, count 4096 ... 4096 blocks written: OK
BPI-R3> res
resetting ...
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1006 0033 [0200]
F3: 4001 00E0 [0200]
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [2000]
T0: 0000 021F [010F]
Jump to BL
NOTICE: BL2: v2.12.0(release):a385740df-bpi-r3-emmc
NOTICE: BL2: Built : 10:50:35, Aug 20 2025
NOTICE: WDT: [40000000] Software reset (reboot)
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):a385740df-bpi-r3-emmc
NOTICE: BL31: Built : 10:50:38, Aug 20 2025
U-Boot 2025.07-bpi-geacd36c56c9c-dirty (Aug 20 2025 - 10:50:10 +0000)
CPU: MediaTek MT7986
Model: BananaPi BPi-R3
DRAM: 2 GiB
Core: 48 devices, 22 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 - 62:fa:12:db:0d:ab
eth0: ethernet@15100000
Hit any key to stop autoboot: 0
*** U-Boot Boot Menu ***
1. Enter kernel-name to boot from SD/EMMC.
2. Boot kernel from TFTP.
3. Boot from SD/EMMC.
4. Boot kernel from NVME.
Exit
Press UP/DOWN to move, ENTER to select, ESC to quit
## Error: "initrd" not defined
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x1
BOOT_PARTITION_ENABLE: 0x1 (boot0)
PARTITION_ACCESS: 0x0 (user)
emmc available
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ef, aa
Failed to initialize SPI flash at 0:0 (error -2)
NAND available
emmc nand
fit=bpi-r3.itb
Can't set block device
BPI-R3>
Next, I’ve built an ubuntu noble image by using your Images repo, and flashed eMMC via initrd:
# gunzip -c bpi-r3_noble_6.12.47-main_sdmmc.img.gz | dd bs=512 conv=notrunc,fsync of=/dev/mmcblk0
15269888+0 records in
15269888+0 records out
#
Boot eMMC with ubuntu noble installed:
Ubuntu 24.04.3 LTS bpi-r3 ttyS0
bpi-r3 login: root
Password:
Login incorrect
bpi-r3 login: root
Password:
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.12.47-bpi-r3-main aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@bpi-r3:~# pwd
/root
root@bpi-r3:~# cd /
root@bpi-r3:/# ls
bin etc lost+found proc sbin.usr-is-merged usr
bin.usr-is-merged home media root srv var
boot lib mnt run sys
dev lib.usr-is-merged opt sbin tmp
root@bpi-r3:/#
root@bpi-r3:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
root@bpi-r3:/#
Some questions here:
-
How can I make your gpt, bl2 and fip work after flashing the eMMC?
-
The ubuntu noble image is generated by using your pre-built u-boot bpi-r3_emmc.img.gz with my Linux bpi-r3_6.12.47-main.tar.gz. My u-boot built bpi-r3_sdmmc.img.gz instead. How can I build one for emmc like yours?
-
The ubuntu noble image is missing executable such as ifconfig and iwconfig. How can I get them build-in? Is it needed to customize Linux packages or just append from userpackages in sourcefiles_bpi-r3.conf?
-
Your Images repo script does not support specific flags for emmc and nand, right?
Thanks.