Bananapi BPI-R3: Update OpenWrt to 22.03.3 SNAPSHOT

The serial port uses the following command for not

echo 0 > /sys/block/mmcblk0boot0/force_ro dd if=openwrt-mediatek-filogic-bananapi_bpi-r3-emmc-preloader.bin of=/dev/mmcblk0 mmc bootpart enable 1 1 /dev/mmcblk0

More an FYI – I just found the section of supplementary files. Unfortunately, they also do not contain packages like dataconf or wapp.

https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/

Both packages are not part of OpenWrt, but seem to be included in MediaTek’s SDK. SinoVoip’s OpenWrt 21.02 factory image is actually MediaTek SDK (which is based on OpenWrt). If you find sourcecode for any of those packages you can build them for official OpenWrt and if they are actually useful, it would be nice to have them included in https://github.com/openwrt/packages.

I managed to find some packages by tracing back their repos. Unfortunately, though, no SDK or file server could be found (yet). Though, that is quite time consuming. I might try to reach out to SinoVoip to get a complete list of the repos, all v21 images including SD or information how to build the image.

So far I found

https://github.com/kenzok8/openwrt-packages
    luci-app-ssr-plus
    tcping

https://github.com/cyijun/mtk-openwrt-feeds/tree/master/feed
    mii_mgr
    mtk_factory_rw
    mtkhnat_util
    regs
    switch

https://github.com/shangjiyu/openwrt-extra
    dns2socks

https://github.com/pexcn/openwrt-ipt2socks
    ipt2socks

https://github.com/shadowsocks/shadowsocks-rust
https://github.com/shadowsocks/shadowsocks-libev
NOTE: Not comprehensive, just move each similar here!
    shadowsocks-rust-sslocal
    shadowsocks-rust-ssserver
    shadowsocksr-libev-ssr-check
    shadowsocksr-libev-ssr-local
    shadowsocksr-libev-ssr-redir

Sill missing as partially related tom what you pointed out, being drivers:

datconf
datconf-lua
firewall
fwdd
kmod-conninfra
kmod-crypto-pcompress
kmod-mapfilter
kmod-mediatek_hnat
kmod-mt_wifi
kmod-mtfwd
kmod-warp
kvcedit
libblobmsg-json20210516
libbpf0
libiwinfo20210430
libjson-script20210516
libkvcutil
libmapd
libnl-tiny1
libopenssl1.1
libpython3-3.9
libubox20210516
libubus20210630
libustream-openssl20201210
libwolfssl4.8.1.66253b90
luci-app-mtk
luci-app-ssr-mudb-server
mapd
mtk-base-files
pdnsd-alt
python3-gdbm
sigma_daemon
sigma_dut
ted_ext
wapp
wifi-profile
wificonf

None of the packages provided by mtk-openwrt-feeds will work on official OpenWrt, nor are they needed. Let me tell you one by one:

  • mii_mgr: A low level debugging tool for Ethernet PHYs. If you really need that, use mdio-tools instead.

  • mtk_factory_fw: A tool MediaTek provides to board developers to write calibration data and MAC addresses to the board. This is not needed when using official OpenWrt, WiFi is calibrated already and the data is included in the OpenWrt image itself. Persistent MAC addresses are stored in the bootloader environment.

  • mtkhnat_util: A inspection and management tool for MediaTek’s proprietary drivers providing hardware NAT and other networking offloading functionality. In OpenWrt we use the implementation from Linux kernel sources instead which doesn’t need any additional tools. You can just use /sys/kernel/debug/ppe0/* to inspect flows and use the conntrack package to manually manage them, if needed.

  • regs: A low level debugging tool. It should really not be present on production systems, it’s supposedly used for debugging during driver development. Should you need such a tool, you can build OpenWrt from source and enable CONFIG_BUSYBOX_CONFIG_DEVMEM, that will provide you the devmem tool which has similar functionality.

  • switch: A management tool for MediaTek’s proprietary switch driver. It is not needed and cannot be used with the upstream Linux DSA implementation which just transparently provides you with a virtual device for each external port (lanX, sfp2, eth1). Hence, instead of using a vendor-specific tool, you can use just use ethtool or bridge with those virtual devices to achieve the same things. The has been the preferred way to manage switch ICs in Linux for many years now.

Also out of the missing packages many are MediaTek’s proprietary driver implementations. None of them are needed on vanilla OpenWrt, as there we got different drivers (which are free software and part of the Linux kernel):

kmod-conninfra
kmod-mediatek_hnat
kmod-mt_wifi
kmod-mtfwd
kmod-warp

Then there are many packages in the list which are simply outdated ABI versions. Up-to-date versions of libubox, libubus, libustream-openssl, libwolfssl, libopenssl, … can all be found in official OpenWrt.

Before I spend more time on explaining: What exactly are you trying to achieve?

1 Like

Thanks for taking the time to go into such details which is more than helpful. What I tried to accomplish is one thing … ensure the BPI-R3 continues to work as intended. I created a backup via GUI as usual, burned the latest snapshot, (wanted to) install all packages and restore the backed up settings.

With the many missing packages I assumed the BPI-R3 wouldn’t work as originally intended. I.e. many menu items like the, kind of proprietary and incomplete looking management of the interfaces, was inaccessible. Though, I assume this is simply replaced by OpenWRT’s default UI to manage the interfaces.

For my liking however, there are a few too many ifs. Which is why I attempted the process above. Maybe I lost myself in that process and should simply try to work with OpenWRT as I did in the past 12 years!?!