I think most things now work on vanilla 6.9.x kernel (with some patches) for the BPI-R4.
For supporting BPI-R4 on a vanilla 6.9.x kernel what else is needed, i.e. what is the definition of done?:
Network RSS (Attempting to get iperf3 UDP > 1 Gbps, TCP > 5 Gbps and closer to 10 Gbps)
Note: I tried working at this item but have given up. Someone else is welcome to try.
Note: RSS uses a hash to spread the incoming traffic across more than one CPU. The hash is only different if the src/destination IP address and TCP port are different. So on its own it will not improve iperf3, but it will mean one can run 2 iperf3 at the same time, on different ports, to get two tcp stream or 5 Gbps totaling 10 Gbps. I don’t know if mediatek’s implementation also understands VLANs or not.
Network LRO (Attempting to get iperf3 TCP > 5 Gbps, and closer to 10 Gbps)
UBOOT change so that Linux kernel is more portable across platforms.
General SFP improvements.
Wifi (BE14 Readily available, BE19 Status Unknown)
GPIO - Control of the GPIO Header features.
Upstream the above so they get into mainline kernel
I have not yet verified gpio header,but biggest parts are listed so far…and of course the upstreaming which is much because code mostly has to be changed to get it accepted. @dangowrt do a great work here.
Definition of done in my eyes if the changes work stable and are upstreamed…maybe backported to openwrt kernels.
@jcdutton great idea. Could you link to the respective forum threads or single posts for each of those topics? Frank already listed two in his reply, I think. Then this could be a good overview if pinned.
I have upported dma handling from sdk and rss/lro as far as i had to 6.9
Only checked if dma-patch does not break mt7988 (iperf good now),not yet tested rss/lro (upported patch from @balika011),but in older version there was something missing,but it’s a start
@frank-w I’d love to import the patches from your tree to OpenWrt but can’t because they are missing a Signed-off-by: line. Can you add that to each commit currently missing it?
In my initial work on RSS, I have found a lot to problems with the current drivers for 6.9-rc1.
So, I think I am going to try to fix those before finally doing RSS.
In summary, If the SOC supports netsys_V2 or above, in some places it is trying to use V1 registers with a V2 SOC and in other places it is using V2 registers with a V2 SOC.
We need to fix this all so that the driver uses V2 registers with a V2 SOC and visa-versa. So that it matches the openwrt drivers that correctly does this. Unfortunately, the openwrt does it in such a way that it is unlikely to be able to be up-streamed to mainline.
I notice that the current mtk_eth_soc.c just uses the device tree to detect which chip it is.
Is there not a more robust way to detect which chip we have by reading an ID register or similar?
What did you do for the compilation of the Kernel to make it work?
I was trying 6.9.9 vanilla, @frank-w6.9.0 git kernel and all of them are not booting at all on BPI-R4.
I use my own kernel. It has many of Frank’s patches in it.
Use the v6.9-rc1-bpi branch.
I build my kernel slightly differently from Frank.
Look at the arm64a.sh and arm64b.sh for a guide.
My workflow covers arm, riscv and x86, so I wanted the workflow to be as similar as possible across them all and as similar as possible to the way mainline kernel developers work.
Its is just my preference. Frank’s kernels should work just as well.
I just did traditional steps for kernel compilation:
export BUILD=build-mt7988
make ARCH=arm64 mrproper
make O=${BUILD}/ ARCH=arm64 mt7988a_bpi-r4_defconfig
rm -rf ${BUILD}/INSTALL && make O=${BUILD}/ ARCH=arm64 -j24 && make O=${BUILD}/ ARCH=arm64 INSTALL_PATH=INSTALL INSTALL_MOD_PATH=INSTALL INSTALL_DTS_PATH=INSTALL INSTALL_HDR_PATH=INSTALL/headers all headers_install dtbs_install modules_install Image install zinstall -j24
Then I took the Image and used with .its script to build the final uImage. Same I did with 6.1.73.
I have no clue if your build.sh script is still applying any additional patches.
I will give a try using the script to see if I’m getting any results.