BPI-R4 building with AsiaRF 7916 - Need help

The mPCIe variants also just work in the mPCIe slot(s), although I’ve only tested in the one slot (center of the board, vs closer to the edge), and I believe there may be issues with the second slot currently

Steps from the other thread, sans-cpu fan duck-punch/monkey-patch, to be easier to follow:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt/

./scripts/feeds update -a
./scripts/feeds install -a

curl "https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/config.buildinfo" > .config
make menuconfig # only changed: `Target Profile: Bananapi BPi-R4`
make defconfig

make -j $(nproc) toolchain/{clean,install}
### Executed in   34.42 mins

make -j $(nproc) target/linux/{prereq,clean,download,prepare}
make -j $(nproc) target/linux/compile
### Executed in  342.24 secs

# ensure `.vermagic` value matches, so `opkg` works with snapshot packages:
find build_dir/ -name .vermagic -exec cat {} \;
curl -s "https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic.manifest" \
    | sed -n 's/^kernel - .\+\(-\|~\)\([a-f0-9]\+\)\(-r[0-9]\+\)\?$/\2/p'

# customize package selection in resultant image (default packages can be retrieved from https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r4 ):
printf '
CONFIG_PACKAGE_...=y
' >> .config

make defconfig

# save customized `.config` for later builds:
./scripts/diffconfig.sh | awk '!seen[$0]++' > diffconfig
mv diffconfig .config

# customize files:
mkdir -p files/
#...

# customize first run image configuration:
printf $'#!/bin/sh

# fill in with `uci set ...` values from `uci show`

' > files/etc/uci-defaults/99-custom
chmod 0644 files/etc/uci-defaults/99-custom

# expand config:
make defconfig

# download stage:
make -j $(nproc) download
### Executed in   36.62 secs

# build:
make -j $(nproc) world
### Executed in  664.17 secs

This is super useful. Thank you for this! My only issue doing this on redhat 9.2 is the uci-defaults folder does not exist. Not sure what i need to install to get UCI on redhat 9.2.

Edit: Ended up using Debian 12.5 (bookworm). Not done yet, but so far looks better.

Last time i tried i got stuck on first boot from the SD card. Where it was trying to initialize/connect IPv6. Could not find an option to disable IPv6 in the menuconfig. I’m thinking of just running it via sd card, and maybe in the future switching to eMMC.

I also have one of the AsiaRF 7916 cards i’ve been trying to get working on the BPI-R4.Its a fun challenge. I have a couple of the MT7615’s on order. As well as the metal case for the BPI-R4.

Have you tried “make distclean” before updating the feeds? Had this in present when updating source…it was relying on older versions.

Do you use my debian script/image? I had no issue with ipv6,but not propagated in my lan. I guess you can disable it in systemd-networkd config.

I believe i have, but no harm in trying again.

Here is s a screenshot of where i keep getting “stuck”. Or maybe its a normal boot, but since i dont have control over the console its not passing.

I’ve been using Putty. I’ll try something like RealTerm.

Yep, after i sent a break, it loaded in fine. Sorry - i am kinda new to this type of thing.

Quick update. I did manage to get it up and running. So far so good! Now to wait for the wifi7 modules. Who know when they might be released to the public…

Hey Frank, You mentioned something about a script. Do you have a build script for the r4? I couldn’t find it if you do.

I am running into loads of issues, and i am no pro at this. I am willing to try anything at this point :slight_smile: .

And If I don’t have the serial cable? Is there any way to write to emmc? I’ve already wrote to eMMC .img made for that, but they are very old and If I try to sysupgrade from them nothing gets updated. Also tried to just wrote the SD .img to the eMMC but that doesn’t work So Did you know how SD .img could be transformed on eMMC .img?

you should have one :wink: in case anything does not boot or initialize correctly it is the only way to look whats wrong…expecting ssh is working is dangerous…boot can hang or network wrongly configured…and you are not able to solve…invest the 2€ for a usb2serial (ftdi to avoid some other issues)

he knows (i’m not as openwrt does some things differntly than my debian/ubuntu), but emmc needs some more things to be changed (e.g. different bl2 in boot0 block, other dt overlay to have the emmc settings). And you cannot boot sdcard and flash emmc because mt798x have only 1 mmc controller…so either sdcard or emmc…you have to bootup from spi (nand/nor) to access emmc

Just want to comment that finally I bought a cable Usb Ttl Ftdi Ft232rl locally and once have it installing the new images was a piece of cake.

As I said previously. How thoughtful of them to not mention that a serial cable was a must-have accessory and bought everithing in the same package.

Now I have the latest snapshot running from eMMC and some new problems arises (ETH ports stoped working, filesystem do not use all the eMMC space, ssh connection randomly gets disconnected, etc) But I will investigate and ask in another specific threads if needed. Thanks for your support