[BPI-R64] OpenWRT kernel 5.4.40 running from eMMC

Have you tried this?

The R64 is fully supported by mainline OpenWrt by now, no need to start off with outdated vendor-modified version of OpenWrt. You can follow the documentation on Build system setup regarding the prerequisites.

Then clone OpenWrt and launch menuconfig

git clone https://git.openwrt.org/openwrt/openwrt.git/
cd openwrt
scripts/feeds update
scripts/feeds install -a
make menuconfig

Then select R64 board and packages you would like:

Then trigger build using make -j$(nproc) and wait for a long time :wink:

1 Like

A third option, like option 1 is to disable the current limiting by shorting pins 2 and 3. i.e. using a 0 ohm Resistor for R217 the ISET. This leaves the EN pin still functional so the reboot works. I was successful with this approach.

My ugly solder job:

1 Like

Hello guys. It’s been some time since I tried to make use of BPI R64 and I fell off track. Could somebody fast forward me on recent updates regarding OpenWRT support?

  1. Does mainline OpenWRT produce complete images for both SD and eMMC? Or I still need to extract the preloader, ATF and UBoot from BPI repository and then take compiled kernel and rootfs from OpenWRT and flash them manually?
  2. Is it possible now to use squashfs or it’s still necessary to choose ext4 rootfs?
  3. Are EEPROM patches for MT7615 and MT7622 still needed or you have found a way to place EEPROM in a file/on a partition?
  4. Does Bluetooth work with MT7615?
  1. Installation to eMMC (and SPI-NAND) can be done using the bootloader menu when booting from SD card and also triggered to happen on next boot my modifying bootloader environment from inside OpenWrt. See https://openwrt.org/toh/sinovoip/bananapi_bpi-r64_v1.1#sd_card_installation

  2. The opposite is true now: There are only squashfs images, the same image can be used on SPI-NAND, eMMC and SD card for sysupgrade.

  3. mt76 still doesn’t supper loading EEPROM for MT7622 built-in 802.11bgn WiFi in a meaningful way for this board, you will need to patch to load from file.

  4. Yes, Bluetooth works out of the box.

1 Like

mt76 still doesn’t supper loading EEPROM for MT7622 built-in 802.11bgn WiFi in a meaningful way for this board, you will need to patch to load from file.

EEPROM can be flashed to SPI-NAND and mt76 can load it from there as intended:

Thank you.

This trick won’t work for MT7615, right? I still have to hardcode firmware in its driver?

AFAIK, mt7615 boards have own internal EEPROM and no other data required from system, maybe I’m wrong.

Mt7615 has own eeprom in its efuse,but if tx power needs to be increased you have to load modified eeprom. Afair it is limited to 19db

Thank you, but I still need to load EEPROM for MT7615. As we discovered in this thread my board doesn’t have any preloaded calibration data.

Then you need to add function for loading eeprom from file,this is how i did it:

Thank you. I will try it.

/lib/firmware/mediatek/%s_rf.bin is the path for EEPROM file? What does %s stand for? For MT7615 File should be named mt7615e_rf.bin?

P. S. Looks like you all made a great job and quite a progress since autumn.

right %s is placeholder for driver name (dev->dev->driver->name). for files/filenames see https://github.com/frank-w/BPI-R2-4.14/commit/d1bc0e34c56d00663cd36b2242a924738924ef8c

Do I need to make these changes to eeprom.c only or to mt7615/eeprom.c too?

afair load-code is only in “global” eeprom.c, chip-specific is only interpretion of fields…just try to apply my patch and place files in your filesystem. make sure mt76 is compiled as module.

Thank you for your wonderful job on making OpenWrt work.

However I’m stuck in a rather ridiculous situation: I’ve applied patches from @frank-w to load firmware from files, compiled OpenWrt, installed it on an SD card (and eMMC), have a working board with working WiFi, but it doesn’t have LUCI or uhttpd. Even though I’ve checked LUCI in menuconfig as a module. Could you give some advice on where to dig further?

Is uhttpd listed when you call: opkg list-installed?

Not unless I choose LuCI as built-in in menuconfig [*] indtead of [M].

That’s the intended outcome then. If you want things to end up in the generated rootfs, you need to select them as * ie. built-in in OpenWrt’s menuconfig. Otherwise the build system will generate .ipk packages but will not install these packages in the generated image.

Thank you.

That means that I need to create my own http server with all the packages? Or I can use mainline repo?