[BPI-R64] Kernel-Development

?? As i wrote you can use my debian image and replace kernel…

Which system do you want to have on r64?

I want Debian. But in official link (http://wiki.banana-pi.org/Banana_Pi_BPI-R64) for install I need SD card more the 8GB which I have not. I dont unerstan how install Debian to emmc.

You can only install on emmc from running system…so first you need an sd with installed image…why more than 8gb? Emmc is only 8gb…you cannot install larger image to emmc

You have 8gb sd-card? You can use my buster image…official is afair only jessi

And you do not need to build kernel by yourself on first step…image contains already a kernel,but not newest one and not with all modules you may want

You talk about this (https://drive.google.com/drive/folders/1wpBrJEstSPb90HE7R17NncQ9MsXHzWcx) r64_buster_emmc_rtl8367.img?

And can you tell about other file r64-emmc-boot.tar.gz, r64-card.img.gz, preloader_evb7622_64.bin

Afair r64-card was right one…emmc has changed rootfs-device…looks like i have not uploaded r64 img with mt7531 switch yet…so you need to replace kernel to get working network…but you can use one from github releases to avoid self compile

Can you take instruction how do it step by step.

I try to make a updated image for mt7531…but this will take some days

Basicly burn image to sdcard and unpack r64 tar.gz to right partitions and update uenv.txt

mhm, seems i have only uploaded emmc-image need to convert it first to sd replace uboot + change fstab

Or you may try (my) Armbian images with Frank’s kernels. I try to keep them up to date.

Link

Btw, Armbian has a nice feature to fit almost to any size SD, 8GB is not required.

i have uploaded sd-card-image based on the emmc one with mt7531 dsa-driver (5.4.30), updated uboot, changed fstab, updated debian itself

  • r64_buster_sd_mt7531.img.gz
  • r64_buster_sd_mt7531.img.gz.md5

https://drive.google.com/drive/folders/1wpBrJEstSPb90HE7R17NncQ9MsXHzWcx

just use gunzip and dd to sdcard

Thank you! I will try this is image.

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

one error i see in dmesg is this:

[    3.879390] mmc1: error -110 whilst initialising SD card                     
[    7.445503] mmc1: error -110 whilst initialising SD card

but boot from it works…then this one i guess from pcie/sata (not tested further):

mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)

and this one i see also on r2:

mtk_soc_eth 1b100000.ethernet eth0: error -22 setting MTU to include DSA overhead

but ping works over dsa-interface (lan0)

have now also merged, bluetooth and thermal, maybe some users can test it too?

should i merge the pcie-split-patch?

on r64 i noticed some problems with 5.8, looks like ext4-related…but i did not get these on r2

[   66.891787] BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u4:1/55
[   66.899992] caller is debug_smp_processor_id+0x20/0x2c
[   66.905159] CPU: 1 PID: 55 Comm: kworker/u4:1 Not tainted 5.8.0-rc1-bpi-r64-r64 #65
[   66.912805] Hardware name: Bananapi BPI-R64 (DT)
[   66.917424] Workqueue: writeback wb_workfn (flush-179:0)
[   66.922730] Call trace:
[   66.925172]  dump_backtrace+0x0/0x1cc
[   66.928828]  show_stack+0x18/0x24
[   66.932137]  dump_stack+0xb4/0x108
[   66.935533]  check_preemption_disabled+0xd0/0x110
[   66.940232]  debug_smp_processor_id+0x20/0x2c
[   66.944582]  ext4_mb_new_blocks+0x208/0x73c
[   66.948760]  ext4_ext_map_blocks+0x9dc/0xac4
[   66.953024]  ext4_map_blocks+0x184/0x484
[   66.956940]  ext4_writepages+0x548/0x888
[   66.960858]  do_writepages+0x3c/0x7c
[   66.964428]  __writeback_single_inode+0x3c/0x17c
[   66.969039]  writeback_sb_inodes+0x1dc/0x38c
[   66.973303]  __writeback_inodes_wb+0x84/0xcc
[   66.977567]  wb_writeback+0x1ac/0x1d0
[   66.981222]  wb_workfn+0x1d4/0x2a0
[   66.984618]  process_one_work+0x178/0x1e4
[   66.988619]  worker_thread+0x1d8/0x268
[   66.992363]  kthread+0xf4/0x104
[   66.995498]  ret_from_fork+0x10/0x18

this seems to be related: https://lkml.org/lkml/2020/6/12/318 looks like it is fixed in rc4 by upstream-commit 811985365378df01386c3cfb7ff716e74ca376d5

looks good in rc4…

dsa-driver works so far, only this messages in dmesg:

mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port 0

eth0: mtu greater than device maximum
mtk_soc_eth 1b100000.ethernet eth0: error -22 setting MTU to include DSA overhead

Got this fixed by commit from rene van Dorst. R2 only shows 1 message not for each dsa-port like on r64…send this patch to mainline now. Replaced renes version with one from landen chao,hoping it gets merged now

bluetooth seems also working…i can scan with bluetoothctl and see my smartphone…

wifi was build as module (mt7615e), after loading module, wifi-interface shows up

I hope this is the right place for this. If not, please direct me.

I am trying to get a BPI-R2 to connect to a Netgear Aircard: I live off-grid and I want both wired and wireless networking off a 12v supply from LTE (or 3G, or whatever is available on the day.) I want to use the Aircard in passthrough mode so I can control my wifi through Linux.

The Aircard appears on an ARM Chromebook as a udev device. Output from dmesg on the Chromebook looks something like this:-

[ 5568.054773] usb 3-1: new high-speed USB device number 6 using xhci-hcd
[ 5568.073332] usb 3-1: New USB device found, idVendor=0846, idProduct=68e1, bcdDevice= 3.10
[ 5568.073349] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5568.073361] usb 3-1: Product: AirCard 810S
[ 5568.073372] usb 3-1: Manufacturer: NETGEAR, Inc.
[ 5568.073381] usb 3-1: SerialNumber: 354390071042193
[ 5568.364932] usbcore: registered new interface driver cdc_ether
[ 5568.371372] rndis_host 3-1:1.0 eth0: register 'rndis_host' at usb-xhci-hcd.5.auto-1, RNDIS device, 00:a0:c6:00:00:00
[ 5568.371510] usbcore: registered new interface driver rndis_host

