Bpir2wrt Openwrt-Fork for BPI-R2


Hello, I am a novice just touching openwrt, I am using Google translation. I’ve inserted MT7612E MiniPCIE. I’m brushing bpir2wrt and restarting indefinitely. I don’t know why the

bpi-r2.log (108.8 KB)

(Frank W.) #22
set_p2p_mode_handler [wlan_gen2]

Looks like internal wifi-driver.have you same problem without pcie-card?

(Andrzej) #23

I still can’t find ‘mtk-bpi-r2-SD.img’ and ‘mtk-bpi-r2-EMMC.img’ files in whole build directory. Only what I can find is ‘openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-sd.img’ and ‘openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-sd.img’


(Tim X) #24

That’s is the 17.0x lede branch. Thus, very old.

Isn’t there anything from the OpenWrt 18.06.x branch available … which works?

(Peter Piper) #25

Yeah, these are the files to use with sd card or emmc on bpir2. Its not a router its a SBC so we stick to “images”(img) not to “binaries”(bin). Flash image to sdcard and boot. it should run out of the box


! No hdmi you need a serial to usb adapter or connect via ethernet to luci! Choose luci admin full in make menuconfig to have it included into image( “*” not “m” ) then you can connect via browser to your openwrt bpir2.

(Peter Piper) #26

No its 18.06.01 source and kernel 4.14.75. You shouldnt use openwrt when you are not used to it. BPI-R2 is not greatly supported!

(Peter Piper) #27

I am cloning the repository again to see if i missed to commit something. My last image 14 days ago is running with wmt.

What i have done today:

mkdir bpi-r2

cd bpi-r2

mkdir testing
git clone https://github.com/eliasmagn/bpir2wrt.git
cd bpir2wrt
./scripts/feeds update -a && ./scripts/feeds install -a
make menuconfig

this is my config: https://pastebin.com/fauk6xyY

ionice -c 3 nice -n15 make -j18

now i am waiting and will post the result and further steps later…

later is now:

dd if=/home/($whoami)/bpi-r2/testing/bpir2wrt/bin/targets/mediatek/mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-sd.img of=/dev/sdk

now i am starting the bpi-r2 it is running i have a error in wlan0 device naming and wmt but no kernel panic!

(Maikeul K) #28

Hi, Iv’ve tried to make my own img and done as like you but i’had error:

“package/Makefile:107: recipe for target ‘package/feeds/packages/jool/compile’ failed” Don’t know whats happened. Thanks if you can help me. regards

(Peter Piper) #30

Can you post the content of net/jool/Makefile and try a

make V=s

and post error massage

edit: dont post the complete output, only the errors for jool, perhaps 10 to 20 lines!

(Gess) #32

Thank you. Installing on EMMC working fine, but memory limited to 512M:

free -m
             total       used       free     shared    buffers     cached
Mem:        517232      99276     417956       1292      46776      18300

And root on EMMC 256M only:

df -h  |grep overlay
/dev/mtdblock7          251.1M     12.1M    239.1M   5% /overlay
overlayfs:/overlay      251.1M     12.1M    239.1M   5% /

(moore liu) #33

please check below patch has applied to your code base, thanks.


(Maikeul K) #34

Thanks for Answer her is the code

Error Code of net/jool

/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful/fragment_db.c:96:14: note: each undeclared identifier is reported only once for each function it appears in /home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful/fragment_db.c:97:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ scripts/Makefile.build:328: recipe for target ‘/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful/fragment_db.o’ failed make[5]: *** [/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful/fragment_db.o] Error 1 Makefile:1525: recipe for target ‘module/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful’ failed make[4]: *** [module/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/mod/stateful] Error 2 make[4]: Leaving directory ‘/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.75’ Makefile:113: recipe for target ‘/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/.built’ failed make[3]: *** [/home/michael/bpi-r2/bpir2wrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/jool-9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a/.built] Error 2 make[3]: Leaving directory ‘/home/michael/bpi-r2/bpir2wrt/feeds/packages/net/jool’ Command exited with non-zero status 2 time: package/feeds/packages/jool/compile#0.76#0.25#1.64 package/Makefile:107: recipe for target ‘package/feeds/packages/jool/compile’ failed make[2]: *** [package/feeds/packages/jool/compile] Error 2 make[2]: Leaving directory ‘/home/michael/bpi-r2/bpir2wrt’ package/Makefile:103: recipe for target ‘/home/michael/bpi-r2/bpir2wrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile’ failed make[1]: *** [/home/michael/bpi-r2/bpir2wrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2 make[1]: Leaving directory ‘/home/michael/bpi-r2/bpir2wrt’ /home/michael/bpi-r2/bpir2wrt/include/toplevel.mk:216 : la recette pour la cible « world » a échouée make: *** [world] Erreur 2

(Frank W.) #35

please set


before running build-script and use code-indentation (select your output and press “<>”-button)

(Gess) #36

No, it didn’t help. I think trouble in vmalloc parameter in boot config.

(Gess) #37

I committed small build helper. You can try it https://github.com/Mihail-samoylov/openwrt-bpir2-build-helper

(Peter Piper) #38

Thx, for your work. I myself always work with debian. Its the de facto standard for compiling in my perspective. Ubuntu is a debian derivate, i always use a minmal debian stable to minimize errors and ssh into it! Docker is fine, Virtual Machines are less powerfull, but better to maintain and they are easily portable to a new machine or a diffrent host os! of course … my opinion. I would recommend to use a debian vm, like i do!

Your Dockerfile is NICE! I like it very much!

Samoylov changed it in dockerfile… but the others should not use

ionice -c 3 nice -n15 make -j18

if they do not have enough ram and threads or cpus in their system. better use

ionice -c 3 nice -n15 make -j3

this can cause errors as well!

@samoylov You could take a look at your patched DTS file in some (dont know which it was, take a look in the kernel sources or you’ll find the directory with a cat build.log | grep dts ) subdirectory of build_dir to see if the RAM patch was merged correctly take a look–> after the build process and before the

make dirclean

I did’nt configured uboot for emmc boot so you wont have more than 256mb as root. i Take a look into it. I need to know how you booted to emmc and how you flashed the image to automate the process ?


(Peter Piper) #39

ok i have to admit the patch directory is quite messy!! i should clean it up… should be patch 0229-fix-memory-size…

--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -22,7 +22,7 @@
 	memory {
-		reg = <0 0x80000000 0 0x20000000>;
+		reg = <0 0x80000000 0 0x80000000>;
cpus {

(Gess) #40

Just following official instructions. Flash sd with openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-sd.img,insert sd into BPI, boot (don’t forget insert additional mini-usb, connected to any power source)

  1. Connect ethernet to any lan port, set IP on your computer and ssh root@ without password Run commands:

dd if=/openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-emmc.img of=/dev/mmcblk0

echo 0 > /sys/block/mmcblk0boot0/force_ro

dd if=/openwrt-mediatek-mt7623-7623n-bananapi-bpi-r2-squashfs-sysupgrade-emmc.img of=/dev/mmcblk0boot0 bs=1M count=1

mmc bootpart enable 1 1 /dev/mmcblk0

mmc extcsd read /dev/mmcblk0 | grep PARTITION_CONFIG

Last command should show [PARTITION_CONFIG: 0x48] Power off, remove SD-card and power on. Then switch your computer to dhcp and you should receive IP from BPI

(Gess) #41

I’ve tried build https://github.com/eliasmagn/bpir2wrt/pull/5 , but with no success, still 512M.