It may be wise to first use the prebuild bl2/U-Boot images from Frank, write them to emmc, together with rootfs and see if you can get something booting from emmc.
That is enough of a challenge to start with, when having no linux experience.
Once successful, replace the prebuild binaries with your own build binaries. But what does need to be changed?
Nand boot works so far…you have no kernel/rootfs there. That would require e.g. an ubifs which i try on r4 currently.
But you get an uboot prompt where you can load kernel and initrd manual to access emmc.
Initrd
Kernel (bpi-r3.itb or extract it from tar.gz package):
Put both on usb stick,insert it and run these commands
run useusb
setenv fit bpi-r3.itb
setenv initrd rootfs_arm64.cpio.zst
run newboot
Thank you. I’m confusing the board is booted from eMMC but not NAND?
BPI-R3> run useusb
USB is stopped. Please issue 'usb start' first.
starting USB...
xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:2, u3p:1
Register 300010f NbrPorts 3
Starting the controller
USB XHCI 1.10
Bus xhci@11200000: 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
System Volume Information/
9518220 bpi-r3.itb
16546559 rootfs_arm64.cpio.zst
2 file(s), 1 dir(s)
BPI-R3> setenv fit bpi-r3.itb
BPI-R3> setenv initrd rootfs_arm64.cpio.zst
BPI-R3> run newboot
initrd=rootfs_arm64.cpio.zst
16546559 bytes read in 1184 ms (13.3 MiB/s)
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
9518220 bytes read in 681 ms (13.3 MiB/s)
## Loading kernel (any) from FIT Image at 46000000 ...
Using 'conf-emmc' configuration
Trying 'kernel-1' kernel subimage
Description: Linux Kernel 6.12.47-main
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x460000e8
Data Size: 9464879 Bytes = 9 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x44000000
Entry Point: 0x44000000
Hash algo: sha1
Hash value: 54dc13ba29c71d3ff2cd0b8b9a2c7e8ec39fa0ad
Verifying Hash Integrity ... sha1+ OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'conf-emmc' configuration
Trying 'fdt-base' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46906e14
Data Size: 22925 Bytes = 22.4 KiB
Architecture: AArch64
Load Address: 0x47000000
Hash algo: sha1
Hash value: 31d0436ec59f28999bb323729109fcc93f829906
Verifying Hash Integrity ... sha1+ OK
Loading fdt from 0x46906e14 to 0x47000000
Loading Device Tree to 00000000be7f3000, end 00000000be7fbfff ... OK
Working FDT set to be7f3000
## Loading fdt (any) from FIT Image at 46000000 ...
Trying 'fdt-ov-emmc' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x469124a4
Data Size: 477 Bytes = 477 Bytes
Architecture: Unknown Architecture
Verifying Hash Integrity ... OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'nand' configuration
Trying 'fdt-ov-nand' fdt subimage
Description: unavailable
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x469126b8
Data Size: 909 Bytes = 909 Bytes
Architecture: AArch64
Verifying Hash Integrity ... OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'sata' configuration
Trying 'fdt-ov-sata' fdt subimage
Description: unavailable
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46912e50
Data Size: 1000 Bytes = 1000 Bytes
Architecture: AArch64
Verifying Hash Integrity ... OK
Booting using the fdt blob at 0xbe7f3000
Working FDT set to be7f3000
Uncompressing Kernel Image to 44000000
Loading Device Tree to 00000000be7ea000, end 00000000be7f2e77 ... OK
Working FDT set to be7ea000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.12.47-bpi-r3-main (runner@runnervmf4ws1) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #8 SMP Sun Sep 14 17:02:40 UTC 2025
[ 0.000000] Machine model: Bananapi BPI-R3
...
...
...
[ 16.371762] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[ 16.379486] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[ 16.389533] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
Waiting for br0 to get ready (MAXWAIT is 12 seconds).
OK
Starting crond: OK
ssh-keygen: generating new host keys: RSA ECDSA ED25519
Starting sshd: OK
Welcome to Buildroot
buildroot login: root
#
#
# pwd
/root
# ll
-sh: ll: not found
# ls -al
total 0
drwx------ 2 root root 0 Aug 29 2025 .
drwxr-xr-x 17 root root 0 Jan 1 00:00 ..
#
Is the rootfs_arm64.cpio.zst considered as an initrd for constructing an empty rootfs?
And the bpi-r3.itb is Linux kernel including devicetree, firmware and images. Is my understanding correct?
Initrd is a temporary rootfs (here buildroot/busybox based) to do something without a rootfs on the device itself.
The steps here are now:
Flash sdcard image to emmc userpartition (mmcblk0). You should see boot0 block too
You can also flash bl2 here to boot0,but this is better to be flashed via uboot as the partconfig maybe needs to set too…this imho can only be done from uboot or with mmcutils.
Replace fip with the emmc variant. Maybe sdmmc fip works too as main difference is the bl2.
My NAND rootfs is now empty, thus I can’t access any files/devices e.g. mmcblk0, mmcblk0boot0. What is purpose for booting NAND initrd like this?
Previously, I booted with NAND (Openwrt single image installed) and flashed bl2_emmc.img + mtk-bpi-r3-EMMC-WAN1-RJ45-20220720-single-image.img to the eMMC devices in rootfs. Then the eMMC works with Openwrt firmware.
The rootfs in initrd is independ of what you have on storage, so when you have system booting to uboot console you can start a mini linux system to do recovery or installing steps easier than through uboot. E.g. uncompressing files,editing text files,…
Without sudo because in initrd you are already root. An of course mounting your stick with the image file before and right paths
And then replace fip (needed because you need the right dts in uboot for emmc).did not thought about that before,sorry.but make sure partitiontable is read before writing. Not sure if partprobe is available in my initrd.
You can also write fip from uboot if there is no way to reload partitions…
Do not forget to flash bl2 to boot0 and set partconf in uboot.
For bl2+fip i have a macro in my uboot.qhich does all necessary steps.
MT7986> run useusb #to set device to usb and partition to 0:1 if you want to load uboot-files from there
MT7986> setenv bl2file 2023.04/bpi-r3_emmc_bl2.img
MT7986> setenv fipfile 2023.04/bpi-r3_emmc_fip.bin
MT7986> run wremmc