This is an old revision of the document!
Table of Contents
BananaPi R3
Hardware
- MT7986(Filogic 830) quad core ARM A53 SoC
- 2G DDR RAM
- 8G eMMC flash, SPI-NAND (128 MiB)
- 2x 2.5GbE network port (airoha en8811h phy)
- dual-band wifi:
- 2.4G
- 5G
debug-uart
connections from the edge of board: GND,RX,TX (remember RX/TX swap on your adapter :) )
Software
my R3mini came preinstalled with vendors openwrt (21.02-SNAPSHOT, Linux version 5.4.171) on emmc and nand. i suggest to leave the nand to have always a rescue-system and only flash emmc as productive system with a more recent version.
It will take some time till i can release a full emmc-image for R3 Mini, but my uboot-repo generates already a very basic bpi-r3 emmc image (Releases Page) without rootfs/kernel which can be used on r3mini as well. Userspace can generated with the buildchroot.sh of my BPI-Images Repo or extracted from a full r3 Image.
Step-by-step:
used usb-stick to get files accessible from r3mini
started with r3-img:
gunzip -c /mnt/sda2/bpi-r3_bookworm_nokernel.img.gz |dd bs=1024 conv=notrunc,fsync of=/dev/mmcblk0
then flash uboot (wonder why there is no mmcblk0boot0 block to flash the bl2 - seems to be a problem with vendor-image, in my linux i see the boot0):
#r3mini/bl2_r3mini_emmc_pcie.img to boot0 conv=notrunc,fsync dd if=/mnt/sda1/r3mini/fip_r3mini_emmc_pcie.bin bs=1024 conv=notrunc,fsync of=/dev/mmcblk0p4
Kernel (creates the bpi-r3.itb with conf-emmc-mini bootconfig):
https://github.com/frank-w/BPI-Router-Linux/tree/6.6-r3mini
need to drop the “run setbootconf;” from newboot first
BPI-R3M> run useusb BPI-R3M> setenv initrd rootfs.cpio.zst BPI-R3M> setenv fit r3mini/bpi-r3.itb BPI-R3M> setenv bootconf "#conf-emmc-mini" BPI-R3M> run newboot
how to get available bootconfigs from binary fit image:
dumpimage -l /media/frank/Android-x86/r3mini/bpi-r3.itb
vendor-kernel
DTS for reference:
chainload uboot
BPI-R3M> fatload usb 0:1 $loadaddr r3mini/u-boot-pcie.bin 815592 bytes read in 73 ms (10.7 MiB/s) BPI-R3M> go $loadaddr ## Starting application at 0x46000000 ... U-Boot 2024.01-bpi-r3mini-00011-g5aadabca11e5-dirty
pcie/nvme
working in my r3mini uboot (2024-01-bpi-r3mini)
BPI-R3M> pci enum drivers/pci/pcie_mediatek_gen3.c:mtk_pcie_startup_port[261] detected a card set trans table 0: 0x20000000 0x20000000, 0x10000000 BPI-R3M> pci BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x1f32 Bridge device 0x04 01.00.00 0x1c5c 0x1327 Mass storage controller 0x08 BPI-R3M> nvme scan BPI-R3M> BPI-R3M> nvme info Device 0: Vendor: 0x1c5c Rev: 80002C00 Prod: ND94N163610404F0R Type: Hard Disk Capacity: 244198.3 MB = 238.4 GB (500118192 x 512) BPI-R3M>
network support
only working once then network is stalled
BPI-R3M> setenv ipaddr 192.168.90.2 BPI-R3M> ping 192.168.90.1 Using ethernet@15100000 device host 192.168.90.1 is alive BPI-R3M> ping 192.168.90.1 Using ethernet@15100000 device ARP Retry count exceeded; starting again ping failed; host 192.168.90.1 is not alive BPI-R3M>
we will wait till phy driver is in linux mainline and use this as base for rewriting uboot driver