BPI-R2 new image: OpenWrt 18.06.2 source code fork

That’s “on my list” and had been partially done in private testing repo but I hadn’t been able to test if things are flying fine when updated to latest 18.06 upstream release/branch so it is yet to be tested and then pushed to public repo.

These are different. v18.06.2-bpir2-rc1 is a tag and image you get when building it is expected to be 1-to-1 compatible with the upstream release v18.06.2. I.e. any package available out there in the Internet that was built for upstream openwrt 18.06.2 will be compatible with the image built from v18.06.2-bpir2-rc1 tag (with a possible exception being binary kernel-related deps), openwrt-18.06-bpir2 is a branch that is tracking (well, not yet, but is expected to be) upstream branch openwrt-18.06. This one is where upstream maintenance of 18.06.x releases is going on. So it you’re up to getting freshest-and-greatest developments on stable branch - using openwrt-18.06-bpir2 is a good choice. For a more safe (and binary compatible with third party packaged) side building from tag v18.06.2-bpir2-rc1 is a better choice. I don’t track master openwrt branch for now - it is an unstable territory and I don’t have enough spare time to do the required maintenance when tracking that one.

Nope, libssh2, there’s such a thing out there in the wild :-).

I tried this but it could’nt find this tag.

Depends on three things: (1) speed of your internet connection - a lot of source tarballs are downloaded in process and are placed into dl folder; (2) speed of your disk subsystem, good idea is to use fast SSD as a playing ground for the build; (3) CPU speed and amount of available RAM - these are obvious. make -j4 means that buildroot will try to build packages 4 at once so if you’ve got more than 4 core CPU good idea would be to use higher number in make command. On the other hand there are interdependencies between packages and parts of toolchain so buildroot won’t always be able to utilize all cores. For my rig (Ryzen 2700X, 64Gb of RAM, Samsung 970 NVMe as a storage for build area, 30MBit internel connection) typical time to build OpenWRT from the ground up is like 20-30 minutes.

Well, tag is obviously in there: https://github.com/lexa2/openwrt/commits/v18.06.2-bpir2-rc1 . What does git tag | grep v18 show when executed inside your clone?

Ah, and just to be sure: had you executed lines below before proceeding with make menuconfig?

$ { echo CONFIG_TARGET_mediatek=y; echo CONFIG_TARGET_mediatek_mt7623=y; echo CONFIG_TARGET_mediatek_mt7623_DEVICE_7623n-bananapi-bpi-r2=y; } > .config
$ { echo CONFIG_DEVEL=y; echo CONFIG_CCACHE=y; } >> .config
$ make defconfig

Ofcource. I did with V=s and it compiled successfully. I will try it to boot and get back to you.

HAHAHA Thanks for the a detailed information. Much Appreciated.

Booted fine. But I cant test the network as I don’t have any network cables at home. Wifi is not available on this build, Also I cannot connect my phone on USB tethering mode.

root@OpenWrt:/# uname -a
Linux OpenWrt 4.14.123 #0 SMP PREEMPT Fri Jun 7 09:50:53 2019 armv7l GNU/Linux

So I will have to wait till Saturday to test it in detail and install lucy. Thanks for all the effort you have put in to get this up for R2. Keep up the good work.

Here is the OpenWRT image with Luci installed and some additional packages (OpenVPN, Adblock etc) based on @lexa2 fork

@lexa2 is it possible to port your commits to the newer 19.07 branch or trunk ? I tried that but some of the patches do no apply and require manual changes

1 Like

Hello I tried installing luci on my build but I think the branch I used from lexa2’s repo was too old for luci and then I followed some instruction on openwrt forum and it leads me to believe that I need to upgrade to something higher where luci-base and luci-mode is available.

I will try @cioby23 build now. I tried you build and I cant get the land to work with my Laptop. While Wan is working from the router. when I connect LAN to my laptop I am getting these logs on UART.

root@OpenWrt:/# [  370.874490] br-lan: port 4(lan3) entered blocking state                            
[  370.879686] br-lan: port 4(lan3) entered forwarding state                                          
[  370.885340] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[  372.954523] br-lan: port 4(lan3) entered disabled state                                            
[  372.959923] mt7530 3.switch lan3: Link is Down                                                     
[  391.674482] br-lan: port 4(lan3) entered blocking state                                            
[  391.679676] br-lan: port 4(lan3) entered forwarding state                                          
[  391.685424] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[  393.754275] br-lan: port 4(lan3) entered disabled state                                            
[  393.759712] mt7530 3.switch lan3: Link is Down 

I haven’t done anything. As I see the bridge is assigned 192.168.1.1 I assume uhttp should work on 192.168.1.1 and I tried to assign my laptop Ip in the same subnet but still It is not connecting.

Any Advice?

Is ping working? Which kernel-version?

Linux OpenWrt 4.14.95 Yes ping working for WAN. and Internet is working.

Did you try to connect using HTTP or HTTPS. If I remember corectly Luci was configured to start only on HTTPS. You can check the uhttpd config.

I dont think UI will work on WAN port. It should only working on LAN. and my question is Lan port is not working. It is not establishing a connection between my Laptop to Router LAN port.

Audit is spamming the UART log, with Audit of the LAN cable connected to my Laptop.

