OpenWrt Support for Banana Pi BPI-R3

yeah this is just after reboot i will leave it on and post when it happens

when it does, try to ping 8.8.8.8 from the router, assuming your client(s) still can access the device.

ok last night when i slept it the device seems to have restarted and lost all settings
and it boots in initram recovery so i flashed rc2 now and will see what happens

I've set up my R3 today. Impressive performance. After a few hours the R3 restarted and seem to have lost all settings. It keeps restarting and is not coming online again.
I installed to NAND.
I'll check tomorrow if I can get it back to work and will try NOR and disabled WiFi then.

Update: I'm currently doing a new try. I suspect a broken USB connection the cause of my problems.

Cooling Fan
I have downloaded the Sdcard image 23.05.0rc2 and flashed on NOR rpi-r3 with POWER LOGIC pld5010s112L cooling fan 4pin to 2pin, cooling fan it works fine while doing all other task and booting too but once booted the cooling fan stops working. How do i fix it.

There is as fan control kernel module, have you installed it?

I think its GPIO (you can also test the PWM controler), test it please and tell us the results:

opkg install kmod-hwmon-gpio

anyone tried to self-compile a custom sd-card image? I read somewhere it's impossible to use once compiled. thanks

Yes, im using a custom build.

Ok thanks. Could you please share the build base? Like rc2?

I use bananapi as Access Point. My main router is a N5105 x86.

My bananapi openwrt is a custom build with Selinux, and other mods. Openssl Wpad-openssl, Unbound and others...

Im using Snapshot version, I've not build The rc2 yet. Im waiting The final release.

I see, thanks. BTW I tried yesterday to compile from scratch (not the build online) but it failed (RC2). I will do more test during the next weeks, ciao

Post the log, and the configuration.

Are you selecting ext4? It doesnt support ext4

[BananaPi BPI-R3] - There is a way to use ext4? - For Developers - OpenWrt Forum

Hi !
Just received my BPI-R3 today, and installed 23.05.0 RC3 on eMMC.

Unfortunately it doesn't seem to recognise my SFP ONT GPON MA5671A... (Which was hacked in order to work @2.5Gbps (HSGMII) )
The MA5671A works on my Mikrotik RB4011 @1Gbps, and it connects to internet. But not in the BPI...i'm still investigating.

EDIT :
just found here that some people doesn't have trouble with this GPON Stick

Hi!

I just tried to rebuild my own configuration for BPI-R3 on 23.05_rc3 and I'm getting error :

make[3] -C target/linux install
WARNING: Image file (...)/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz is too big: 52232192 > 46137344
ERROR: target/linux failed to build.

I don' have any idea why I'm getting this message. NAND flash on this board is 128MB and there's also 8GB of eMMC, and reported size is ~50MB.

I've also re-run make target/install with -j1 -V=s and it crash at sdcard.img.gz generation:

cp /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp 2>/dev/null || true
ptgen -g -o /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp -a 1 -l 1024  -H -t 0x83  -N bl2          -r      -p 4079k@17k  -t 0x83   -N ubootenv     -r      -p 512k@4M -t 0x83      -N factory      -r      -p 2M@4608k -t 0xef -N fip           -r      -p 4M@6656k -N recovery -r      -p 32M@12M  -N install  -r      -p 20M@44M -t 0x2e -N production                -p 2048M@64M
part 17 4079
part 4096 512
part 4608 2048
part 6656 4096
part 12288 32768
part 45056 20480
part 65536 2097152
17408
4176896
4194304
524288
4718592
2097152
6815744
4194304
12582912
33554432
46137344
20971520
67108864
2147483648
cat /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp >> /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
rm /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.tmp
dd if=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=17k conv=sync
1+0 records in
1+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.000934785 s, 18.6 MB/s
mv /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cat /home/petroz/designs/openwrt_v3/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986-sdmmc-ddr4-bl2.img >> /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
dd if=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=6656k conv=sync
0+1 records in
1+0 records out
6815744 bytes (6.8 MB, 6.5 MiB) copied, 0.0132384 s, 515 MB/s
mv /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cat /home/petroz/designs/openwrt_v3/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mt7986_bananapi_bpi-r3-sdmmc-u-boot.fip >> /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
dd if=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=12M conv=sync
0+1 records in
1+0 records out
12582912 bytes (13 MB, 12 MiB) copied, 0.0259334 s, 485 MB/s
mv /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz
cp "/home/petroz/designs/openwrt_v3/openwrt/bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb" "/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
fwtool -s /dev/null -t "/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
fwtool -i /dev/null -t "/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" || :
Data not found
mkdir -p "/home/petroz/designs/openwrt_v3/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image"
dd if="/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" of="/home/petroz/designs/openwrt_v3/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb"
77440+0 records in
77440+0 records out
39649280 bytes (40 MB, 38 MiB) copied, 0.341491 s, 116 MB/s
dd if="/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta" >> "/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz"
77440+0 records in
77440+0 records out
39649280 bytes (40 MB, 38 MiB) copied, 0.277559 s, 143 MB/s
rm "/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.stripmeta"
bash: line 1: 8: Bad file descriptor
dd if=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz of=/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz.new bs=44M conv=sync
dd: failed to open '/home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz': No such file or directory
make[4]: *** [Makefile:43: /home/petroz/designs/openwrt_v3/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/tmp/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz] Error 1
make[4]: Leaving directory '/home/petroz/designs/openwrt_v3/openwrt/target/linux/mediatek/image'
make[3]: *** [Makefile:17: install] Error 2
make[3]: Leaving directory '/home/petroz/designs/openwrt_v3/openwrt/target/linux/mediatek'
make[2]: *** [Makefile:11: install] Error 2
make[2]: Leaving directory '/home/petroz/designs/openwrt_v3/openwrt/target/linux'
time: target/linux/install#397.25#126.98#298.85
    ERROR: target/linux failed to build.
make[1]: *** [target/Makefile:30: target/linux/install] Error 1
make[1]: Leaving directory '/home/petroz/designs/openwrt_v3/openwrt'
make: *** [/home/petroz/designs/openwrt_v3/openwrt/include/toplevel.mk:232: target/install] Error 2
petroz@builder:~/designs/openwrt_v3/openwrt$

Could someone shed some light why this warning occur and why I'm getting error at the end of the build?

You need to switch off initramfs, because initramfs image is limited to ~44 MiB. Not generating that means the resulting SD card image won't have a recovery OS to boot if things go wrong, but gives you the full size of the configured rootfs.

1 Like

Thanks! This limitation for initramfs size is something related to OpenWrt? If I would like to have initramfs enabled I just need to disable some of pacakges to decrease size of rootfs (and through this also the initramfs) to 44MiB?

The limit is arbitrary and could of course be adjusted. But as initramfs is mostly for recovery purposes, 44 MiB is already very huge.

1 Like

One more thing is still unclear to me. I checked the size of files generated and I can see initramfs file, but it's size is lower than 44MiB:

-rw-r--r--  1 petroz petroz 39649280 Aug 24 23:33 openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb

But the message reported was :

WARNING: Image file (...)/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz is too big: 52232192 > 46137344

I would really appreciate If you could clarify it, so I could wrap my head around this. Thanks!

Sorry, my bad, it's 32 MiB for the recovery partition and hence size limit for initramfs image.

1 Like

I'm currently on 23.05rc1. When I try to upgrade to rc2 or rc3 I get:

Can I just upgrade with "keep settings" or should I flash without it and rebuild my configuration, or ...?