BPI-R4 building with AsiaRF 7916 - Need help

I have searched everywhere and cannot find an answer to this.

I am building on Ubuntu 20.04 - Kernel 5.4(This is the only environment where I have successfully built the openwrt image from below)

When I build “GitHub - BPI-SINOVOIP/BPI-R4-MT76-OPENWRT-V21.02” with no changes to the .config it builds successfully.

I have the AsiaRF 7916 mini pci module. After some research I seen where the MT7915e module works for the AsiaRF 7916 module. If I try to do the entire build with the needed modules it fails.

Is there a way to just compile kmod-mt7616-firmware and kmod-mt7615e by their selves?

Why not using an up to date kernel? Daniel pushes his changes for r4 to official openwrt. Kernel 6.1 should support mt7916 better than the 5.4 of bpi openwrt.

I wasn’t aware official openwrt supports r4. I’ll try that. Thanks

You have to use snapshots as stable does not support it yet

I’m sorry for the questions but could you explain how to do that? Just use the snapshot? Or should I build it? Will that snapshot that’s already built for the r4 support the 7915e? If I use the snapshot do I still need the 7916-firmware?

You can download prebuilt snapshots or build yourself. As i do not use openwrt i cannot help much with details.

Thanks for the help. I built an image and flashed it. Working great with the AsiaRF7916, but no 6Ghz

With the openwrt git hub I was easily able to build openwrt for the R4. I don’t know how to get it to build the bl emmc image, emmc image, and the nand image though… What do I add to the .config to get these other images to build?

You boot from sdcard and can install from uboot menu to nand then booting from nand and install to emmc.

I follow you I think, but the uboot file for the nand is 1mb. Doesn’t seem right does it? I thought I’d have a full image to flash to the nand. When my build is finished I have a 31mb sd image and then several images for the nand and emmc that are all 1mb or smaller. When I built with the BPI openwrt git hub it created several full size images.

Are you aware of the download possibility from open wrt firmware selector? It is may be the same source that you use:

https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r4

Yes, I have that image too. That image was missing some of the modules I needed so I had to compile my own. It’s not a big deal, I just wanted to flash over to the EMMC.

Also their images are the same size as mine. I thought the EMMC image I flash would be a full size image, the ones you linked and mine are all 1mb.

The only reason I thought we needed full size images was from “Getting Started with BPI-R4 - Banana Pi Wiki

It refers to flashing the full size images, not the uboot. If I flash the uboot I still need to install the image there too some how.

Everything needed to install to NAND or eMMC is included in the SD card image. If you connect serial console you can install to SPI-NAND and then from there to eMMC using the bootloader menu. I know, 31 MiB doesn’t seem enough, but for OpenWrt terms this is a huge file :wink:

Edit: In mainline OpenWrt we do not need different images for SD card, NAND and eMMC. The same image can be used once the bootloader has been installed.

That was very helpful. Thank you.

Could you explain that a bit or link me to an explanation? I tried to find it in the OpenWRT wiki, but didn’t find anything that explains it.

Does this mean once I got U-Boot on the NAND installed, it can then install the “remaining” OpenWRT image to the other storage media?

It’s really dead simple and the only file you need from all the files created in bin/targets/mediatek/filogic is the sdcard image. The other files are meant for bootloader updates when everything is installed already.

There are generally two way to install bootloader and OpenWrt images to the device: Using OpenWrt/Linux (using command line, can be done via SSH) or using the U-Boot serial console (easy, menu driven, needs serial connection).

The generated SD card image basically also contains bootloader images for SPI-NAND and eMMC. And the same recovery (= with initramfs) and production (= using squashfs as rootfs) OpenWrt images used on the SD card can be used on SPI-NAND and eMMC.

So installation always starts with the SD card image written to a microSD which is then used to boot the R4 (and it’s the exact same procedure with mainline OpenWrt also on the R2, R64 and R3).

If you have the serial console connected it’s very easy, you just use the arrow-keys or numbers to chose the menu item Install bootloader, recovery and production to NAND. That will take care of installing everything to SPI-NAND. Then change the dip switches to boot from NAND, reset the board for that to take effect and be done if you are fine with OpenWrt running off the SPI-NAND. If you want to run OpenWrt from the eMMC, find the option Install bootloader, recovery and production to eMMC. in the bootloader menu when booting from SPI-NAND.

2 Likes

Have you got it running now with the AsiaRF card?

Which exact card do you have, AW7916-NPD?

Are you using it as a client or as an access point for other devices?

I’m thinking about buying it to have some wireless card until the official banana pi card becomes available to buy.

Yes I have the 7916 mini pci e. Compiled with 7916 firmware, 7915e driver, and wpa3.

It works as an access point or as a bridge.

1 Like

I’ve found that all of these (AsiaRF Wi-Fi 6E Module AW7916-NPD) work, using a mix of M.2/mPCIe adapters (ie. AEmPCIe, mPCIeM key, etc):

  • AW7916-AED
  • AW7916-NPD
  • AW7915-NP1
  • AW7915-AE1
  • AW7915-BMD (works in the B key slot)