[ 2823.195197] br-lan: port 4(lan3) entered blocking state                                            
[ 2823.200391] br-lan: port 4(lan3) entered forwarding state                                          
[ 2823.206173] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2825.274815] br-lan: port 4(lan3) entered disabled state                                            
[ 2825.280236] mt7530 3.switch lan3: Link is Down                                                     
[ 2829.435235] br-lan: port 4(lan3) entered blocking state                                            
[ 2829.440430] br-lan: port 4(lan3) entered forwarding state                                          
[ 2829.446297] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2831.515295] br-lan: port 4(lan3) entered disabled state                                            
[ 2831.520642] mt7530 3.switch lan3: Link is Down                                                     
[ 2836.715244] br-lan: port 4(lan3) entered blocking state                                            
[ 2836.720445] br-lan: port 4(lan3) entered forwarding state                                          
[ 2836.726247] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2838.795348] br-lan: port 4(lan3) entered disabled state                                            
[ 2838.800981] mt7530 3.switch lan3: Link is Down                                                     
[ 2842.955212] br-lan: port 4(lan3) entered blocking state                                            
[ 2842.960405] br-lan: port 4(lan3) entered forwarding state                                          
[ 2842.965942] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2845.035251] br-lan: port 4(lan3) entered disabled state                                            
[ 2845.040722] mt7530 3.switch lan3: Link is Down                                                     
[ 2856.475218] br-lan: port 4(lan3) entered blocking state                                            
[ 2856.480418] br-lan: port 4(lan3) entered forwarding state                                          
[ 2856.485916] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2858.555404] br-lan: port 4(lan3) entered disabled state                                            
[ 2858.560658] mt7530 3.switch lan3: Link is Down                                                     
[ 2884.555229] br-lan: port 4(lan3) entered blocking state                                            
[ 2884.560422] br-lan: port 4(lan3) entered forwarding state                                          
[ 2884.565964] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2886.635301] br-lan: port 4(lan3) entered disabled state                                            
[ 2886.640938] mt7530 3.switch lan3: Link is Down                                                     
[ 2898.075240] br-lan: port 4(lan3) entered blocking state                                            
[ 2898.080441] br-lan: port 4(lan3) entered forwarding state                                          
[ 2898.085938] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 2900.155375] br-lan: port 4(lan3) entered disabled state                                            
[ 2900.160903] mt7530 3.switch lan3: Link is Down                                                     
[ 3061.355249] br-lan: port 4(lan3) entered blocking state                                            
[ 3061.360444] br-lan: port 4(lan3) entered forwarding state                                          
[ 3061.365996] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 3063.435389] br-lan: port 4(lan3) entered disabled state                                            
[ 3063.441111] mt7530 3.switch lan3: Link is Down                                                     
[ 3089.435232] br-lan: port 4(lan3) entered blocking state                                            
[ 3089.440429] br-lan: port 4(lan3) entered forwarding state                                          
[ 3089.446219] mt7530 3.switch lan3: Link is Up - 1Gbps/Full - flow control rx/tx                     
[ 3091.515406] br-lan: port 4(lan3) entered disabled state                                            
[ 3091.520658] mt7530 3.switch lan3: Link is Down

You could do a portscan (nmap,netstat) on lan-bt to see on which port the httpd is listening if any

I cant scan the lan-bt as it doesnt establish any connection to any device on lan. And my question is not about httpd or luci. It is about connecting any device under the router. Ex. Router lan1-4 to any device (laptop or desktop).

When i connect cable between routers lan port to laptop nic then there is this above audit logs.

@cioby23 is dhcp enabled by default on lan-bt? I cant find config about this. I also tried to give an ip to laptop lan under the samr subnet of the lan bridge which is bt-lan but still no luck.

ok, overread wan in your previous answer…i meant lan…

can you ping from client to lan-br (192.168.1.1)? is your client in same subnet? tried different cable/checked connection?

No. There is no network connectivity between laptop to Router Lan and I am sure cable is fine as I removed it from my office desk IP-Phone. EDIT: Sorry indeed this cable didn’t seem to work. Changed the cable and it was looking for IP and it was static. I am testing it with DHCP. Luci works fine. All good now.

Lovely work @cioby23. The adblocker is amazing.

Good work. Just a request Can I make the dhcp-client on for Lan and build img for normal users?

also I think the kernel is 4.14, will look into making 4.19version. Also what about the wifi ap for this device?

As far as I know DHCP is on by default for the bridge interface. I applied yesterday @lexa2 patches on OpenWRT trunk but compilation fails at some point.

I do not know how can I select 4.19 kernel for OpenWRT so I need to investigate this. Regarding wireless I’m using an MT7612e mPCIE card which works fine on OpenWRT using the mt76 driver.

Onboard WiFi chip MT6625 is not supported in OpenWRT.

I thought there is wifi integrated in R2 :o Their specification shows Integrated WIFI/BT, but I just checked on R2 Wifi/BT development thread that the drivers are still not there for linux.

So we might have to wait more for this. Thanks anyways. I will also try to compile different branches of @LeXa2 openwrt and see which one is stable with most feature working out of the box. Thanks again.

Yes that’s what I saw on the thread.

The driver for r2 internal wifi (mt6625l) can’t be send mainline because it too big,does not use standard-init and is buggy. I try to port it to each kernel-version to have it available in my kernel (i also use it). Since i’m nearly alone with this work and my limited knowledge about driver-design i see no chance to rewrite the driver for mainline or fix the bugs…still try to port to 5.4,see other thread if you can help me

There are drivers for MT6625 but I think they are based on Android code and is very huge (hundreds of thousand of lines long). Also it requires some additional tools to load the drivers. OpenWRT developers won’t accept this in their code repository so someone might need to rewrite the driverr before it’s merged.