BPI-R64 new image: Debian10 and Ubuntu18.04 Linux kernel 5.4.0 2020-05-08

BPI-R64 new image: Debian10 and Ubuntu18.04 Linux kernel 5.4.0 2020-05-08 update

image download:

debian 10

Ubuntu 18.04

BPI-R64 Linux kernel 5.4 BSP

Can you provide instructions on how to flash the img file to eMMC? There is only one file in the zip archive

unzip -l 2020-05-08-debian-10-buster-lite-preview-bpi-r64-5.4-sd-emmc.img.zip 
Archive:  2020-05-08-debian-10-buster-lite-preview-bpi-r64-5.4-sd-emmc.img.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
7650410496  2020-05-02 09:10   2020-05-02-debian-10-buster-lite-preview-bpi-r64-5.4-sd-emmc.img
---------                     -------
7650410496                     1 file

Also kindly provide instructions how to run it from an SD card too.

I guess like all images…dd it sdcard boot it, prepare emmc (partitions in uboot,flash preloader to block0). And then write image to emmc userpart

I appreciate the feedback Frank. I have not gained enough knowledge to execute the steps based on the terse description. If this has been described in detail for a novice, in some other thread, please let me know. Else, if the steps can be enumerated here, it could be useful for me and future novices.

Since the image is single img for SD and emmc, i don’t know what parameters to use in dd command for writing to SD and what to use for dd to emmc.

Also, it seems that emmc needs to be partitioned into multiple partitions. But how to do that, what should be the partition sizes? Do we have to split the img file into subimages for each partition?

Sorry, but i guess this just exhibits my lack of knowledge in this area.


See emmc section…there is a preloader and description how to partition emmc from uboot…you need debug-uart to do the uboot-part

I’ve installed Ubuntu 18.04 image on SD card (by simply executing dd if=imagefile.img of=/dev/sdcard) but have encountered several issues.

(1) I can’t connect to WiFi. I’ve created /etc/netplan/wireless.yaml file, issued netplan generate && netplan appy, but no connection is made.

[root@bpi-r64 ~]# cat /etc/netplan/wireless.yaml 
  version: 2
  renderer: networkd
      dhcp4: yes
          password: myPassword

Wireless interface is up and running.

wlp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:0c:43:26:60:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And 6dBm issue seems to be fixed for mt7615.

[root@bpi-r64 ~]# iw dev
        Interface wlp1s0
                ifindex 18
                wdev 0x100000001
                addr 00:0c:43:26:60:00
                type managed
                txpower 20.00 dBm

(2) Furthermore I have multiple Failed to start Login Service errors on boot:

[ **FAILED** ] Failed to start Login Service.
See 'systemctl status systemd-logind.service' for details.

[root@bpi-r64 ~]# systemctl status systemd-logind.service | less
?.. systemd-logind.service - Login Service
   Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-06-01 03:49:13 CDT; 28min ago
     Docs: man:systemd-logind.service(8)
  Process: 825 ExecStart=/lib/systemd/systemd-logind (code=exited, status=1/FAILURE)
 Main PID: 825 (code=exited, status=1/FAILURE)
   Status: "Shutting down..."

6?.. 01 03:49:13 bpi-r64 systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
6?.. 01 03:49:13 bpi-r64 systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 5.
6?.. 01 03:49:13 bpi-r64 systemd[1]: Stopped Login Service.
6?.. 01 03:49:13 bpi-r64 systemd[1]: systemd-logind.service: Start request repeated too quickly.
6?.. 01 03:49:13 bpi-r64 systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
6?.. 01 03:49:13 bpi-r64 systemd[1]: Failed to start Login Service.

(3) Serial console is somehow distorted. I have question marks instead of symbols and launching vi or nano results in console being reduced to upper-left corner.

hi, i guess mt7622 wifi-driver does not yet support client-mode…this was afair already mentioned in the wifi-driver-thread, but no further commented. did not found it yet.

mt7622 wifi-driver does support client mode.

1 Like

is this a driver-limitation or is mt7622 wifi-hardware not capable of this?

Thanks @frank-w, thanks @Ryder.Lee. But here I’m trying to connect with mt7615e card.

BTW I can successfully connect to my wifi network with both mt7622 and mt7615 cards on OpenWRT build ([BPI-R64] OpenWRT kernel 5.4.40 running from eMMC). Does OpenWRT use a different driver?

Found discussion here and it looks like we fixed it by adding rfkill to kernel

Thanks @frank-w. That means that we have to wait for @sinovoip to fix this in future images?

BTW I’m kinda lost in various drivers discussions. Could you please clarify why mt7622 and mt7615e drivers behave so differently in different images? I. e. in OpenWRT we have 6dBm limit, in BPI’s LEDE image mt7615 makes the kernel crash, in this image it doesn’t support client mode. Are those different drivers? If @sinovoip claims full mt7615 support in its images why can’t we have support in other builds?

I don’t know if openwrt of official image uses another driver. Imho 6dbm limit is not really fixed…only workarounded. Imho it needs only some time to fix the problems and then replace kernel in your image with fixed one

Will reporting a “6dBm bug in mt7622 and mt7615” on OpenWRT bug tracker be helpful?

You could try…it does not hurt

This is not a software bug. The root cause is the efuse or eerpom on your card is empty, so you must dd calibration data into the corresponding region.


Thank you for clarification. Seems like I’m now starting to understand how things should work.

So basically I have two options:

  1. Hard-code both EEPROMs into eeprom.c as suggested by @niebieski20. Basically add MT7615E1_EEPROM.bin contents to the file I posted here.
  2. A right and elegant solution. Write EEPROMs to factory partition of eMMC as described by @nagi in this post. But how can I write both mt7622 and mt7615 EEPROMs into that partition?

Am I getting this right?

a third option (and imho the best) will be using a file in /lib/firmware/mediatek loaded by driver…for this driver needs to be compiled as module to that filesystem is ready on driver-init

hi, The following problems occurred when I tried to compile the driver in this image

Can you tell me how to solve it?

I had these, too. Sorry for the late reply, but maybe this will help others. The odd character issue is because the system locale is set to zh_CN.UTF-8. For me, the fix was to change the entry in /etc/default/locale to “LANG=us_EN.UTF-8” (no quotes). No fix required if zh_CN.UTF-8 were your correct locale, of course.

To fix the logind errors, set /var/run to be a symlink to /run. (cd /var && mv run run_old && ln -s /run /var/run) and reboot.