The steps I’ve posted here work, with the following used for the customize package selection part:

#####################################################################################
#####################################################################################
#####################################################################################

# default packages (https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r4):

printf '
CONFIG_PACKAGE_base-files=y
CONFIG_PACKAGE_busybox=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_dnsmasq=y
CONFIG_PACKAGE_dropbear=y
CONFIG_PACKAGE_e2fsprogs=y
CONFIG_PACKAGE_f2fsck=y
CONFIG_PACKAGE_firewall4=y
CONFIG_PACKAGE_fitblk=y
CONFIG_PACKAGE_fstools=y
CONFIG_PACKAGE_kmod-crypto-hw-safexcel=y
CONFIG_PACKAGE_kmod-eeprom-at24=y
CONFIG_PACKAGE_kmod-gpio-button-hotplug=y
CONFIG_PACKAGE_kmod-hwmon-pwmfan=y
CONFIG_PACKAGE_kmod-i2c-mux-pca954x=y
CONFIG_PACKAGE_kmod-leds-gpio=y
CONFIG_PACKAGE_kmod-mt7915e=y
CONFIG_PACKAGE_kmod-mt7996-firmware=y
CONFIG_PACKAGE_kmod-nft-offload=y
CONFIG_PACKAGE_kmod-phy-aquantia=y
CONFIG_PACKAGE_kmod-rtc-pcf8563=y
CONFIG_PACKAGE_kmod-sfp=y
CONFIG_PACKAGE_kmod-usb3=y
CONFIG_PACKAGE_libc=y
CONFIG_PACKAGE_libgcc=y
CONFIG_PACKAGE_libustream-mbedtls=y
CONFIG_PACKAGE_logd=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_mkf2fs=y
CONFIG_PACKAGE_mtd=y
CONFIG_PACKAGE_netifd=y
CONFIG_PACKAGE_nftables=y
CONFIG_PACKAGE_odhcp6c=y
CONFIG_PACKAGE_odhcpd-ipv6only=y
CONFIG_PACKAGE_opkg=y
CONFIG_PACKAGE_ppp=y
CONFIG_PACKAGE_ppp-mod-pppoe=y
CONFIG_PACKAGE_procd=y
CONFIG_PACKAGE_procd-seccomp=y
CONFIG_PACKAGE_procd-ujail=y
CONFIG_PACKAGE_uboot-envtools=y
CONFIG_PACKAGE_uci=y
CONFIG_PACKAGE_uclient-fetch=y
CONFIG_PACKAGE_urandom-seed=y
CONFIG_PACKAGE_urngd=y
CONFIG_PACKAGE_wpad-basic-mbedtls=y
' >> .config

#####################################################################################
#####################################################################################
#####################################################################################

# extra packages to include - pciutils:

printf '
CONFIG_PACKAGE_pciutils=y
' >> .config

#####################################################################################
#####################################################################################
#####################################################################################

# extra packages to include - mediatek wifi:

printf '
CONFIG_PACKAGE_kmod-mt76=y
CONFIG_PACKAGE_kmod-mt76-core=y
CONFIG_PACKAGE_kmod-mt76-connac=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_kmod-mt7915e=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_kmod-mt7996e=y
CONFIG_PACKAGE_kmod-mt7996-firmware=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_kmod-mt7915-firmware=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_kmod-mt7916-firmware=y
' >> .config

#####################################################################################
#####################################################################################
#####################################################################################

I’ve been waiting a few weeks for an E keymPCIe adapter to arrive; I’m hoping (but realistically not likely, considering their intentional breakage surrounding Location Aware Regulatory) a Intel BE200 module could be coerced into working in AP mode:

#####################################################################################
#####################################################################################
#####################################################################################

# extra packages to include - intel wifi:

printf '
CONFIG_PACKAGE_kmod-iwlwifi=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_iwlwifi-firmware-ax200=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_iwlwifi-firmware-ax210=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_iwlwifi-firmware-be200=y
' >> .config

#####################################################################################
#####################################################################################
#####################################################################################

Lastly, a Quectel RM510Q-GL works well with the following:

#####################################################################################
#####################################################################################
#####################################################################################

# extra packages to include - Quectel RM510Q-GL:

printf '
CONFIG_PACKAGE_libevdev=y
CONFIG_PACKAGE_libatomic1=y
CONFIG_PACKAGE_libusb-1.0-0=y
CONFIG_PACKAGE_libudev-zero=y
CONFIG_PACKAGE_usbids=y
CONFIG_PACKAGE_usbutils=y
' >> .config

#####################################################################################

printf '
CONFIG_PACKAGE_uqmi=y
CONFIG_PACKAGE_picocom=y
CONFIG_PACKAGE_luci-proto-qmi=y
CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y
CONFIG_PACKAGE_kmod-usb-serial-option=y
' >> .config

#####################################################################################
#####################################################################################
#####################################################################################