BPI R2 LEDE(openwrt) source code

The reason why we need the wmt_loader is that the driver of wifi(MT6625) is from Android system which is provided by vendor, and the tools(wmt_loader and stp_uart_launcher) are requried, and we don’t have enough resource to re-write the driver, so that both tools are still required under ubuntu and openwrt.

Please let me know if you have any question.

Thanks Gary

I try to get wifi working. But I fall. Here is the output and what i type in ssh.
I just try the first step. Is that ‘fall’ is normal? Or something wrong in my firmware?

root@LEDE:~# wmt_loader
init combo device
Opened combo device
get device id : 30243
set device id : 30243
do module init: 30243
failed to init module
root@LEDE:~#

The time when I type it in output is [59.080349]

minicom_2018-1-18_20-35-13.txt (48.9 KB)

Please still try other commands, I don’t have enough time to fix the log of error.

The last failed is ok because gps is currently not working. ignore that and run the stp-launcher :slight_smile:

@frank-w @garywang I’m sorry. :disappointed_relieved: It works in client mode! But not ap mode. I can see interface “ap0” in “ip l”. But I can not get it up in luci->network->wireless. And once I use wpa_supplicant to create ap. I return a lot of errors and just reboot itself.

Here is the log and which i type in ssh
minicom-18_03_41.txt (59.5 KB)
sshtype.txt (3.4 KB)

Key time:

[    62.411966]    wmt_loader
[    74.955550]    stp_uart_launcher -p /etc/firmware/ &
[    86.949227]    echo A >/dev/wmtWifi
[  176.575491]    wpa_supplicant -Dnl80211 -iap0 -c/etc/wpa_supplicant.conf

/etc/wpa_supplicant.conf:

network={
    ssid=“BRC”
    proto=WPA
    key_mgmt=WPA-PSK
    psk=“12345678”
}

do not use wpa_supplicant if you want to use AP-Mode…it must be deinstalled to get it working

http://fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#internal

I built me an image and copied it to R2. Now u-boot finds the image but cant boot…

Could me help someone?

screenshot

thx

how did you copied the image to SD-Card? did uboot not boot directly from sd-card? why do you enter the uboot-console?

try printenv in uboot-console search for the default boot-entry and use that command

in my images “boot”-command does also not work…but the “run bootx” works

after some more trys I got it working/booting

@garywang is anyone pushing your changes upstream to openwrt so that next release will include them?

I would like to see this happen, your tree is a bit behind already. Openwrt updated to the kernel 4.14. I don’t want to duplicate efforts but if nobody is doing this then let me know.

Thanks

Hi dsiq

We don’t have plan to push our changes to upstream, our goal is to make current openwrt release to be stable. You know that it will take serval weeks to support latest openwrt(kernel 4.14), I don’t think this is worth for us.

Thanks Gary

I’m suffering from the same error. Please help me how you solved that problem. T…T

I am curious what is the current state of (official) OpenWrt on the R2? I see that they are regularly publishing images, but they claim the latest OpenWrt that supports the BPI R2 is 19.07.9?

Has the MT6625 driver made it into OpenWrt proper, or is it only in BPI’s older OpwnWrt versions? I don’t see it in the current OpenWrt source tree so I’m assuming it’s not there, but then I haven’t fully figured out their build system. If it’s not there is there any ongoing effort to getting it included?

I see no official mention of using the Mediatek Smart Phone Flash Tool to flash the eMMC image. Have people used this tool with much success? OpenWrt’s device pages for the R2 don’t mention it, but they seem to publish a scatter file for it with every release.

Afair @dangowrt / @dwmw2 wrote image building scripts,but imho they are not avalable in main branch.

Mt6625 driver is too huge and dirty to be ever merged to official openwrt.

I have not seen any way using a flashtool for r2

The new images will be part of the upcoming 22.03.0 release, we branched off a couple of days ago.

You can already download pre-release images from

https://downloads.openwrt.org/releases/22.03-SNAPSHOT/targets/mediatek/mt7623/

Soon there is going to be release candidate images and then the official release will follow in a couple of weeks.

The MT6625 WiFi driver is not supported in any official version of OpenWrt and will need porting in case you want to use it.

Porting can be found in my repo, just use the main branch for target kernel version (maybe newer one if there are additional patches in openwrt). But imho it is tricky to get it into the build system

Perhaps we can make a custom repo that contains the wifi driver as a package. Then that repo can be added to a stock OpenWrt /etc/opkg/customfeeds.conf.

This flash tool works quite well. You can skip having any sort of MicroSD card image and write directly to eMMC. The stock OpenWrt BPI R2 21.02.02 image will flash and boot this way. Though right now I’m having a problem getting WAN DHCP to work, but I’m still in the early stages. (EDIT: DHCP works fine, was a dumb error, besides not having the MT6625 driver, the current 21.02.2 image seems to work just fine)

I can post full instructions if needed. You can mostly follow the debricking instructions on OpenWrt’s u7623 board wiki page and just use the scatter file, preloader, and uncompressed BPI R2 images.

I’m having trouble getting your repo to build - I was able to work around some of the sources not downloading, but the MT6625 package builds as an empty package.

Maybe you have defined driver as builtin and not as module? Do you have any build errors?

As i said i don’t know openwrts build system very well

just remember that you need additional files (wmt-tools, config, firmware-blob) to initialize the mt6625 wifi. depending on the openwrt-source you may need a newer version of the driver (till 5.17 in my repo in the main branches)…openwrt has many backportings so maybe some api-changes from recent versions are in openwrts “5.10”