Any idea how to get my NAND back? I tried using this…
mtk-bpi-r4-NAND-2.5Gbps-RJ45.img
flash_erase /dev/mtd0 0 0
nandwrite -p /dev/mtd0 /media/usb/BPI-R4_2.5Gbps_RJ45/mtk-bpi-r4-NAND-2.5Gbps-RJ45.img
Does not work…
Any idea how to get my NAND back? I tried using this…
mtk-bpi-r4-NAND-2.5Gbps-RJ45.img
flash_erase /dev/mtd0 0 0
nandwrite -p /dev/mtd0 /media/usb/BPI-R4_2.5Gbps_RJ45/mtk-bpi-r4-NAND-2.5Gbps-RJ45.img
Does not work…
No,i did not used the bpi image. I created a ubinized image with ubifs.sh in my images-repo and flashed this to nand. This uses same kernel and a buildroot initrd.
variables for it in sourcefiles_bpi-r4.conf are here:
variant=bpi-r4-lite
skipkerneldownload=1
kernelfile=bpi-r4_6.18.0-rc1.tar.gz
skipinitrddownload=1
initrd=rootfs_arm64.cpio.zst
skipubootdownload=1
fipfile=bpi-r4lite_spim-nand_ubi_fip.bin
The file you used seems to be not for r4lite.
created a new file (not tested again):
tested booting my emmc again (not reflashed), but flashed this more manually (afair used sdmmc image and replaced fip) ![]()
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x1
BOOT_PARTITION_ENABLE: 0x1 (boot0)
PARTITION_ACCESS: 0x0 (user)
emmc available
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
NOR available
bootconf=#conf-base-r4lite#ov-lite-emmc#ov-lite-nor
fit=bpi-r4.itb
9987328 bytes read in 741 ms (12.9 MiB/s)
No UBIFS volume mounted!
## Loading kernel (any) from FIT Image at 46000000 ...
Using 'conf-base-r4lite' configuration
Trying 'kernel-1' kernel subimage
Description: Linux Kernel 6.17.0-rc1-r4lite
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x460000ec
Data Size: 9805127 Bytes = 9.4 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x44000000
Entry Point: 0x44000000
Hash algo: sha1
Hash value: f2a5724ec692f001cac866be41c5c8e78cc7002c
Verifying Hash Integrity ... sha1+ OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'conf-base-r4lite' configuration
Trying 'fdt-base-lite' fdt subimage
Description: Flattened Device Tree blob BPI-R4 Lite
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x4697bf84
Data Size: 31042 Bytes = 30.3 KiB
Architecture: AArch64
Load Address: 0x47000000
Hash algo: sha1
Hash value: 464f5c52fc7e8c532568afea9963cbe072ea6b9c
Verifying Hash Integrity ... sha1+ OK
Loading fdt from 0x4697bf84 to 0x47000000
Loading Device Tree to 00000000be7ee000, end 00000000be7f8fff ... OK
Working FDT set to be7ee000
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'ov-lite-emmc' configuration
Trying 'fdt-ov-lite-emmc' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46984530
Data Size: 878 Bytes = 878 Bytes
Architecture: Unknown Architecture
Verifying Hash Integrity ... OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'ov-lite-nor' configuration
Trying 'fdt-ov-lite-nor' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46984e5c
Data Size: 919 Bytes = 919 Bytes
Architecture: Unknown Architecture
Verifying Hash Integrity ... OK
Booting using the fdt blob at 0xbe7ee000
Working FDT set to be7ee000
Uncompressing Kernel Image to 44000000
Loading Device Tree to 00000000be7e3000, end 00000000be7edcce ... OK
Working FDT set to be7e3000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.17.0-rc1-bpi-r4-r4lite (frank@frank-u24) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU 5
[ 0.000000] Machine model: Bananapi BPI-R4-LITE
...
[ 1.231704] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[ 1.238029] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[ 1.238048] mtk-pcie-gen3 11280000.pcie: IO 0x0020000000..0x00201fffff -> 0x0020000000
[ 1.247305] mmcblk0: p1 p2 p3 p4 p5 p6
[ 1.253190] mtk-pcie-gen3 11280000.pcie: MEM 0x0020200000..0x002fffffff -> 0x0020200000
[ 1.263216] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB
[ 1.282133] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB
[ 1.289680] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (244:0)
...
[ 2.362262] EXT4-fs (mmcblk0p6): mounted filesystem 7236be6f-6eb3-443e-996b-5c81cff4983d ro with ordered data mode. Quota mode: disable.
[ 2.374694] VFS: Mounted root (ext4 filesystem) readonly on device 179:6.
[ 2.388219] devtmpfs: mounted
[ 2.393059] Freeing unused kernel memory: 4992K
[ 2.397847] Run /sbin/init as init process
[ 2.401939] with arguments:
[ 2.404895] /sbin/init
[ 2.407605] with environment:
[ 2.410735] HOME=/
[ 2.413084] TERM=linux
[ 2.415779] board=bpi-r4
...
Welcome to Debian GNU/Linux 13 (trixie)!
[ 3.190930] systemd[1]: Hostname set to <bpi-r4>.
...
I tried your nand file from google drive and tried to flash it, but did not seem to work…
mount /dev/sda1 /media/usb
flash_erase /dev/mtd0 0 0
nandwrite -p /dev/mtd0 /media/usb/bpi-r4-lite_nand.img
umount /media/usb
Results…
Jump to BL
NOTICE: BL2: v2.12.0(release):
NOTICE: BL2: Built : 18:21:13, Apr 10 2025
NOTICE: WDT: Cold boot
NOTICE: WDT: disabled
NOTICE: CPU: MT7987A
NOTICE: EMI: Using DDR4 settings
NOTICE: DDR4 Speed: 3200 Mbps
NOTICE: DDR tREFI: 3.9 us
NOTICE: DDR power-down option: 2
NOTICE: EMI: Detected DRAM size: 2048 MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: LVTS: Enable thermal HW reset
WARNING: CASN page check failed
WARNING: Fail to read CASN page. Try reading parameter page
NOTICE: SPI_NAND parses attributes from parameter page.
NOTICE: SPI_NAND Detected ID 0xef
NOTICE: Page size 2048, Block size 131072, size 268435456
NOTICE: Initializing NMBM ...
NOTICE: NMBM management region starts at block 1920 [0x0f000000]
NOTICE: NMBM has been initialized in read-only mode
WARNING: Firmware Image Package header check failed.
ERROR: io_dev_init failed for FIP image id 0 (-2)
ERROR: Image id 3 open failed with -2
WARNING: Failed to obtain reference to image id=3 (-2)
ERROR: BL2: Failed to load image id 3 (-2)
this is how the image should be flashed (it is only the ubi-part), so you have to have to create mtd-partition for bl2 and ubi and flash this to the ubi one.
you will also a UBI enabled BL2 like this: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-27_1028/bpi-r4lite_spim-nand_ubi_bl2.img
easiest way will be from sdcard and with the instructions from readme
but strange that is not completely broken…seems you nand is untouched.
I got the buildroot image to run on nand. It’s super limited though. Is there a ubinized OpenWRT image for r4lite?
Daniel created a merge-request for r4lite,but this is not yet merged.
You could merge this to your own codebase and build yourself.
Hi @frank-w I would still like to get ubuntu (24.04 or 22.04) working on the eMMC. Previously I did this…
skipubootdownload=1
imgfile=bpi-r4lite_sdmmc.img.gz
kernelfile=bpi-r4lite_6.17.0-main.tar.gz
Ran “buildimg.sh” like this…
sudo ./buildimg.sh bpi-r4 noble
Should this be modified differently to produce an image that will run on the bpi-r4lite eMMC?
Yes imgfile must be the emmc one or you have to replace fip by yourself.
Hi Frank,
I did this but it still does a kernel panic on boot trying to mount the mmcblk0p6
Kernel panic - not syncing: VFS: Unable to mount root fs on "/dev/mmcblk0p6" or unknown-block(179,6)
sourcefiles_bpi-r4.conf
skipubootdownload=1
imgfile=bpi-r4lite_emmc.img.gz
kernelfile=bpi-r4lite_6.17.0-main.tar.gz
variant=bpi-r4-lite
Bl2 file I load in mmcblk0boot0
F0: 102B 0000
F9: 1042 0000
F9: 1042 0000 [0200]
F8: 1041 0000
F8: 1041 0000 [0002]
F3: 1006 0033 [0200]
F3: 4001 00E0 [0200]
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0680 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
MK: 0000 0000 [0000]
T0: 0000 034C [0101]
Jump to BL
NOTICE: BL2: v2.12.0(release):eb33cc192-bpi-r4lite-emmc
NOTICE: BL2: Built : 10:53:13, Oct 27 2025
NOTICE: WDT: [40000000] Software reset (reboot)
NOTICE: CPU: MT7987A
NOTICE: EMI: Using DDR4 settings
NOTICE: DDR4 Speed: 3200 Mbps
NOTICE: DDR tREFI: 3.9 us
NOTICE: DDR power-down option: 2
NOTICE: EMI: Detected DRAM size: 2048 MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: LVTS: Enable thermal HW reset
NOTICE: BL2: Booting BL31
NOTICE: BL31: v2.12.0(release):eb33cc192-bpi-r4lite-sdmmc
NOTICE: BL31: Built : 10:55:05, Oct 13 2025
U-Boot 2025.10-bpi-g9189e1642ce8-dirty (Oct 13 2025 - 10:54:33 +0000)
CPU: MediaTek MT7987
Model: mt7987
DRAM: 2 GiB
Core: 89 devices, 22 uclasses, devicetree: separate
MMC: mmc@11230000: 0
Loading Environment from nowhere... OK
In: serial@11000000
Out: serial@11000000
Err: serial@11000000
Net: MediaTek MT7531
Warning: ethernet@15110100 (eth0) using random MAC address - 8a:e9:18:32:43:e2
eth0: ethernet@15110100
Hit any key to stop autoboot: 0
35 bytes read in 0 ms
*** 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.
5. Boot kernel from UBI.
0. 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
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
NOR available
bootconf=#conf-base-r4lite#ov-lite-emmc#ov-lite-nor
fit=bpi-r4.itb
9994760 bytes read in 863 ms (11 MiB/s)
No UBIFS volume mounted!
## Loading kernel (any) from FIT Image at 46000000 ...
Using 'conf-base-r4lite' configuration
Trying 'kernel-1' kernel subimage
Description: Linux Kernel 6.17.0-main
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x460000e8
Data Size: 9809430 Bytes = 9.4 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x44000000
Entry Point: 0x44000000
Hash algo: sha1
Hash value: 0bcf5bf20ae163e000e43c2329144d02de457cf8
Verifying Hash Integrity ... sha1+ OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'conf-base-r4lite' configuration
Trying 'fdt-base-lite' fdt subimage
Description: Flattened Device Tree blob BPI-R4 Lite
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x4697dc8c
Data Size: 31042 Bytes = 30.3 KiB
Architecture: AArch64
Load Address: 0x47000000
Hash algo: sha1
Hash value: 464f5c52fc7e8c532568afea9963cbe072ea6b9c
Verifying Hash Integrity ... sha1+ OK
Loading fdt from 0x4697dc8c to 0x47000000
Loading Device Tree to 00000000be7ed000, end 00000000be7f7fff ... OK
Working FDT set to be7ed000
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'ov-lite-emmc' configuration
Trying 'fdt-ov-lite-emmc' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46986238
Data Size: 878 Bytes = 878 Bytes
Architecture: Unknown Architecture
Verifying Hash Integrity ... OK
## Loading fdt (any) from FIT Image at 46000000 ...
Using 'ov-lite-nor' configuration
Trying 'fdt-ov-lite-nor' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x46986b64
Data Size: 919 Bytes = 919 Bytes
Architecture: Unknown Architecture
Verifying Hash Integrity ... OK
Booting using the fdt blob at 0xbe7ed000
Working FDT set to be7ed000
Uncompressing Kernel Image to 44000000
Loading Device Tree to 00000000be7e2000, end 00000000be7eccce ... OK
Working FDT set to be7e2000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.17.0-bpi-r4-main (runner@runnervmwhb2z) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #10 SMP Fri Oct 10 20:42:27 UTC 2025
[ 0.000000] Machine model: Bananapi BPI-R4-LITE
[ 0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[ 0.000000] printk: legacy bootconsole [uart8250] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: 0x00000000bffc0000..0x00000000bfffffff (256 KiB) nomap non-reusable secmon@bffc0000
[ 0.000000] OF: reserved mem: 0x0000000050000000..0x00000000500fffff (1024 KiB) nomap non-reusable wmcpu-reserved@50000000
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000004fffffff]
[ 0.000000] node 0: [mem 0x0000000050000000-0x00000000500fffff]
[ 0.000000] node 0: [mem 0x0000000050100000-0x00000000bffbffff]
[ 0.000000] node 0: [mem 0x00000000bffc0000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 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.5
[ 0.000000] percpu: Embedded 30 pages/cpu s83800 r8192 d30888 u122880
[ 0.000000] pcpu-alloc: s83800 r8192 d30888 u122880 alloc=30*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: GICv3 CPU interface
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Kernel command line: board=bpi-r4 console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11000000 root=/dev/mmcblk0p6 rootfstype=ext4 rootwait debug=7
[ 0.000000] Unknown kernel command line parameters "board=bpi-r4", will be passed to user space.
[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
[ 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] 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 0x00000000bf607000-0x00000000bf807000] (2MB)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 524288
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 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_CTLR.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.000001] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[ 0.008306] Console: colour dummy device 80x25
[ 0.012795] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[ 0.023191] pid_max: default: 32768 minimum: 301
[ 0.027930] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.035366] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.043959] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.050744] rcu: Hierarchical SRCU implementation.
[ 0.055549] rcu: Max phase no-delay instances is 1000.
[ 0.060926] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[ 0.069289] EFI services will not be available.
[ 0.073994] smp: Bringing up secondary CPUs ...
[ 0.078887] Detected VIPT I-cache on CPU1
[ 0.078922] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[ 0.078956] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.079339] Detected VIPT I-cache on CPU2
[ 0.079359] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[ 0.079375] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.079718] Detected VIPT I-cache on CPU3
[ 0.079734] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[ 0.079747] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.079787] smp: Brought up 1 node, 4 CPUs
[ 0.136271] SMP: Total of 4 processors activated.
[ 0.140984] CPU: All CPU(s) started at EL2
[ 0.145088] CPU features: detected: 32-bit EL0 Support
[ 0.150242] CPU features: detected: CRC32 instructions
[ 0.155397] CPU features: detected: PMUv3
[ 0.159452] alternatives: applying system-wide alternatives
[ 0.165382] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[ 0.173896] Memory: 2021840K/2097152K available (13824K kernel code, 2610K rwdata, 4992K rodata, 4992K init, 365K bss, 71000K reserved, 0K cma-reserved)
[ 0.188178] devtmpfs: initialized
[ 0.194517] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.204438] posixtimers hash table entries: 2048 (order: 3, 32768 bytes, linear)
[ 0.211919] futex hash table entries: 1024 (65536 bytes on 1 NUMA nodes, total 64 KiB, linear).
[ 0.220711] 26016 pages in range for non-PLT usage
[ 0.220715] 517536 pages in range for PLT usage
[ 0.225574] pinctrl core: initialized pinctrl subsystem
[ 0.235700] DMI not present or invalid.
[ 0.240820] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.247115] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.254209] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.262013] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.270387] thermal_sys: Registered thermal governor 'fair_share'
[ 0.270391] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.276506] thermal_sys: Registered thermal governor 'step_wise'
[ 0.282529] thermal_sys: Registered thermal governor 'user_space'
[ 0.288667] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.301641] ASID allocator initialised with 65536 entries
[ 0.310133] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[ 0.324081] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[ 0.336270] iommu: Default domain type: Translated
[ 0.341090] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.347612] SCSI subsystem initialized
[ 0.351484] libata version 3.00 loaded.
[ 0.355440] usbcore: registered new interface driver usbfs
[ 0.360985] usbcore: registered new interface driver hub
[ 0.366326] usbcore: registered new device driver usb
[ 0.371578] pps_core: LinuxPPS API ver. 1 registered
[ 0.376555] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.385732] PTP clock support registered
[ 0.391101] vgaarb: loaded
[ 0.396021] clocksource: Switched to clocksource arch_sys_counter
[ 0.406302] NET: Registered PF_INET protocol family
[ 0.411351] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.419813] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.428409] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.436190] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.444198] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[ 0.451866] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.458530] UDP hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.465300] UDP-Lite hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.472661] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.478766] RPC: Registered named UNIX socket transport module.
[ 0.484706] RPC: Registered udp transport module.
[ 0.489431] RPC: Registered tcp transport module.
[ 0.494146] RPC: Registered tcp-with-tls transport module.
[ 0.499649] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.506120] PCI: CLS 0 bytes, default 64
[ 0.514530] Initialise system trusted keyrings
[ 0.519138] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.525871] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.531936] NFS: Registering the id_resolver key type
[ 0.537032] Key type id_resolver registered
[ 0.541223] Key type id_legacy registered
[ 0.545252] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.551978] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.559442] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.567233] cryptd: max_cpu_qlen set to 1000
[ 0.604307] Key type asymmetric registered
[ 0.608419] Asymmetric key parser 'x509' registered
[ 0.613363] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.620787] io scheduler mq-deadline registered
[ 0.625328] io scheduler kyber registered
[ 0.629400] io scheduler bfq registered
[ 0.647670] mtk-socinfo mtk-socinfo.0.auto: error -ENOENT: Failed to get socinfo data
[ 0.655548] mtk-socinfo mtk-socinfo.0.auto: probe with driver mtk-socinfo failed with error -2
[ 0.694949] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[ 0.703158] printk: legacy console [ttyS0] disabled
[ 0.728451] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 65, base_baud = 2500000) is a ST16650V2
[ 0.737663] printk: legacy console [ttyS0] enabled
[ 0.737663] printk: legacy console [ttyS0] enabled
[ 0.747246] printk: legacy bootconsole [uart8250] disabled
[ 0.747246] printk: legacy bootconsole [uart8250] disabled
[ 0.779505] 11000100.serial: ttyS1 at MMIO 0x11000100 (irq = 66, base_baud = 2500000) is a ST16650V2
[ 0.797691] loop: module loaded
[ 0.803231] spi-nor spi1.0: supply vcc not found, using dummy regulator
[ 0.810410] 6 fixed-partitions partitions found on MTD device spi1.0
[ 0.816786] Creating 6 MTD partitions on "spi1.0":
[ 0.821568] 0x000000c00000-0x000002000000 : "fit"
[ 0.827258] 0x000000180000-0x000000c00000 : "recovery"
[ 0.833229] 0x000000100000-0x000000180000 : "fip"
[ 0.838779] 0x000000080000-0x000000100000 : "reserved2"
[ 0.844823] 0x000000040000-0x000000080000 : "u-boot-env"
[ 0.851018] 0x000000000000-0x000000040000 : "bl2"
[ 0.987254] mtk_soc_eth 15100000.ethernet: generated random MAC address 3a:fa:e9:25:2e:cd
[ 0.996480] usbcore: registered new interface driver usb-storage
[ 1.002879] i2c_dev: i2c /dev entries driver
[ 1.008335] pca954x 0-0070: supply vdd not found, using dummy regulator
[ 1.018004] rtc-pcf8563 1-0051: registered as rtc0
[ 1.023987] rtc-pcf8563 1-0051: setting system clock to 2025-10-30T21:40:03 UTC (1761860403)
[ 1.034628] at24 1-0057: supply vcc not found, using dummy regulator
[ 1.041684] at24 1-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write
[ 1.048393] i2c i2c-0: Added multiplexed i2c bus 1
[ 1.053409] i2c i2c-0: Added multiplexed i2c bus 2
[ 1.058433] i2c i2c-0: Added multiplexed i2c bus 3
[ 1.063475] pca953x 4-0020: supply vcc not found, using dummy regulator
[ 1.070206] pca953x 4-0020: using no AI
[ 1.076398] at24 4-0050: supply vcc not found, using dummy regulator
[ 1.107937] i2c i2c-0: Added multiplexed i2c bus 4
[ 1.112739] pca954x 0-0070: registered 4 multiplexed busses for I2C switch pca9545
[ 1.120978] mtk-lvts-thermal 1100a000.lvts: fake golden temp=60
[ 1.128471] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[ 1.137794] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 1.144356] usbcore: registered new interface driver usbhid
[ 1.149950] usbhid: USB HID core driver
[ 1.154437] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 (0,8000003f) counters available
[ 1.164249] NET: Registered PF_INET6 protocol family
[ 1.169811] Segment Routing with IPv6
[ 1.173503] In-situ OAM (IOAM) with IPv6
[ 1.177456] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.183771] NET: Registered PF_PACKET protocol family
[ 1.188988] 8021q: 802.1Q VLAN Support v1.8
[ 1.199696] Loading compiled-in X.509 certificates
[ 1.212887] mmc0: Host Software Queue enabled
[ 1.216550] phy phy-soc:[email protected]: type_sw - reg 0x218, index 0
[ 1.217306] mmc0: new high speed MMC card at address 0001
[ 1.225004] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[ 1.225161] sfp sfp@0: Host maximum power 3.0W
[ 1.230341] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[ 1.236720] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[ 1.236740] mtk-pcie-gen3 11280000.pcie: IO 0x0020000000..0x00201fffff -> 0x0020000000
[ 1.236754] mtk-pcie-gen3 11280000.pcie: MEM 0x0020200000..0x002fffffff -> 0x0020200000
[ 1.272559] Alternate GPT is invalid, using primary GPT.
[ 1.277915] mmcblk0: p1 p2 p3 p4 p5 p6
[ 1.283138] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB
[ 1.291062] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB
[ 1.298363] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (244:0)
[ 1.347229] mtk_soc_eth 15100000.ethernet: generated random MAC address 4e:f7:73:a7:14:bc
[ 1.355496] mtk_soc_eth 15100000.ethernet: generated random MAC address ae:d3:8e:60:9d:21
[ 1.368208] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc084200000, irq 69
[ 1.378096] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc084200000, irq 69
[ 1.387760] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[ 1.395197] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[ 1.403399] xhci-mtk 11200000.usb: xHCI Host Controller
[ 1.408673] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[ 1.419057] xhci-mtk 11200000.usb: hcc params 0x01443f99 hci version 0x120 quirks 0x0000000020200010
[ 1.428232] xhci-mtk 11200000.usb: irq 75, io mem 0x11200000
[ 1.433988] xhci-mtk 11200000.usb: xHCI Host Controller
[ 1.439228] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[ 1.446025] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[ 1.446628] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[ 1.455402] mtk-pcie-gen3 11280000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[ 1.466495] hub 1-0:1.0: USB hub found
[ 1.474862] hub 1-0:1.0: 1 port detected
[ 1.479124] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.487593] hub 2-0:1.0: USB hub found
[ 1.491349] hub 2-0:1.0: 1 port detected
[ 1.529761] mt7530-mdio mdio-bus:1f: no interrupt support
[ 1.569353] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[ 1.578241] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control off
[ 1.586169] mt7530-mdio mdio-bus:1f lan0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[ 1.608723] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[ 1.630969] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[ 1.653352] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[ 1.668664] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[ 1.675392] DSA: tree 0 setup
[ 1.678940] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 1.686090] clk: Disabling unused clocks
[ 1.691042] PM: genpd: Disabling unused power domains
[ 1.696437] check access for rdinit=/init failed: -2, ignoring
[ 1.710093] JBD2: no valid journal superblock found
[ 1.714977] EXT4-fs (mmcblk0p6): Could not load journal inode
[ 1.720895] List of all partitions:
[ 1.724387] 1f00 20480 mtdblock0
[ 1.724392] (driver?)
[ 1.730920] 1f01 10752 mtdblock1
[ 1.730923] (driver?)
[ 1.737454] 1f02 512 mtdblock2
[ 1.737457] (driver?)
[ 1.743975] 1f03 512 mtdblock3
[ 1.743978] (driver?)
[ 1.750500] 1f04 256 mtdblock4
[ 1.750504] (driver?)
[ 1.757029] 1f05 256 mtdblock5
[ 1.757033] (driver?)
[ 1.763549] b300 7634944 mmcblk0
[ 1.763552] driver: mmcblk
[ 1.770336] b301 4079 mmcblk0p1 cf4fb127-9a61-4bf5-9224-ef637ede64b7
[ 1.770340]
[ 1.779289] b302 512 mmcblk0p2 52637bc4-d175-47c1-8ec9-3bd83e4238f6
[ 1.779293]
[ 1.788242] b303 2048 mmcblk0p3 48ee05c2-79d2-4183-a205-9f457cbf6496
[ 1.788247]
[ 1.797195] b304 2048 mmcblk0p4 db267f56-e442-4f79-acb6-4fdefa6e3295
[ 1.797199]
[ 1.806148] b305 102400 mmcblk0p5 c3d48ef9-adf8-4f00-9ceb-95ac47d6127f
[ 1.806152]
[ 1.815096] b306 6758400 mmcblk0p6 3333261a-365f-4dc8-83c9-c430348f754c
[ 1.815100]
[ 1.824053] b308 4096 mmcblk0boot0
[ 1.824056] (driver?)
[ 1.830841] b310 4096 mmcblk0boot1
[ 1.830844] (driver?)
[ 1.836159] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[ 1.837624] No filesystem could mount root, tried:
[ 1.844130] ext4
[ 1.848998]
[ 1.852393] Kernel panic - not syncing: VFS: Unable to mount root fs on "/dev/mmcblk0p6" or unknown-block(179,6)
[ 1.862556] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.0-bpi-r4-main #10 NONE
[ 1.870723] Hardware name: Bananapi BPI-R4-LITE (DT)
[ 1.875676] Call trace:
[ 1.878112] show_stack+0x18/0x24 (C)
[ 1.881772] dump_stack_lvl+0x34/0x8c
[ 1.885430] dump_stack+0x18/0x24
[ 1.888736] vpanic+0x2ec/0x2fc
[ 1.891869] nmi_panic+0x0/0x8c
[ 1.895000] mount_root+0x0/0x2dc
[ 1.898307] mount_root+0x168/0x2dc
[ 1.901786] prepare_namespace+0x6c/0x2a0
[ 1.905785] kernel_init_freeable+0x368/0x3d0
[ 1.910134] kernel_init+0x20/0x1d4
[ 1.913614] ret_from_fork+0x10/0x20
[ 1.917183] SMP: stopping secondary CPUs
[ 1.921098] Kernel Offset: disabled
[ 1.924575] CPU features: 0x000000,00080000,20002001,0400420b
[ 1.930310] Memory Limit: none
[ 1.933355] Rebooting in 10 seconds..
I think it was not building as expected because I think that the sourcefiles_bpi-r4.conf does not like comments. I took all the comments out and now it builds differently and does this…
## Error: "initrd" not defined
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x1
BOOT_PARTITION_ENABLE: 0x1 (boot0)
PARTITION_ACCESS: 0x0 (user)
emmc available
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
NOR available
bootconf=#conf-base-r4lite#ov-lite-emmc#ov-lite-nor
fit=bpi-r4.itb
Failed to load 'bpi-r4.itb'
BPI-R4L>
I got a build that boots!
variant=bpi-r4-lite
skipubootdownload=1
imgfile=bpi-r4lite_emmc.img.gz
skipkerneldownload=1
kernelfile=bpi-r4lite_6.17.0-main.tar.gz
fipfile=bpi-r4lite_emmc_fip.bin
bl2 flashed separately to mmcblk0boot0
What is real differnce? Boot till kernel was previously done so it should make no change in bootup…but the journal error is strange…similar like the r64 issue.
I just added this and ran buildimg.sh again…
fipfile=bpi-r4lite_emmc_fip.bin
I started poking around and noticed that 2.5Gbps Nic does not work. I am assuming there is an overlay that needs to be applied? Possibly for the sfp as well? If so how do I do that?
Fipfile is only used for nand image,not mmc.
Possibly driver module is not loaded or firmware missing. 2g5 phy was working in my tests (both builtin).
So the phy 2g5 driver is in the kernel already? It should just work? I used bpi-r4lite_6.17.0-main.tar.gz. It does not work on both eMMC or SD card installations I have. Do you remember your exact sourcefiles_bpi-r4.conf for emmc? I can try and run it?
If you load the module,yes…
I have installed the emmc step by step manually till it worked. As i needed multiple attempts to get it working.
You hang still on journal inode?
as kernel on my emmc was only 6.17-rc1 i have recompiled 6.17-main with builtin phy driver and firmware (for loading via tftp).
root@bpi-r4:~# uname -a
Linux bpi-r4 6.17.0-bpi-r4-main #2 SMP Sat Nov 1 11:06:18 CET 2025 aarch64 GNU/Linux
root@bpi-r4:~# cat /sys/class/thermal/thermal_zone0/temp
49510
root@bpi-r4:~# ip a a 192.168.0.19/24 dev eth1
root@bpi-r4:~# ip l set eth1 up
[ 43.221956] mtk_soc_eth 15100000.ethernet eth1: PHY [mdio-bus:0f] driver [MediaTek MT7987 2.5GbE PHY] (irq=POLL)
[ 43.232309] mtk_soc_eth 15100000.ethernet eth1: configuring for phy/internal link mode
root@bpi-r4:~# [ 47.387598] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
root@bpi-r4:~#
root@bpi-r4:~# ping 192.168.0.21
PING 192.168.0.21 (192.168.0.21) 56(84) bytes of data.
64 bytes from 192.168.0.21: icmp_seq=1 ttl=64 time=0.631 ms
64 bytes from 192.168.0.21: icmp_seq=2 ttl=64 time=0.682 ms
64 bytes from 192.168.0.21: icmp_seq=3 ttl=64 time=0.672 ms
--- 192.168.0.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2048ms
rtt min/avg/max/mdev = 0.631/0.661/0.682/0.022 ms
root@bpi-r4:~#
so basicly phy is working there. if it looks differently you have to look if you have loaded the module and if you have firmware files in rootfs…afaik last can fail if you have not manually installed it as it was not yet in linux-firmware-repo as patch was not applied yet (have not found a v2)
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
there is no mt7987 folder there: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
this official repo is used by my image-builder for firmware-blobs, so that i do not need to have each firmware stored in my images-repo…so just copy it from my kernel-repo where i have the files for testing till linux-firmware has these files.
changes i made temporary in my 6.17-main tree (except build.conf of course):
diff --git a/arch/arm64/configs/mt7988a_bpi-r4_defconfig b/arch/arm64/configs/mt7988a_bpi-r4_defconfig
index 4fc40550f7b6..662ee8bc3fe6 100644
--- a/arch/arm64/configs/mt7988a_bpi-r4_defconfig
+++ b/arch/arm64/configs/mt7988a_bpi-r4_defconfig
@@ -1302,7 +1302,7 @@ CONFIG_MTK_T7XX=m
CONFIG_MARVELL_PHY=m
CONFIG_MARVELL_10G_PHY=m
-CONFIG_MEDIATEK_2P5GE_PHY=m
+CONFIG_MEDIATEK_2P5GE_PHY=y
#spi display
#CONFIG_DRM=m
#CONFIG_FB=m
@@ -1312,12 +1312,12 @@ CONFIG_MEDIATEK_2P5GE_PHY=m
CONFIG_NET_DSA_MXL862=y
CONFIG_NET_DSA_TAG_MXL862_8021Q=y
-CONFIG_AS21XXX_PHY=m
+CONFIG_AS21XXX_PHY=y
CONFIG_GPIO_PCA953X=y
CONFIG_INA2XX_ADC=y
#for debugging
CONFIG_STRICT_DEVMEM=n
-#CONFIG_EXTRA_FIRMWARE="aeonsemi/as21x1x_fw.bin mediatek/mt7987/i2p5ge-phy-DSPBitTb.bin mediatek/mt7987/i2p5ge-phy-pmb.bin"
+CONFIG_EXTRA_FIRMWARE="aeonsemi/as21x1x_fw.bin mediatek/mt7987/i2p5ge-phy-DSPBitTb.bin mediatek/mt7987/i2p5ge-phy-pmb.bin"
CONFIG_EXTRA_FIRMWARE_DIR="utils/firmware/"
but if you copy the firmware-files from utils/firmware/ (mediatek/mt7987/i2p5ge-phy-DSPBitTb.bin mediatek/mt7987/i2p5ge-phy-pmb.bin) to same location in /lib/firmware (also folder mediatek/mt7987/) it should work when you load the module.
modprobe mtk-2p5ge
only the led seems still wrong in 6.17-main (have fixed this in 6.18-rc branch) - but fixing commit depends on some mainline-patches, so i have not backported this patch.
contacted Sky Huang on Oct 17, but got no response yet…maybe he is on vacation
Thanks Frank!
The last bpi-r4lite kernel (bpi-r4lite_6.17.0-main.tar.gz) you have is from 2025-10-10 (Release CI-BUILD-6.17-main-6.17.0-2025-10-10_1645 · frank-w/BPI-Router-Linux · GitHub), so that is what I am using. Do I need a newer build (I think you are saying you cannot for r4lite until the upstream is fixed)? Are you saying with that with the 2025-10-10 6.17 kernel if I copy…
i2p5ge-phy-DSPBitTb.bin
i2p5ge-phy-pmb.bin
to here: /lib/firmware/mediatek/mt7987
The 2.5GGb nic should start working?
If so, do you have the links to these files? I am having difficulty locating them.
i2p5ge-phy-DSPBitTb.bin
i2p5ge-phy-pmb.bin
I can try and manually load them.