[BPI-R2] Ubuntu 18.4 with kernel 4.14.48

I upgraded the kernel to 4.18-rc2-wlan (with my RT8812au chipset support) to emmc booting to serial console shows boot menu:

*** U-Boot Boot Menu ***

 1. Reload Bootmenu.
 2. Load Environment.
 3. Boot Linux from SD.
 4. Boot Kernel 4.4.
 5. Boot Kernel 4.9.
 6. Boot Kernel 4.14.
 7. Boot Kernel 4.16.
 U-Boot console

Press UP/DOWN to move, ENTER to select

default it starts in: 4.14.48-bpi-r2-main

how to add my kernel to boot menu?

I copied uImage to /boot/bananapi/bpi-r2/linux and kernel modules to /lib/modules (folder named 4.18.0-rc2-bpi-r2-wlan)

you have to modify BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt

if you want to default booting your kernel you change kernel-param…if your kernel-binary is named uImage your kernel-param should look like these:


this is in my (maybe not in the image) uEnv.txt on top, after that i have the line for changing this var to pointing to 4.14.48


so just comment out the second line with #


if your uImage have another name add a 3rd line after the second like this:


so last assignment is loaded. if you want default booting 4.14.48 and want to add a separate menuentry for 4.18 (and like in my case for 4.17) you can add these menu-entries like this:


boot417=run newloadenv; setenv kernel ${kernel417}; printenv; run newboot
bootmenu_7=8. Boot kernel 4.17.=run boot417
boot418=run newloadenv; setenv kernel ${kernel418}; printenv; run newboot
bootmenu_8=9. Boot kernel 4.18.=run boot418

for this additional menuentries you have to reload bootmenu (first entry in menu) because uEnv.txt is not loaded before display the menu.

HTH Frank

This is my uEnv.txt

uEnv.txt (1,7 KB)

when I will do Bootmenu reload and then choose 4.18 this is what I have got:

[ 3.237142] Waiting for root device /dev/mmcblk0p2…

but in uEnv root is set to /dev/mmcblk1p2 … what I did wrong?

Do you boot from sd or emmc? Sd is mmcblk0 and emmc mmcblk1…i guess your root-var is wrong.

You have a “B” before your root-var.more below there is a linebreak before txt. Also you set differen filenames for 4.18 (kernel=uImage_4.18-rc2-wlan [overridden by next line] vs. kernel418=uImage_4_18-rc2-wlan)

What is your right filename?

Great. Corrected and it’s working. Time to check wifi …

For wifi just unpack thid to rootfs: https://drive.google.com/open?id=1MJxfHCpR-ph5YJu-_yMTCH5YG9rL6HHY create a /etc/hostapd/hostapd_ap0.conf and run wifi.sh

I am know able to manually configure the WiFi (manually using ip commands) and i cant get it to be be an AP.

Take a look in /usr/local/sbin/wifi.sh…you have to use wmttools to create ap0-device,set ip to it and run hostapd (+restart dnsmasq so it can listen to the new ap0-device)

OK I have finally got the ap0 to come up i see it from my other computer, I try connecting to it but it fails when trying to assign an IP. Ill work more on it tomorrow. I do have a different question however. Does anyone know what the LED’s mean? Green,Red and Blue? I have also experienced some weirdness with it when I have it plugged in to my HDMI monitor sometimes it has a blue background briefly during boot sometimes it has a light blue background. Ive noticed that when its light blue usually ill have to reboot as the ethernet ports wont work. When it boots and is green 80% of the time its good to go. Any idea on that?

Wanted to also say thanks A TON Frank couldn’t have gotten here without you man!


  • is ip set to ap0?
  • is dnsmasq configured for this interface and same subnet as IP from ap0?

which LEDs do you mean? you have 3 near power-connector and 3 near GPIO-header

red led near gpio seems to be only a power-indicator (cannot be switched on/off), the other leds can be manipulated via debugfs…i don’t know if they have special meaning while booting. in strock-kernel these are always on, with my kernel (LED-Fix) they are always off (due to dts-setting default off)

hey there. I’ve been working with this build on a daily basis and so far so good. Only had 2 shutdowns but after days. One thing is bothering me though, is the absence of usbserial drivers, unfortunately I can’t find them anywhere. In 4.4.70 they were working flawlessly, but I’m a noob in linux and don’t know how to port them (working with 4.14.48). I need to plug a cp210x device but is not showing anywhere. All help is appreciated.

you have not to port them…only enabling :slight_smile: and rebuild kernel from my repo

  │ Symbol: USB_SERIAL_CP210X [=n]                                                                     │  
  │ Type  : tristate
1 Like

I could easily enable usbserial drivers and now working fine. However, I’m getting again unexpected shutdowns around 2 days of inactivity. I’m using my BPI-R2 for logging purposes and it is normal to leave it long periods of time without observing. What can you recommend me to stop these shutdowns?

Try to log via debug-uart to get the cause

Have you these shutdowns with 4.4 or 4.14? I have 4.14 running for 15+days without shutdown

1 Like


I’m trying to use my banana-pi R2 as a network delay injector. However, when using TC, I discovered that the sch_netem module was not part of this build.

As I may be a linux user but for sure newbie on armhf boards, could you please point me to the right direction in order to add/compile this module to the existing distro ?


I think you mean kernel-module…it’s not part of a distro…

You can clone kernelsource from my github-repo add this module and rebuild kernel…

I can take a look later when i’m at home

seems to be option


(Depends on: NET [=y] && NET_SCHED [=y])

Hi Frank … thanks for your great work!!

I was trying to combine your 4.14.69 kernel with the SinoVOIP 16.4 Ubuntu, but basically the network doesn’t work – I was trying to figure why, but it is a complicated image, so the best approach is to jump to 18.4.

Your 18.4 image comes with 4.14.48, so the eth1 it is lost. But including the 4.14.69 image brings everything together :slight_smile:

Why do I need this kernel?

I have many weeks fighting with a RAID-1 on the 4.4.70 one. I have been changing many hardware parts, improving power and many other details, but always one of the disks go out of the RAID. Checking the kernel messages and reading around, it seems that the 4.4.70 kernel version, in particular, can remove hard disks without apparent reason. And, this is poison for a RAID configuration.

So, I am reconfiguring everything on 4.14 to eliminate that possibility.

If this is a valid solution, the 4.4.70 kernel will show to be a very bad option for the R2 machine when using SATA disks.

Sata maybe a hardare-issue…i heard from 2+ people that sata connector was not soldered correctly…

Does it work with my ubuntu-image and actual 4.14? For eth1 you have to add eth1-block (same as eth0) to /etc/network/interfaces

Let me check … I am installing a new R2 machine with 4.14.69. It already works with eth1 ( … I am fighting with the booting without SD, but I know the R2 it is a little naughty … ).

When ready and passing my tests, I will check the other R2 to see if it has the problem you are indicating about the sata connector.

you mean with emmc? you’ll find an article in my wiki for it :slight_smile: