[BPI-R2] Kernel Development

Have started work on 5.7…i used different vlan-patch than on 5.4 but seems to work well

https://github.com/frank-w/BPI-R2-4.14/tree/5.7-rc?files=1

Wifi/hdmi also ported, quick-tested and merged to rc-tree…

i have also replaced old vlan-patch in 5.4 with the new one because old one have problems on deleting vlans (all vlan are disabled)…have also ported vlan-patch to 4.19 to have vlan also working there

1 Like

Hi Frank,

Sorry but I don’t understand the new build system (on the 5.7-rc kernel branch, I’m not very familiar with ARM boot too^).

With the old system, when I build my kernel, I could choose to generate deb packages and installed it on my board, on the next reboot, I was on the new kernel.

Now, I built my kernel, generated deb packages with pack_debs command (only 12M when old 5.5 and 5.4 was 50/60Mo ?) but when I installed them on board and reboot, i boot only on the old kernel. Deb package does’t install uImage on /boot/bananapi/bpi-r2/linux folder but vmlinuz and systemmap on /boot folder (like a classic linux).

Can I have the good procedure to install the new kernel ?

5.4 has additional patches for deb creation i have not yet merged…

just install directly to sd-card (option 2 in build.sh)

if you install debs you need to change uenv.txt to boot to new kernel

you can do also use pack-option… basicly there is for r2 only 1 uImage-file needs to be copied to BPI-BOOT-partititon (bananapi/bpi-r2/linux/) and modules-folder have to be copied to BPI-ROOT-partition (/lib/modules/) the tar.gz contains folders BPI-BOOT and BPI-ROOT…just unpack to the named partition on your SD…but install to SD-card is easier

Maybe it is right here, maybe it isn’t.

@frank-w Your Kernel README says, there is crypto support on 4.14. I just did a quick test.

~ uname -a
Linux bananapir2 4.14.184-bpi-r2-main #6 SMP Fri Jun 19 07:50:36 UTC 2020 armv7l GNU/Linux

~ cryptsetup benchmark  
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       115380 iterations per second for 256-bit key
PBKDF2-sha256     170666 iterations per second for 256-bit key
PBKDF2-sha512     103532 iterations per second for 256-bit key
PBKDF2-ripemd160   93622 iterations per second for 256-bit key
PBKDF2-whirlpool   19574 iterations per second for 256-bit key
argon2i       4 iterations, 133240 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      4 iterations, 134992 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
Required kernel crypto interface not available.
Ensure you have algif_skcipher kernel module loaded.

Is the intention to compile it manually?

Cryptodev needs to be compiled separately,but is packed/installed if ko exists

Can anyone help me with the cfg80211 api-change for r2 internal wifi (mt6625)?

[BPI-R2] internal Wifi/BT (MT6625L) - Kernel

5.8-wifi and 5.8-hdmi are working in my quick test

2 Likes

It works, if kernel modules like described HERE are enabled.

Hi, everyone!

Today i got my R2 halted with 5.8 kernel for 1st time ever.

  1. Firstly network gone down (wifi, i didn’t test ethernet)
  2. I got dmesg dump using serial console: 5.8-dmesg.txt (72.9 КБ) (dump started from 1st trace after reboot, tha last one is incomplete)
  3. After reboot everything seems good for now, i cant reproduce the bug.

No 3rd party modules/drivers were used.

uptime 1 day and ~1 hr

[90769.755898] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[90769.755915] rcu:     0-....: (3 GPs behind) idle=962/0/0x1 softirq=2280595/2280595 fqs=3892 
[90769.755922]  (detected by 1, t=8407 jiffies, g=5917193, q=141)
[90769.755930] Sending NMI from CPU 1 to CPUs 0:
[90769.756369] NMI backtrace for cpu 0
[90769.756374] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.8.0-rc6-arm+ #1
[90769.756376] Hardware name: Mediatek Cortex-A7 (Device Tree)
[90769.756378] PC is at mt76_rx_aggr_reorder+0x4/0x2dc [mt76]
[90769.756380] LR is at mt76_rx_poll_complete+0x2e8/0x454 [mt76]

seems like rcu-stall bug in mt76 wifi-driver, some before are warnings in clock/reset-driver caused by lima_clk_disable

[45565.315187] WARNING: CPU: 1 PID: 20682 at drivers/reset/core.c:358 reset_control_assert+0x198/0x200

[45565.316034] WARNING: CPU: 1 PID: 20682 at drivers/clk/clk.c:958 clk_core_disable+0xec/0x28c                                                                                                                                                     
[45565.316040] g3d_core already disabled                                                                                                                                                                                                           

[45565.317631] WARNING: CPU: 1 PID: 20682 at drivers/clk/clk.c:958 clk_core_disable+0xec/0x28c                                                                                                                                                     
[45565.317636] mmpll_ck already disabled

i see you have 5.8.0-rc6, could you try with 5.8-main tree?

Sure, I’ll try to update it nearest weekend.

A couple of errors with self-reboot in 2 days 5.8-rc-fails.txt (23.1 КБ)

Now downgraded to 5.5, and 5.8-main compilation in progress…

P.S. Not actively used (as a PC ;)), not even logged in, just acted as a router (3-6 wifi clients both internal wifi and mt76), with serial console attached.

P.P.S BPI-MT7615 wifi card ( MT7612 wifi card replacement) is on the way, and as i understood it uses the same wifi driver as MT7612, is it correct?

Mt7615 uses also mt76 wifi driver right,but separate folder/CONFIG_option/module

I hope error is fixed in 5.8 final… maybe this: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/wireless/mediatek/mt76?h=linux-5.8.y&id=4ac668a3b8c9d3477a3fe162c1cfeb867dd65de8

else it will be interesting if error is in 5.7,5.6,… just to get the breaking commit

For lima i guess we need the power-commit i added to 5.4-main

I’ve switched to 5.8.0 release. I’ll update on any errors/stability issues.

Yep, or dts-mod from 4.4 kernel which is in my 5.5-lima branch, I’m not sure which way is better, but both seems to be working.

Better is find bugs in most recent version :slight_smile:

5 days of uptime with 5.8-main without any errors/TraceBacks/etc, interrupted by accidently pulled power cord :slight_smile:

P.S. Without usb-wifi.

good to hear :slight_smile:

and is usb-wifi still buggy? if there is a problem it should be reported to fix it mainline

My LTE modem with wifi-hotspot is buggy ;), so rolled back to USB LTE modem plugged in-to R2, usb-wifi dogle was used before as wifi-client. I’ll test usb wifi ASAP, but right now there is no use for it.

P.S. After modem+wifi replacement i’ll be able to place R2 near TV, so hdmi/lima related stuff is going to be back in buisness soon :slight_smile:

Hdmi is working in 5.8, but lima (power changes) is not ported to it

I started work on 5.9

This commit breaks bootup of r2 and r64 f97dbf48ca43009e8b8bcdf07f47fc9f06149b36 irqchip/mtk-sysirq: Convert to a platform driver

I got this fix that works https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/irqchip-next&id=7828a3ef8646fb2e69ed45616c8453a037ca7867 but leaves some errors in bootlog…it looks like the full irq-series gets reverted in one of the next rc’s

Updated 5.9-rc branch. Hdmi and wifi are working so far (5.9-hdmi, 5.9-wifi)