What´s the best Practice to Build own Kernel

(Frank W.) #101

Maybe it’s better waiting for wifi-driver…only linking errors (one file) needs to be fixed…currently i have no clue what’s wrong…need bit help for fixing it.

Than i merge sd-card- and pcie-patch and upload kernel for testing.

(Frank W.) #102

created a github-repo for bananapi-kernel 4.14

  • main-branch is to get working kernel
  • wifi_mt6625l-branch is for testing the internal wifi-driver (currently does not compile complete)

kernel of official images can be replaced by this (swapped mmc too), this can be done with build.sh after build

(dorabmon) #103

Nice work. The tree can enjoy more benefits from upstream effort from mediatek. MediaTek have already posted VLAN support on MT7530 on the internet. You can try it. https://lkml.org/lkml/2017/12/7/39

(dorabmon) #104


Mmc issue is also being fixed.

(Frank W.) #105

mmc is fixed in my repo too :wink:

i’ll take a look on vlan-support, maybe make a separate branch for testing it

frank@Frank-Laptop:/media/data_ext/test_4.14/github$ git status
On branch vlan_support
nothing to commit, working directory clean
frank@Frank-Laptop:/media/data_ext/test_4.14/github$ patch -p1 < ../vlan.diff
patching file net/dsa/tag_mtk.c
Hunk #2 FAILED at 28.
1 out of 2 hunks FAILED -- saving rejects to file net/dsa/tag_mtk.c.rej
patching file drivers/net/dsa/mt7530.c
Hunk #1 succeeded at 804 (offset -1 lines).
Hunk #2 FAILED at 880.
Hunk #3 succeeded at 898 (offset -1 lines).
Hunk #4 succeeded at 970 with fuzz 2 (offset -1 lines).
Hunk #5 succeeded at 1317 (offset -1 lines).
1 out of 5 hunks FAILED -- saving rejects to file drivers/net/dsa/mt7530.c.rej
patching file drivers/net/dsa/mt7530.h
patching file MAINTAINERS
Hunk #1 succeeded at 8624 (offset -99 lines).

vlan.diff (16,0 KB)

merged master into vlan_support-branch…compiles fine

(Frank W.) #106

uploaded compiled kernel from main and wifi-branch here: https://drive.google.com/drive/folders/1EGN1TvqCpDHdOAS-mjRg9ipi0kahnOUV for testing

for wifi, same steps as with 4.4.70 have to be done: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/tree/master/vendor/mediatek/connectivity

for vlan…have any kernel-option to be set for testing? enabled some vlan-option, i think which are needed/meaningful…


(Frank W.) #107

any idea how to get uart1 working? did the same steps as for uart0 (status=okay in bananapi.dts), but it is not recognized by system

root@bpi-r2:/sys/devices/platform/11003000.serial# ls of_node                   
clock-names  compatible  name       pinctrl-names  status                       
clocks       interrupts  pinctrl-0  reg                                         
root@bpi-r2:/sys/devices/platform/11003000.serial# cat of_node/status           

to compare with uart0 (here a folder “driver” and “tty” exists):

root@bpi-r2:/sys/devices/platform/11003000.serial# ls                           
driver_override  modalias  of_node  power  subsystem  uevent
root@bpi-r2:/sys/devices/platform/11003000.serial# ls ../11002000.serial/       
driver  driver_override  modalias  of_node  power  subsystem  tty  uevent

send does also not work ;(

(Frank W.) #108

Wifi-branch is merged to main,uart is working Cryptodev is also included (must be compiled separately).

There are 2 minor issues with wifi,see that thread: R2 internal Wifi/BT (MT6625L) - Kernel 4.14.x/4.16

Hnat compiles fine in separate branch, vlan is only compiling with 4.15 base,i try with 4.14 but stuck in modified function Vlan-support backporting to 4.14

(Frank W.) #109

any idea which options are missing to get HDMI working? comparing currently with 4.4…

tried to add DRM drivers and dts-nodes from 4.4, but still not working, instead kernel does not load :frowning:


We will add HDMI support in the future.

(Frank W.) #111

Is there any timeplan? Please make it compatible for 4.14 if including in mainline

opened an issue on my github-repo (hdmi-branch):


We will send patches during v4.16

(Frank W.) #113

anything new?

is there a chance to get a stable wifi-driver for internal wifi (mt6625l) without the wmt-tools?

(Frank W.) #114

is anybody working on a wifi-driver for mt6625l? currently i try to port existing driver to 4.16, but it’s not easy (for me) and this will not fix the problems of this driver

(ve2tmq) #115

Hi folks. I try to build kernel for my Banana Pi R2, because I need specific WiFi NIC. So I CrossCompiled kernel uBoot, install uBoot image on microSD card. Finally no boot. No display. So I am searching for instructions, I try what I found on that thread, same issue. Do you have some references or docs?

Thanks everyone.

(Frank W.) #116

Which kernel do you use?

Here are instructions for manually install OS:


(ve2tmq) #117

Thanks answer, I try to build 4.4.70, same as I found on Image from Google Drive. The propos is I need to add module for another WiFi NIC because the build-in one is not enough to made an AP.

So I tryed that : http://wiki.lemaker.org/BananaPro/Pi:Building_u-boot,_script.bin_and_linux-kernel, without success on building u-boot and BSP.

I think this uBoot is my issue.

I’ll try instruction.

I success

(Frank W.) #118

Do you use an existing image and replace uboot/kernel or do you start with empty sd-card? Have you pressed power-button at least 10 seconds? You look on debug-uart?

(ve2tmq) #119

I use this image 2018-03-29-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc.img I whiped first parttion (sdb1) and rewrite U-Boot and first partition ot boot my new kernel.

Following this instructions: http://www.rvq.fr/linux/bananapi.php

and also instructions I found on current thread. No success.

(Frank W.) #120

this instruction uses uboot from git.denx.de…this does not have drivers for chipset included. The defconfig is for bananapi (m1).

You have to add drivers at least for mt7623 to thus uboot source or compile it from official bananapi-r2 repo.

I also wanted a newer uboot,but have not figured out how to add the drivers

why do you want to replace uboot? You can replace kernel without changing uboot…uboot needs only to be replaced if itself is changed

Regarding kernel itself your instructions is also not usable because of the wrong device. Here you can use my repo and building with build.sh