BPI R2 LEDE(openwrt) source code

is it right that mtk-bpi-r2-EMMC.img should be programmed to boot-partition? i ask because it have the same size as SD-card-image (67MB) so it seems to be the full OS and not only the preloader which is burned to boot0 when using other images (like debian, ubuntu). i see that you burn the image to both…boot0 and mmcblkx

attention: here is emmc/SD swapped instead of ubuntu/debian-images and my Kernel! with my kernel and debian/ubuntu-Images you must use mmcblk1 instead of mmcblk0

i’ve uploaded the current images again to my gdrive… https://drive.google.com/drive/folders/1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk?usp=sharing

@garywang Hi Gary, i don’t know what i did wrong. I did git clone then git checkout bpi-r2-on-lede-v1 I am still not sure if i had the right and last version.

git_checkout

build_log_part1.txt (214,6 KB) build_log.txt (252,5 KB)

Sorry i am a beginner who try to learn this all. I hope you can help me to catch me mistake.

  1. I do not have wifi devices.

  2. WAN Port is not working.

Thank you very much. Also thank you to everybody who helps me and gave answers.

banana_r2_log.txt (55,0 KB)

I have 2 times the same version of software. Do i have to delete build_dir? Did something went wrong with my build?

I see wan…what does not work? try settong a static ip+subnetmask if not done yet

4: wan@eth1

Your repo is right and actual.

Wifi maybe needs the wmt-tools initialization like in debian/ubuntu

@frank-w Thanks for your response. I tried to detect wifi configuration, but wireless file stays empty. Do you have any idea what went wrong if i build software? I do not find a new file in build_dir. WAN: DHCP is not working! I do not get ipv4 address and internet access.

If you’re using latest code, you will see the folder package/utils/wmt, if not, please pull latest code.

And we need to run below commands manually to activate WIFI device:

  1. wmt_loader
  2. stp_uart_launcher -p /etc/firmware &
  3. echo 1 >/dev/wmtWifi

Please follow link BPI R2 LEDE(openwrt) source code to use the latest SD or EMMC image.

And please note that after change /etc/config/network, a rebooting operation is required to take it effect.

We have to program Preloader which is in first 1MB of EMMC image to boot0-partition, and then program entire image to user area of EMMC.

@garywang Here are some different logs and configs of my device. I have the newest software now at my device. Can someone explain me how to get wifi working? I already followed the instruction of gary. WAN Port is working. Thank you.

serial_lede.txt (42,3 KB)

Gary wrote you how to get wifi working:

  1. wmt_loader
  2. stp_uart_launcher -p /etc/firmware &
  3. echo 1 >/dev/wmtWifi

Step 3 is for wifi-client…if you want ap-mode you must

  1. echo A >/dev/wmtWifi

And the starting hostapd,dnsmasq and defining ip-address subnet+routing

@frank-w Thank you very much. Step 3 for AP was not clear for me.

@garywang why do we need wmt_loader? I want to understand why we need this solution. Thank you.

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