OpenWrt images for 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.