OpenWrt images for BPI-R4 Pro

Hello. The OpenWrt image that comes pre-installed has limitations on the packages you can install. I’d like to know if there are other images I can try to experiment with until an official version of the operating system is released. I tried the Xiaomi_ax3600 image without success because it seems I need a SanDisk Extreme 64GB SD card. Thanks.

i’ve uploaded an image (and initramfs for manuall boot out of existing uboot) created from my R4Pro_PR8 branch

https://drive.google.com/drive/folders/12u0af8eUu-ATqse4-Qg5cTYfe2XXtwQu?usp=drive_link

1 Like

Hi Frank,

Thanks for uploading the image and initramfs from your R4Pro_PR8 branch — really appreciate it!

A few questions if you don’t mind:

  1. Do you know anything about the update to the MxL862xx DSA switch driver? Will the issue be addressed, and is firmware 1.0.85 on the way? Reference: generic: update MxL862xx DSA switch driver by dangowrt · Pull Request #23477 · openwrt/openwrt · GitHub

  2. Which kernel version did you compile your image against?

  3. Did you include support/drivers for the WiFi7 card, 5G/cellular options, and NVMe plugins in the build?

For context: I’m new to this and tried to compile my own image, but I’m now running into kernel/APK problems — so I’d like to compare with your working build before I go further.

Thanks a lot in advance!

basicly driver works for 1.0.70.70 too, at least basic.

i used the default openwrt-kernel in that branch…6.18.2x afair (current openwrt main is 6.18.31, but have not rebased again on it before building)

added kmod-nvme and some utils for i2c,usb and pcie, but left all others untouched.

downloadable packages are imho only possible for stable version (25.10), not for self compiled (except you use the stable branch) or snapshots. so here you have to add all needed options

1 Like

Hi @frank-w

i’ve tried this image on my PRO, but I don’t see any PCIe bus. I’ve on put on both Slot 1 and 2, two 5G module that works only in PCIe mode, but nothing appears:

root@OpenWrt:~# lspci -v
root@OpenWrt:~# dmesg | grep -i pcie
[    0.000000] Kernel command line: console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait
[    0.020595] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[    0.020699] /soc/pcie@11290000: Fixed dependency cycle(s) with /soc/pcie@11290000/interrupt-controller
[    0.020795] /soc/pcie@11300000: Fixed dependency cycle(s) with /soc/pcie@11300000/interrupt-controller
[    0.020893] /soc/pcie@11310000: Fixed dependency cycle(s) with /soc/pcie@11310000/interrupt-controller
[    0.080143] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    0.080166] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    0.080197] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    0.080194] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    0.080210] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    0.080211] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    0.080214] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    0.080231] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    0.080236] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    0.080254] /soc/pcie@11290000: Failed to get clk index: 0 ret: -517
[    0.080259] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    0.080260] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    0.080267] mtk-pcie-gen3 11290000.pcie: failed to get clocks
[    0.080284] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    0.080317] /soc/pcie@11310000: Failed to get clk index: 0 ret: -517
[    0.080327] mtk-pcie-gen3 11310000.pcie: failed to get clocks
[    0.080435] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    0.080453] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    0.080465] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    0.080480] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    0.080501] /soc/pcie@11300000: Failed to get clk index: 0 ret: -517
[    0.080510] mtk-pcie-gen3 11300000.pcie: failed to get clocks
[    2.298208] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    2.298297] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    2.298387] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    2.298400] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    2.298433] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    2.298447] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    2.298622] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    2.298631] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    2.298639] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    2.298647] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    2.305601] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    2.312852] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    2.320156] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    2.326424] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    2.334835] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    2.343257] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    2.513757] mtk-pcie-gen3 11300000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.513796] mtk-pcie-gen3 11310000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.522568] mtk-pcie-gen3 11300000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    2.531322] mtk-pcie-gen3 11310000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    2.564029] mtk-pcie-gen3 11290000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.572066] mtk-pcie-gen3 11290000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    2.643804] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.656320] mtk-pcie-gen3 11280000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
root@OpenWrt:~#

Do I need to install some kmod to enable PCIe link?

Thanks!

Is this my image or from bpi?

My image has the key-m (nvme) slots as default,so key-b slots are not active.

To enable the key-b you have to replace the key-m overlay in uboot environment (bootconf_extra)with matching key-b slot.

your image

So i’ve to compile it by myself to enable key-b slots?

Which key-b slot do you want to use? Then you can replace the key-m below it with key-b overlay in bootconf_extra uboot var either in uboot or in openwrt linux via fw_setenv.

https://wiki.fw-web.de/doku.php?id=en:bpi-r4pro:start#pcie

Can I enable both? or just one per time?

EDIT: i was trying this post M.2 M-key connector CN-14 does not work on BPI-R4 Pro - #2 by Comet but your fw doens’t have gpioset command :\

Thanks

ok after get internet on the board, i’ve installed gpioset, but it says that gpiochip0 resourece is currently busy

root@OpenWrt:~# gpioset -c gpiochip0 -C pcie_sel -z 63=1 79=1
gpioset: unable to request lines on chip '/dev/gpiochip0': Resource busy
root@OpenWrt:~#

Any ideas?

