Thanks to the folks here we have R3 Mini upstream support in the Linux kernel. In Debian Sid arm64 kernel config I just noticed they enabled MT7986. They also provide device-tree binaries as well. Seems like everything is in place for boot a Debian installer, right? Wrong! Unfortunately something missing or at least I’m unable to do it.
Before writing down the steps, I have to tell that OpenWRT recovery.itb
image works and boots properly, as well as the images built by Frank W.'s script. So the device is fine, no issues with that.
Step #1: Donwload the binaries
wget https://d-i.debian.org/daily-images/arm64/daily/device-tree/mediatek/mt7986a-bananapi-bpi-r3-mini.dtb
wget https://d-i.debian.org/daily-images/arm64/daily/netboot/debian-installer/arm64/initrd.gz
wget https://d-i.debian.org/daily-images/arm64/daily/netboot/debian-installer/arm64/linux
cp mt7986a-bananapi-bpi-r3-mini.dtb initrd.gz linux /bootusb
Step #2: Boot into a U-boot shell (OpenWRT or default) and load the blobs
usb start
setenv kernel_addr_r 0x44000000
setenv fdt_addr_r 0x47000000
setenv ramdisk_addr_r 0x48000000
setenv bootargs earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 panic=10 initrd=${ramdisk_addr_r},64M rootwait init=/init
fatload usb 0:1 ${kernel_addr_r} linux
fatload usb 0:1 ${fdt_addr_r} mt7986a-bananapi-bpi-r3-mini.dtb
fatload usb 0:1 ${ramdisk_addr_r} initrd.gz
Step #3: Boot Linux (fails)
booti ${kernel_addr_r} - ${fdt_addr_r}
## Flattened Device Tree blob at 47000000
Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
Loading Device Tree to 00000000be7b3000, end 00000000be7bb99a ... OK
Working FDT set to be7b3000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.12.8-arm64 ([email protected]) (aarch64-linux-gnu-gcc-14 (Debian 14.2.0-12) 14.2.0, GNU ld (GNU Binutils for Debian) 2.43.50.20241230) #1 SMP Debian 6.12.8-1 (2025-01-02)
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Bananapi BPI-R3 Mini
[ 0.000000] earlycon: uart8250 at MMIO32 0x0000000011002000 (options '')
[ 0.000000] printk: legacy bootconsole [uart8250] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: 0x0000000015194000..0x0000000015194fff (4 KiB) nomap non-reusable wo-boot@15194000
[ 0.000000] OF: reserved mem: 0x00000000151e0000..0x00000000151e7fff (32 KiB) nomap non-reusable wo-ilm@151e0000
[ 0.000000] OF: reserved mem: 0x00000000151e8000..0x00000000151e9fff (8 KiB) nomap non-reusable wo-dlm@151e8000
[ 0.000000] OF: reserved mem: 0x00000000151f0000..0x00000000151f7fff (32 KiB) nomap non-reusable wo-ilm@151f0000
[ 0.000000] OF: reserved mem: 0x00000000151f8000..0x00000000151f9fff (8 KiB) nomap non-reusable wo-dlm@151f8000
[ 0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[ 0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[ 0.000000] OF: reserved mem: 0x000000004fc00000..0x000000004fcfffff (1024 KiB) nomap non-reusable wmcpu-reserved@4fc00000
[ 0.000000] OF: reserved mem: 0x000000004fd00000..0x000000004fd3ffff (256 KiB) nomap non-reusable wo-emi@4fd00000
[ 0.000000] OF: reserved mem: 0x000000004fd40000..0x000000004fd7ffff (256 KiB) nomap non-reusable wo-emi@4fd40000
[ 0.000000] OF: reserved mem: 0x000000004fd80000..0x000000004ffbffff (2304 KiB) nomap non-reusable wo-data@4fd80000
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0xbfbe9240-0xbfbec97f]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Device empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x0000000042ffffff]
[ 0.000000] node 0: [mem 0x0000000043000000-0x000000004302ffff]
[ 0.000000] node 0: [mem 0x0000000043030000-0x000000004fbfffff]
[ 0.000000] node 0: [mem 0x000000004fc00000-0x000000004ffbffff]
[ 0.000000] node 0: [mem 0x000000004ffc0000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] cma: Reserved 64 MiB at 0x00000000b8600000 on node -1
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.4
[ 0.000000] percpu: Embedded 34 pages/cpu s100952 r8192 d30120 u139264
[ 0.000000] pcpu-alloc: s100952 r8192 d30120 u139264 alloc=34*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Kernel command line: earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 debug=7 panic=10 initrd=0x48000000,64M rootwait init=/init
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 524288
[ 0.000000] Policy zone: DMA
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off
[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 2MB
[ 0.000000] software IO TLB: area num 4.
[ 0.000000] software IO TLB: mapped [mem 0x00000000bf45a000-0x00000000bf65a000] (2MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 50221 entries in 197 pages
[ 0.000000] ftrace: allocated 197 pages with 4 groups
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[ 0.000000] GICv3: 640 SPIs implemented
[ 0.000000] GICv3: 0 Extended SPIs implemented
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GICv3: GICv3 features: 16 PPIs
[ 0.000000] GICv3: GICD_CTRL.DS=0, SCR_EL3.FIQ=0
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[ 0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[ 0.008361] Console: colour dummy device 80x25
[ 0.013747] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=52000)
[ 0.024067] pid_max: default: 32768 minimum: 301
[ 0.030455] LSM: initializing lsm=lockdown,capability,landlock,yama,apparmor,tomoyo,bpf,ipe,ima,evm
[ 0.040232] landlock: Up and running.
[ 0.043908] Yama: disabled by default; enable with sysctl kernel.yama.*
[ 0.050742] AppArmor: AppArmor initialized
[ 0.054901] TOMOYO Linux initialized
[ 0.058862] LSM support for eBPF active
[ 0.063427] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.070870] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.080941] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.111366] rcu: Hierarchical SRCU implementation.
[ 0.116188] rcu: Max phase no-delay instances is 1000.
[ 0.121629] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[ 0.130852] EFI services will not be available.
[ 0.139449] smp: Bringing up secondary CPUs ...
[ 0.152169] Detected VIPT I-cache on CPU1
[ 0.152219] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[ 0.152253] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.160218] Detected VIPT I-cache on CPU2
[ 0.160256] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[ 0.160278] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.168213] Detected VIPT I-cache on CPU3
[ 0.168246] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[ 0.168266] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.168359] smp: Brought up 1 node, 4 CPUs
[ 0.224931] SMP: Total of 4 processors activated.
[ 0.229654] CPU: All CPU(s) started at EL2
[ 0.233780] CPU features: detected: 32-bit EL0 Support
[ 0.238942] CPU features: detected: 32-bit EL1 Support
[ 0.244104] CPU features: detected: CRC32 instructions
[ 0.249307] alternatives: applying system-wide alternatives
[ 0.269743] node 0 deferred pages initialised in 12ms
[ 0.274929] Memory: 1878208K/2097152K available (15488K kernel code, 3790K rwdata, 11876K rodata, 2816K init, 939K bss, 149440K reserved, 65536K cma-reserved)
[ 0.290249] devtmpfs: initialized
[ 0.297551] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.307393] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.315708] 23984 pages in range for non-PLT usage
[ 0.315727] 515504 pages in range for PLT usage
[ 0.321566] pinctrl core: initialized pinctrl subsystem
[ 0.332285] DMI not present or invalid.
[ 0.338234] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.345294] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.352523] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.360502] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.368534] audit: initializing netlink subsys (disabled)
[ 0.374146] audit: type=2000 audit(0.256:1): state=initialized audit_enabled=0 res=1
[ 0.374930] thermal_sys: Registered thermal governor 'fair_share'
[ 0.381939] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.388063] thermal_sys: Registered thermal governor 'step_wise'
[ 0.394097] thermal_sys: Registered thermal governor 'user_space'
[ 0.400133] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.406298] cpuidle: using governor ladder
[ 0.416984] cpuidle: using governor menu
[ 0.421043] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.427939] ASID allocator initialised with 65536 entries
[ 0.434328] Serial: AMBA PL011 UART driver
[ 0.440463] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[ 0.456406] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[ 0.473830] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.480719] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[ 0.487036] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.493860] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[ 0.500162] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.506983] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 0.513281] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.520101] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[ 0.532039] ACPI: Interpreter disabled.
[ 0.536410] iommu: Default domain type: Translated
[ 0.541235] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.547929] pps_core: LinuxPPS API ver. 1 registered
[ 0.552925] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.562117] PTP clock support registered
[ 0.566073] EDAC MC: Ver: 3.0.0
[ 0.569478] scmi_core: SCMI protocol bus registered
[ 0.575433] NetLabel: Initializing
[ 0.578862] NetLabel: domain hash size = 128
[ 0.583240] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.588981] NetLabel: unlabeled traffic allowed by default
[ 0.594727] vgaarb: loaded
[ 0.597716] clocksource: Switched to clocksource arch_sys_counter
[ 0.607276] VFS: Disk quotas dquot_6.6.0
[ 0.611325] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.618907] AppArmor: AppArmor Filesystem Enabled
[ 0.623720] pnp: PnP ACPI: disabled
[ 0.633222] NET: Registered PF_INET protocol family
[ 0.638348] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.681981] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.690645] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.698504] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.706641] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[ 0.714294] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.721223] MPTCP token hash table entries: 2048 (order: 3, 49152 bytes, linear)
[ 0.728785] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.735563] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.742946] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.748653] NET: Registered PF_XDP protocol family
[ 0.753475] PCI: CLS 0 bytes, default 64
[ 0.757841] Trying to unpack rootfs image as initramfs...
[ 0.761316] kvm [1]: nv: 554 coarse grained trap handlers
[ 0.769141] kvm [1]: IPA Size Limit: 40 bits
[ 0.775212] kvm [1]: vgic-v2@c420000
[ 0.778869] kvm [1]: GIC system register CPU interface enabled
[ 0.784791] kvm [1]: vgic interrupt IRQ9
[ 0.788821] kvm [1]: Hyp nVHE mode initialized successfully
[ 0.799404] Initialise system trusted keyrings
[ 0.803956] Key type blacklist registered
[ 0.808325] workingset: timestamp_bits=42 max_order=19 bucket_order=0
[ 0.814971] zbud: loaded
[ 0.818583] fuse: init (API version 7.41)
[ 0.823414] integrity: Platform Keyring initialized
[ 0.828426] integrity: Machine keyring initialized
[ 0.880872] Key type asymmetric registered
[ 0.885046] Asymmetric key parser 'x509' registered
[ 1.382187] Initramfs unpacking failed: invalid magic at start of compressed archive
[ 1.413078] Freeing initrd memory: 65536K
[ 1.425604] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 1.433169] io scheduler mq-deadline registered
[ 1.444019] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.450176] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 1.462922] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.471186] Serial: AMBA driver
[ 1.474625] msm_serial: driver initialized
[ 1.478815] SuperH (H)SCI(F) driver initialized
[ 1.484937] mousedev: PS/2 mouse device common for all mice
[ 1.492318] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 1.500724] NET: Registered PF_INET6 protocol family
[ 1.513996] Segment Routing with IPv6
[ 1.517755] In-situ OAM (IOAM) with IPv6
[ 1.521766] mip6: Mobile IPv6
[ 1.524754] NET: Registered PF_PACKET protocol family
[ 1.529924] mpls_gso: MPLS GSO support
[ 1.540303] registered taskstats version 1
[ 1.544742] Loading compiled-in X.509 certificates
[ 1.590943] Loaded X.509 cert 'Build time autogenerated kernel key: f27d3784872dbc02cc9e3ba5d621690ee8ee1314'
[ 1.608241] Demotion targets for Node 0: null
[ 1.613050] Key type .fscrypt registered
[ 1.616997] Key type fscrypt-provisioning registered
[ 1.654117] Key type encrypted registered
[ 1.658172] AppArmor: AppArmor sha256 policy hashing enabled
[ 1.663896] ima: No TPM chip found, activating TPM-bypass!
[ 1.669410] ima: Allocated hash algorithm: sha256
[ 1.674183] ima: No architecture policies found
[ 1.678798] evm: Initialising EVM extended attributes:
[ 1.683959] evm: security.selinux
[ 1.687286] evm: security.SMACK64 (disabled)
[ 1.691573] evm: security.SMACK64EXEC (disabled)
[ 1.696209] evm: security.SMACK64TRANSMUTE (disabled)
[ 1.701282] evm: security.SMACK64MMAP (disabled)
[ 1.705919] evm: security.apparmor
[ 1.709330] evm: security.ima
[ 1.712307] evm: security.capability
[ 1.715895] evm: HMAC attrs: 0x1
[ 1.802570] clk: Disabling unused clocks
[ 1.806541] PM: genpd: Disabling unused power domains
[ 1.811706] Warning: unable to open an initial console.
[ 1.820766] Freeing unused kernel memory: 2816K
[ 1.844803] Checked W+X mappings: passed, no W+X pages found
[ 1.850532] Run /init as init process
[ 1.854212] with arguments:
[ 1.857187] /init
[ 1.859465] with environment:
[ 1.862619] HOME=/
[ 1.864982] TERM=linux
[ 11.918776] platform 11280000.pcie: deferred probe pending: platform: wait for supplier /soc/t-phy/pcie-phy@11c00000
[ 11.929400] platform 11002000.serial: deferred probe pending: (reason unknown)
Debugging
I tried to extract the DTB file from the OpenWRT recovery.itb
. That file is larger than the one coming from Debian. The output very similar, I see some udev
stuff, then hangs. I tried Frank W.'s rootfs.cpio.zst
found here. Unfortunately it’s the same. I’m happy to hear and test any idea. Is it possible that the init cannot take over the console output? Thanks in advance!