BPI-R2-Kernel 4.18


(Frank W.) #1

Hi, today 4.18-rc1 is released…on my github is the version adapted to r2

Ubuntu 18.04 LTS bpi-r2-ubuntu ttyS0

bpi-r2-ubuntu login: root
Password: 
Last login: Sat Jun 16 17:33:25 UTC 2018 from 192.168.0.21 on pts/0
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.18.0-rc1-bpi-r2-rc armv7l)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

root@bpi-r2-ubuntu:~# 

4.18-boot.log (22,2 KB)

the only “errors” i’ve see on a quick look are missing dts-nodes like in 4.17:

[    0.331515] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-1p8v[0]'
[    0.340419] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-3p3v[0]'
[    0.349207] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-5v[0]'
...
[    0.871325] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus[0]'
[    0.881538] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ethernet@1b100000/mdio-bus[0]'
...
[    0.914861] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
[    0.926008] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mac@0[0]'
...
[    1.143980] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/mmc@11240000[0]' - status (0)
...
[    1.176179] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11240000[0]'
[    1.184931] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11240000[0]'
...
[    1.244666] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11230000[0]'
[    1.253415] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11230000[0]'
...
[    1.300482] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/blue[0]' - status (0)
[    1.332676] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/green[0]' - status (0)
[    1.358564] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/red[0]' - status (0)
...
[    5.217401] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0[0]' - status ()
...
[    5.398257] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0/ports/port@6/fixed-link[0]'
[    5.402375] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0/ports/port@6[0]'

any idea how to fix them?


(Frank W.) #2

it seems that these are message only visible in debug-mode

https://patchwork.kernel.org/patch/4480101/ (a change for this debug mode)


(Alex R.) #3

I got this on 4.16

[    0.110418] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-3p3v[0]'
[    0.110682] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-5v[0]'
[    1.329148] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus[0]'
[    1.339359] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ethernet@1b100000/mdio-bus[0]'
[    1.372659] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
[    1.383774] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mac@0[0]'
[    1.643627] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11240000[0]'
[    1.652369] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11240000[0]'
[    1.712291] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11230000[0]'
[    1.721041] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11230000[0]'
[    8.472906] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0/ports/port@6/fixed-link[0]'
[    8.487659] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0/ports/port@6[0]'

Looks like it’s a CONFIG_DEBUG_GPIO=y option


(Frank W.) #4

Ok,i will disable this option and try again. These messages should be only a info and i want a nearly clean bootlog


(Maciek Szelągowski) #5

To install new precompiled kernel:

bpi-r2_4.18.0-rc1_wlan.tar.gz

I just need to unpack this archive to local drive?

If I would like to add driver to RTL 8814AU wlan card how to compile kernel by myself?

And if new version will come do I just copy config to new kernel and compile?


(Frank W.) #6

you have to unpack to sd-card

https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:kernel#compiled_414x

  • BPI-BOOT ⇒ boot-Partition, uImage=Kernel-file, backup first your existing uImage before overwriting it
  • BPI-ROOT ⇒ partition with root-fs

to compile yourself:

imho you can copy .config-file and run

ARCH=arm make oldconfig

instead of “./build.sh importconfig”


(Maciek Szelągowski) #7

after

./build.sh importconfig

I have got:

arm-linux-gnueabihf-gcc version 7 currently not supported

(ubuntu 18.04)


(Frank W.) #8

Gcc7 brings strange errors where i don’t know how to fix.

You’ll find instructions in readme.md of default-branch: https://github.com/frank-w/BPI-R2-4.14/blob/4.14-main/README.md

Basicly installing older gcc-toolchain and define that as default


(Maciek Szelągowski) #9

Thanks. It’s working now. Do you know how to update 4.18-rc1 to newer kernel in future?


(Frank W.) #10

I wait for final 4.18 pull it into 4.18-main and merge wifi-driver.

If you want to update by yourself you can use incremental patches from kernel.org

imho you can also add linus’ repo https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git as remote-repo and merge tags into your tree

https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes


(Maciek Szelągowski) #11

I downloaded incremental patch of 4.18-rc2:

https://git.kernel.org/torvalds/p/v4.18-rc2/v4.18-rc1

I merged 4.18-rc2 by:

patch -p1 v4.18-rc1

then ./build.sh

I will test it afternoon when I get home


(Frank W.) #12

you mean

patch -p1 < patchfile

? after patch/merge you can do

make kernelversion

to see if you have the new version…


(Maciek Szelągowski) #13

yes. Exactly. I did:

patch -p1 < patchfile

and then produced kernel was 4.18-rc2


(Maciek Szelągowski) #14

Does your kernel support SATA devices?

I have connected today two WD RED drives (powered by ATX power supply) and I cannot see them

fdisk -l

shows only emmc flash


(Frank W.) #15

4.18 / 4.17 maybe missing the pcie-patch for sata. Basicly sata is activated in config


(Maciek Szelągowski) #16

But any suggestions how to do it?

I already tried to load modules:

ahci_mtk

libahci_platform

but it does not work


(Frank W.) #17

Try using this: https://github.com/garywangcn/bpi-r2_lede/blob/bpi-r2-on-lede-v1/target/linux/mediatek/patches-4.9/0073-mtk-pcie-bug-fix.patch


(Maciek Szelągowski) #18

I tried to download this file:

https://github.com/garywangcn/bpi-r2_lede/raw/bpi-r2-on-lede-v1/target/linux/mediatek/patches-4.9/0073-mtk-pcie-bug-fix.patch

and try to patch kernel by:

patch -p1 < ./0073-mtk-pcie-bug-fix.patch

but the script asks what file to patch? In patch text there’s a definition:

/drivers/pci/host/pcie-mediatek.c

but there’s no such file in 4.18 source …

probably I did it wrong :wink:


(Frank W.) #19

File exists in 4.17 but on 4.18 the folder changes: https://github.com/frank-w/BPI-R2-4.14/blob/4.18-rc/drivers/pci/controller/pcie-mediatek.c


(Maciek Szelągowski) #20

success !!! Frank. I’m very greatfull to you what you did to BPI community.

IMHO much more then Sinovoip Guys …

But after successfull patch sata still doesn’t work …

Can you check on your kernel?