EDIT: ok I’ve used fw_setenv bootconf_extra mt7988a-bananapi-bpi-r4-pro-cn15#mt7988a-bananapi-bpi-r4-pro-cn18 now PCIe slot are enabled

root@OpenWrt:~# lspci
0002:00:00.0 PCI bridge: MEDIATEK Corp. MT7988 PCI Express Host Bridge [Filogic 880] (rev 01)
0002:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0309
0003:00:00.0 PCI bridge: MEDIATEK Corp. MT7988 PCI Express Host Bridge [Filogic 880] (rev 01)
0003:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0309
root@OpenWrt:~#

Thanks

1 Like

Resource busy is because the gpio is occupied by the gpio-hog you change with the overlays. In your case you have enabled both key-b and disabled both key-m.

Hello frank-w,

I am having extreme issues finding a good 4E image - would you be so kind as to build one similar to the 8X images (you have lots of those but I can’t find a 4E image). I don’t have a linux pc at the moment or I would try and build one myself!

If you can do this, could you also enable one of the M2 pcie/Usb slots please?

Many thanks!

Usb is enabled so far,pcie depends on your beeds,but this can be changed in the system after flashing…default are the m.2 key-m slots. But i can build an image from my 4e codebase,but have no way to check it at the moment as i currently have only a 8x board.

Thanks, that would be great. Please go ahead when you can. I will test and let you know if it works! Cheers!

https://drive.google.com/drive/folders/12u0af8eUu-ATqse4-Qg5cTYfe2XXtwQu?usp=drive_link

  • openwrt-mediatek-filogic-bananapi_bpi-r4-pro-4e-sdcard.img.gz
  • openwrt-mediatek-filogic-bananapi_bpi-r4-pro-4e-initramfs-recovery.itb (to try booting kernel/rootfs without flashing)

Hi there, thank you so much for sharing @frank-w . I tried this image on a clean SD-card and while it boots fine, eth1 comes up in a down state. On my BPI R4-4E is this because I need to rename the interfaces to LAN/WAN?

I do have a successful OpenWrt 24.10 image compiled (with lots of help from Claude) and enabled with kernel-level WireGuard that boots and has all my configs, but I am a bit leery of running it in my home lab production network since it would be a downgrade in versions. I am currently running OpenWrt 25.12.1 on x86 hardware for the active router but want to get this BPI working. It does seem the MaxLinear 4 x 2.5G LAN chip seems to be the driver holdup so I was curious if this image you have is running on 25.x as you’ve resolved the MaxLinear driver issue?

i have not changed mxl driver so far…use the same used for 8x board…afaik we still need the newer firmware to solve the timeout issues sometimes come up. But eth1 should be the wan-port. you have to apply the right overlay - either mt7988a-bananapi-bpi-r4-pro-4e-wan-2g5 or mt7988a-bananapi-bpi-r4-pro-4e-wan-sfp setting it in bootconf_extra should work

Hello, many thanks for doing this. However, I must be doing something wrong as my 4E won’t boot - the red ‘err’ light quickly comes on but the blue ‘act’ light does not, and the 4E is inaccessible. I’m flashing the sdcard.img to a Samsung 64GB card. I have tested flashing the ‘official’ image to this card and it does boot, but not with your image. havoc7701 says it does boot so what am I doing wrong, please? Do I need to do something with the initramfs image first?

Sorry for all the questions… Thanks!

No, sdcard image should be enough,but there was a report that board (8x) does not boot without the uart cable. Have you tried with uart output to see whats happening? Maybe some card issue? There were some reports of some cards not working with r4pro.

Bootchain should be same as 8X variant except 4gb ram bl2 and a slightly different devicetree in linux

I’ve connected to console and can see all the boot messages… I have tried two different SD cards and neither boot sucessfully. Both SD cards have worked previously with the ‘official’ image.

Currently it’s rebooting about every 60 s. Maybe a significant error message is as follows:


[   15.993296] mt7996e 0000:01:00.0: Message 00000007 (seq 9) timeout
[   15.999475] mt7996e 0000:01:00.0: Failed to start patch
[   16.004697] mt7996e 0000:01:00.0: Failed to release patch semaphore
[   20.953548] platform gpio-leds: deferred probe pending: leds-gpio: Failed to get GPIO '/gpio-leds/sys-led-red'
[   21.113292] mt7996e 0000:01:00.0: Message 00000010 (seq 11) timeout
[   21.119554] mt7996e 0000:01:00.0: Failed to get patch semaphore
[   26.233297] mt7996e 0000:01:00.0: Message 00000010 (seq 12) timeout
[   26.239571] mt7996e 0000:01:00.0: Failed to get patch semaphore
[   31.353295] mt7996e 0000:01:00.0: Message 00000010 (seq 13) timeout
[   31.359570] mt7996e 0000:01:00.0: Failed to get patch semaphore
[   36.473295] mt7996e 0000:01:00.0: Message 00000010 (seq 14) timeout
[   36.479566] mt7996e 0000:01:00.0: Failed to get patch semaphore
[   41.593295] mt7996e 0000:01:00.0: Message 00000010 (seq 15) timeout
[   41.599565] mt7996e 0000:01:00.0: Failed to get patch semaphore

I notice the ‘official’ image is about 267MB but yours us 85MB - is this of any significance?

Sorry for the hassle!