I’m pretty sure I didn’t make that mistake since it’s not the first time I’ve had to change things like that one. But I’ll try again with a new image and the latest 5.10 from your github releases just in case.
Hi, I’ve finally had some time to tinker again with my bpi-r2, and a heatsink for the MT7615
Context: Fresh debian install from your image (downloaded yesterday). Already copied firmware files, both the ones from the link in your wiki and the customized one mentioned earlier on this thread. Kernel 5.10 from github (compiled by myself from yesterday’s 5.10-main, since the ones from github releases all hanged during “Starting kernel …”) with the default config (./build.sh importconfig).
The firmware gets loaded and the interface wlp1s0 is visible. However, I can’t interact with it. Trying to bring it up throws an RTNETLINK answers: Input/output error. Trying to enable dbdc does absolutely nothing (no errors, no changes, it just fails silently).
Looking through dmesg I’ve found a few things:
[ 7.436214] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 7.461191] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 7.469873] cfg80211: failed to load regulatory.db
My research on this one tells me that there should be a file named regulatory.db at /lib/firmware, which there isn’t. Is it related to why my iw reg set gets reset to 00 on each reboot?
The last line (Failed to get patch semaphore) I’ve seen it on this forum. However, the apparent solution was to compile branch 5.10-wifi, which hasn’t been updated since last year. Another proposed solution was to revert the semaphore patch, which I’m not sure where to start.
Also I’ve noticed that 5.10-main does not contain the driver mt76_new, but only mt76. Is this intentional?
regdb is not critical, but makes problems when using 5ghz…i guess you need to install regdb and maybe change your country…but this is step 2
furst you need to get the card working as Failed to get patch semaphore is critical…mhm, but you see wlanX for mt7615, right?..
you can try disabling bluetooth and reload mt7615 module…i thought this error was fixed…please disable eeprom-load (/lib/firmware/mediatek/mt7615_rf.bin) for testing the bootup…
for prebuilt kernel-images from github-releases…have you changed anything in you local repo to get it working? i guess serial-device is changed in your uboot-config
mt76_new is only in 5.4, because i merged mt7622/mt7615 from openwrt, 5.10 has these already included
furst you need to get the card working as Failed to get patch semaphore is critical…mhm, but you see wlanX for mt7615, right?..
Yes (the MAC address is valid too, but has been hidden):
root@bpi-r2:~# ip a
9: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
you can try disabling bluetooth and reload mt7615 module…i thought this error was fixed…please disable eeprom-load (/lib/firmware/mediatek/mt7615_rf.bin) for testing the bootup…
How can I disable bluetooth? There’s no kernel module loaded named bluetooth or bt-something.
For the eeprom-load, if you mean removing the mt7615_rf.bin file, it doesn’t work (my first attempts didn’t have it). Still, I’ll try in a moment again, just in case.
for prebuilt kernel-images from github-releases…have you changed anything in you local repo to get it working? i guess serial-device is changed in your uboot-config
Not that I’m aware. Just git clone, cd, git checkout, ./build.sh importconfig, ./build.sh config to check if I see anything wrong (there was nothing wrong of course), and finally ./build.sh and then after a few minutes I selected the deb package.
mt76_new is only in 5.4, because i merged mt7622/mt7615 from openwrt, 5.10 has these already included
I see, thanks for confirming it.
EDIT: Wait, there is no mt7615_rf.bin file. The nearest one is the mt7615e_rf.bin, but if I remove that one, it doesn’t even load (it tries but fails).
The error for eeprom is really a warning and can be ignored. I wanted to leave out this as issue…
I guess bluetooth is the problem,can you try with CONFIG_BT=m?
Semaphore error means that firmware (not eeprom) cannot be loaded (this is done after eeprom) as for loading firmware a lock (the semaphore itself) must be aquired…this is probably locked by another process (bluetooth). Seen this only on r64 till now
was that the deb from build.sh-choice or the make_deps? first were my created debs the other is the linux-way (on github).
i guess the first one which creates entries in uenv.txt (linux way does not, you need to add uenv.txt entry manually)
you could try --force-all option for apt (maybe similar for dpkg available) to ignore errors in postrm script (this tries to delete the entry in uenv.txt)
was that the deb from build.sh-choice or the make_deps? first were my created debs the other is the linux-way (on github).
The one from the ./build.sh menu.
i guess the first one which creates entries in uenv.txt (linux way does not, you need to add uenv.txt entry manually)
Most probably.
you could try --force-all option for apt (maybe similar for dpkg available) to ignore errors in postrm script (this tries to delete the entry in uenv.txt)
My uEnv.txt only contains kernel=uImage_5.10.25-main. Remember on my previous posts from this thread that I had a problem where uEnv.txt didn’t exist? Well, it still doesn’t (didn’t) exist on your image when I dd'd it.
It seems when I installed the new kernel from the dpkg, the postinst script created one for me (/var/lib/dpkg/info/bananapi-r2-image-5.10-main.postinst), by adding a single line.
When trying to remove it, the postrm script tries to remove the line that postinst added, however grep fails with an error code of 1 as there are no matches since there are no more lines than the one it just filtered out…
And… yes, that was it! I just tried adding another line to uEnv.txt and it was removed successfully.
I’ve just rebooted to the kernel without the bluetooth module. The result is: exactly the same as with bluetooth enabled :C.
EDIT: Just noticed that systemd-modules-load.service fails to load at boot. It seems it’s because of /etc/modules-load.d/cryptodev.conf (which contains blacklist cryptodev) trying to blacklist a module that doesn’t exist. It’s probably not related, but I thought I could mention it.
based on code it should be displayed max 10 times with 0.2s delay…you could try to increase the delay a bit, but i gues somewhere the semaphore is not released (maybe on Patch step before firmware)
i guess mt7615_load_patch does not release semaphore so mt7615_load_ram failes…you can try adding printk’s around these functions (and in mt7615_load_ram)