frank-w/BPI-Router-Linux

Banana Pi R2 Armbian

martinl opened this issue · 12 comments

Hi

I'm currently looking into options for adding official Banana Pi R2 support to Armbian (armbian/build#2147) using your 5.4-main as base. Can you please explain which patches are needed for R2 from your 5.4-main branch vs mainline 5.4

Also, would you be interested in testing and supporting R2 on Armbian to some extent

Martin

git logone v5.4.58..5.4-main | grep -v "Merge tag"

there are some commits that should not be catched (seems like from 5.4.21...i removed them and replaced by ...) because they are not from me (don't know why), but it filters many out from the merges

$ git logone v5.4.58..5.4-main | grep -v "Merge tag"
95d702080506 defconfig: r2: add squashfs
e5ef215df9b5 defconfig: r2: add usb_printer
e9be7441fee3 Add module reset before eMMC init
90fb2149034a net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode
d4dc1e7e87d8 Revert "net: dsa: enable vlan without bridge on dsa user port"
53cae12d7d82 Revert "arm: dts: workaround non-working trgmii"
318b661c9578 net: ethernet: mediatek: move mt7623 settings out off the mt7530
0cb5221062b6 net: dsa: mt7530: move mt7623 settings out off the mt7530
ae24ad6a9054 build.sh: fix check for enabled kernel (need uenv.txt be modified)
2946caa5862d mt76: add firmware for mt7612e
d5325fb58f9d wireguard: fix implicit declaration skb_reset_tc
a3a3d4a17df3 build.sh: show only build kernel, compare with old and ask for edit uenv
9414adbdfcd5 mt6625l: fix makefile for module compilation (BT)
0c645101a841 defconfig: r2: enable internal BT module
119ba42b2f62 build.sh: do not prompt for commit-message on updatesrc + show max
76ff28a85894 readme: openvpn+lxc reported as working in 4.19
c62152c80834 utils: add script for building chroot and compiling hostapd
d822d17e804e added wireguard from master
3f295ef506b6 Revert "added wireguard, tag:0.0.20191219"
1beb6809a118 defconfig: r64: adding ZBUD/Z3FOLD for ZSWAP (armbian)
dabd02495f84 added wireguard, tag:0.0.20191219
6f8e40393d73 defconfig: r64: add options for armbian
0b9b9e3c95b8 travis: include pack_debs in travis config
2dc7c5ddc90d build-deb: pack uImage for r2 by default
168256ce9fd8 build.sh: pack_debs
710815d067b2 kbuild: packaging images in deb
...
2e4b86dfcf32 defconfig: add mt76x2 and policy routing
d87e1a23e511 lima: power on/off via register (function)
be435b41a6df defconfig: add lima/mali related options
9a25a149ad7c arm: dts: drop larb3
6468d187f126 arm: dts: mt7623: add Mali-450 device nodes
502577561fb7 defconfig: add hwmon / thermal
9847677bda49 thermal: mediatek: execute hwmon-code only if hwmon_thermal is set
24fbb7bc18a4 defconfig: add gpio-leds and hwmon/thermal
aa97a4429717 thermal: mediatek: add sensors-support
336c58dfb453 dts64: add blue LED for bananapi r64
89e77799248a build.sh: fix dts-command for r64
dfc7ec67832a defconfig: r64: add module unload and rfkill
734e1f4cee47 defconfig: r2: disable NET_SCH_NETEM
ecf847615cdd cryptodev: fix makefile for crosscompile
6d2eeaf91f12 utils: cryptodev: Fix module loading with Linux v5.0-rc5
c3b89e4625bb utils: add cryptodev 1.10
c5778ceacbbd utils: add build-script for openssl
3286019d196e utils: add wifi.sh
418b8fed6475 utils: add wmt-utils from 4.19
4386f5dab24c utils: add mmc-utils
b740cbeb8db4 utils: add docker from 4.19
901e9cab4b7e arm: dts: workaround non-working trgmii
020d0238fc87 thermal: fix thermal on bananapi-r2
8a98d219b9de usb: musb: Add support for MediaTek musb controller
d2466ebbb542 usb: musb: Add musb_clearb/w() interface
a727040290a1 usb: musb: Add noirq type of dma create interface
d63df18a2c7e usb: musb: Add get/set toggle hooks
e194477fb763 arm: dts: mt2701: Add usb2 device nodes
14e3096c0288 dt-bindings: usb: musb: Add support for MediaTek musb controller
581413d5d096 defconfig: r64: add net, ip, netfilter, cgroups
a4f87b2e9c4f readme: added known issues and some small fixes
5c2c4553ac89 build.sh: fix deb-function for r64
f80d575d2c62 travis: add r64 to build
a44483012c2f README: add README.md
c32b80ad0e05 travis-ci: add travis-ci config
fa3ca92bd497 build.sh: disable switch in name (pack,upload)
a7b193b05735 build.sh: remove r64 version code
172d70192e58 defconfig: r64: add dsa driver
12003dd8b2ba dts64: enable sata (shared with pcie1/cn8)
ad3c4417bae1 mt7622: thermal: refine MT7622-specific settings to fix cpu-temp read error
42afb7418745 mt7622: thermal: modify the common code
2fc3e69be889 arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board
f9ab06ce4246 arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board
a5f7cc192993 net: dsa: mt7530: Add the support of MT7531 switch
17bface9c5f6 dt-bindings: net: dsa: add new MT7531 binding to support MT7531
0277af939e55 net: dsa: mt7530: Extend device data ready for adding a new hardware
a2cd5296aa7e net: dsa: mt7530: Refine message in Kconfig
6cc115f15de0 dts64: split pcie-nodes
9a89cdc0a9ac pcie: mediatek: Change the usage of share register and irq for MT7622.
142162b7482b dts: arm64: add wmac node for mt7622 internal wifi
38403e44206a mt76: add mt7622 wifi firmware files
b3e9f59721bd mt76: some fixes
bdfab89b8dad mt76: update driver from openwrt to include mt7622 wifi
dd216d47a5d6 bluetooth: firmware: add mt7622 bluetooth firmware
af0eff37b489 bluetooth: mt7622: increase sleeptime in scpsys
9102fc78f03f tty: serial: don't do termios for BTIF
b314881cd538 arm64: dts: add on-board bluetooth
f6d7b145cca9 defconfig: r64: add r64 defconfig
3a466fd3d5b9 arm: dts: add pause to port6 of switch
35082b70e998 net: dsa: enable vlan without bridge on dsa user port
7e161f3e8679 mt6625l: reduce changes of watchdog driver to bare minimum
df155f139a99 mt6625l: fix out-of-tree build (i.e. when KBUILD_OUTPUT env is set)
75431d90f2d2 mt6625l: fix/impove driver debugging features
14936552268a mt6625l: fix building as a module
db89baf28a66 mt6625l: create phy only when device is added
0598d3efaf95 mt6625l: use proper decorations for module init/exit
dd464e82fe5c mt6625l: restore use of wakeup source in irq handler
922ecdd3bba1 mt6625l: Drop usage of wakelocks Android API, use wake sources instead.
f35ad18d31f9 mt6625l: mark implicit fallthrough as wanted to fix build
49a0771c25f3 mt6625l: adding wifi-related changes outside driver-directory
846b1dc5520e mt6625l: include wifi-folder
06d376a01ea0 mt6625l: add driver-folder from 5.3
324a081bd7a6 serial: 8250-mtk: Use platform_get_irq_optional() for optional irq
34dd2a86c9e3 drm: fix implicit declaration of function 'DRM_INFO'
f4ca44932ccf drm/mediatek: dpi/dsi: change the getting possible_crtc way
452b508468a4 drm: Add get_possible_crtc API for dpi, dsi
ba9c6527b05d drm/mediatek: fix boot up for 720 and 480 but 1080
ae7a8d61a108 arm: dts: mt7623: add display subsystem related device nodes
6e3f7375acdc drm/mediatek: config component output by device node port
c3db4c1163cc arm: dts: mt6323: add keys, power-controller, rtc and codec
ba012207e860 MAINTAINERS: add Mediatek shutdown drivers
559614ab0ae2 power: reset: add driver for mt6323 poweroff
1695fbd300f4 rtc: mt6397: add compatible for mt6323
546eb08339db rtc: mt6397: improvements of rtc driver
de8d437020b4 rtc: mt6397: move some common definitions into rtc.h
fc34f8ccb24b dt-bindings: rtc: mediatek: add missing mt6397 rtc
43c6973ff98e [dtsi] swap mmc and put debug-uart (2) first
a90c2da3c6eb add own files (build.sh,build.conf,defconfig) + update gitignore

as i do the most work linux, uboot, images and other support (in forum), i cannot support armbian/openwrt too

basicly mt6625l (drivers/misc/mediatek + some patches outside), hdmi, poweroff was not integrated and some tools. i guess trgmii-fix was added in the latest 5.4 dot-release after putting it to mainline

maybe it is easier to look what i have done in 5.5...there i have sqashed the mt6625l patches together, also defconfig, build.sh,...

https://github.com/frank-w/BPI-R2-4.14/commits/5.5-main

additional patches were updates to make it compatible with 5.5 itself, but they are not needed for 5.4

also you do not need patches for mt7622 (BPI-r64)

Thanks, I made one big diff 5.4-main vs 5.4 mainline for now. Removed wireguard since Armbian already has patch for that

it is the internal wifi-driver which is very huge...i cleaned it a bit, but it's to much to be upstreamed (same for mainline and openwrt)...maybe you should split wifi-changes from hdmi,thermal and the rest...something like squashing related commits together (e.g. tagged with mt6625l for internal wifi)

yes, I took a quick look and I do not see the point in including the huge mt6625l until there is native driver available. Adding a supported USB or mPCIe wifi adapter to R2 seems like a reasonable workaround for now.

I split the drivers subtree to per directory diffs for easier reviewing

Splitting wifi-driver make not much sense because all so far is needed to work,dirs alone did not...

yes, just making it easier to read/review. I'm mildly interested why the wifi driver is ~280k lines 🙂

It will not be reviewed/upstreamed in current form...it can only be in mainline if completely rewritten

Current driver is based on android driver as full combo driver with fm,gps, and many other parts. Main-parts are removed but there is still some stuff in common part and makefiles. Also there are some switches for linux/android compatibility (different libs/headers)

I'm mostly planning to review it myself, to see which parts are needed for Armbian patches

It will be more interesting why wifi client mode does not work...see discussion in forum http://forum.banana-pi.org/t/bpi-r2-internal-wifi-bt-mt6625l-kernel/4307/299

No more answer from creator of issue