To do this I have downloaded Frank’s kernel source – thanks @frank-w ! – and am trying to build a kernel that supports both this device and wifi. Sadly, my kernel building experience (and general UN*X experience) is from DEC and *BSD systems from a decade or two ago!

So far I’ve got either wifi or usbdev to work, but noth both. I’m sure I will get there eventually.

So my thoughts are:-

  1. Am I the only one who wants this hardware support?
  2. if not, when I (eventually – I have a day job) get this working, would you like me to send back patches? OR
  3. if there is a need and it is easy and/or I am taking too long, would someone else do it?

For r64 i had only added basic drivers to reduce size and compiletime.

First driver should be this: https://cateee.net/lkddb/web-lkddb/USB_NET_CDCETHER.html

The second: https://cateee.net/lkddb/web-lkddb/USB_NET_RNDIS_HOST.html

I don’t know if it is enough adding these 2…you have to try. You should compile on x86 host using crosscompile toolchain with build.sh instead of r64 directly to get more compile speed. You can use build.sh to install to sdcard and only add kernel/fdt line in your uenv.txt (build.sh uenv).

does this card use ocie and usb? then you can only use pcie-slot shared with sata (cn8), the other slot has no usb. in my kernel-source you need to disable sata-support in dts to use pcie slot…but maybe you also affected from pcie-issues (missing capacitors/limited power)

So I’m just gonna conquer this old thread :innocent:

First things first: I absolutely appreciate all of your effort in maintaining these patched kernels for BPI-R64! Great job! Thank you very much, @frank-w !

https://github.com/frank-w/BPI-R2-4.14/

Now coming to my question:

Looking at the default branch of your GitHub repositories, you’ve got that table listing kernel versions vs. features, yet I can see much more activity on the 5.15 or even 5.18-branches.

Which branch would you recommend currently when I want to compile my own kernel for the R64? Still use the 5.10 best or the newest mainline 5.18? Anyone in between? 5.17 stable?

Didn’t find a hint on your website nor on GitHub what you would recommend.

Thanks a lot!

Ralf

The table contains only lts kernels. You can use 5.15 (last dts) too. But have not yet did extensive tests because i needed my time to get r2pro working.

Latest stable (but not lts) is in 5.18-main branch.

Compared to 5.10-main,hwnat should work (have downported it to 5.10-hnat). So maybe 5.15 is better than 5.10 for you. I recommend using latest lts, so 5.15

1 Like

Thanks a lot for your advice! …pulling the sources right now :slight_smile:

FYI: have updated LTS branches to latest version

1 Like

have anyone tried 5.18 yet (itb)? seems it is broken for mt7622…i see only “starting kernel” after load in uboot but nothing more…tried earlycon without success

edit: serial issue can be fixed with this patch: https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

currently see issue with mt7622-wmac with 5.18-rc1 (5.17.0 works) repeating this message (increasing seq number)

[   48.208843] mt7622-wmac 18000000.wmac: Failed to get patch semaphore
[   68.681723] mt7622-wmac 18000000.wmac: Message 00000010 (seq 3) timeout

@Ryder.Lee @weijiegao have you an idea?