I have tried to follow the wiki and was able to install the sinovoip OpenWRT image to EMMC and boot from it.
When I build my own image from OpenWRT trunk only a sysupgrade.bin image is generated and if I try to sysupgrade to that image it gives me a “firmware partition not found error” and reboots.
You can try to use the Openmptcprouter project:
It’s not original OpenWRT but based on original OpenWRT and has all necessary files (like u-boot, preload-emmc) to build image that can be load into the bpi-r2 board.
Just clone it, build project and switch off all components you don’t need (by “make menuconfig” at bpi-r2/source directory).
I may, if needed, clone the OpenWRT repo ( and not anyone else repo ), make menuconfig, select the proper configuration, and build it. but that’s it. I am not interested in anything else except this.
Worst case, OpenWRT is not a supported distribution as claimed on the product page and I will just make a claim with aliexpress and return the product and search for something else that meets my goals.
Stock OpenWRT image does not have full support for BananaPi R2. As Frank mentioned lexa2 fork offers better support. Recently there was a pull request submitted for stock OpenWRT but it pushed to the main repository yet.
thanks for the info.
I still want to run it, even if it doesn’t have full support. I am assuming that full support means that some hardware is not working like usb or lan or whatever.
As long as I can flash it, I will be happy for now.
So, I just want to know if it is possible or not, and if it is, how to do it.
Imho you need real image (not kernel.bin or sysupgrade) and then flash via dd if=image of=/dev/mmcblkx where x is your emmc-devicenumber. Also preloader neess to be written to mmcblkxboot0. Sometimes it is needed to set partition-config via uboot/mmc-utils
It’s not the first time PR like this had been submitted there. At least one person is trying to get support into upstream for R2 for quite some time now and I believe I’ve seen this person posting here in other threads. While I wish all the best and good luck getting it accepted into upstream my experience tells me that it won’t be an easy and quick ride. Nevertheless proper support seems to be landing piece by piece all over upstream projects (kernel, u-boot, you name it) so things are getting better.
As for the way to get upstream-built OpenWRT into R2 - it might be a bit complicated. You will have to craft SD image yourself using vendor-supplied preloader and u-boot and couple them with owrt-provided kernel and rootfs. I believe that nowdays owrt produces squashfs-based rootfs for R2 which implies that you will have to use block2mtd to simulate mtd device and specify mtd partitions layout on the kernel command line. To get a good hint on how should it look like you may want to check what cmdline gets embedded into the generated owrt kernel. Most probably you will have to modify it somewhat to get it working with eMMC. I’d expect that you will have to turn on in-kernel support for overriding cmdline with the string that was passed from u-boot and then use serial cable to experiment a bit with u-boot console changing cmdline to make it fly.
Keep in mind that info above regarding complexity of getting OpenWRT to work with R2 only applies to upstream “vanilla” OpenWRT. There are at least three viable forks available to end-users (including my fork described in this thread) that make installing OpenWRT on R2 an easy task. There’s no real need/urge to use upstream owrt here TBH as: (a) network will be unstable due to one kernel patch that is included in there while it is known to cause net stalls on some boards; (b) squashfs+jffs2 is a bad idea to be used with storage that is large enough to work good with normal fs like ext4; (с) upstream lacks support for sysupgrade so each time you would like to update your installation will be an “install from scratch” experience.