R64 build with kernel 5.15

do you compile on r64 or on x86 host?

sd folder should be created above your source-root…if you build on r64 this may fail due to permissions

uenv.txt is not created by my kernel-repo…it either exists on your image or you have to create it

I compile on X86, then transfer to SD card and update uENV manually. Sorry yes uENV I always edit on SDcard. I will double check the permissions for entire path

Thanks

if you have sdcard you can use install-target :wink: its easier than pack / unpack

Thanks Frank,

Looks like my actual problem was that I was using X64 server hardware to compile, got things working up to write to SD when using X86 i7 laptop.

Successfully compiled and wrote to SD, but now booting with the following error hanging just after kernel load

'Boot from SD

reading bananapi/bpi-r64/linux/uEnv.txt

1096 bytes read in 5 ms (213.9 KiB/s)

Loaded environment from uEnv.txt

Banana Pi bpi-r64 chip: mt7622 Service: linux

reading bananapi/bpi-r64/linux/dtb/

reading bananapi/bpi-r64/linux/uImage_5.15.0-main

FAT: Misaligned buffer address (4007ff28)

13365320 bytes read in 4427 ms (2.9 MiB/s)

bootm flag=0, states=70f

Booting kernel from Legacy Image at 4007ff28 …

Image Name: Linux Kernel 5.15.0-main

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 13365256 Bytes = 12.7 MiB

Load Address: 40080000

Entry Point: 40080000

Verifying Checksum … OK

Loading Kernel Image … OK

Starting kernel …

[ATF][ 25.026388]save kernel info

[ATF][ 25.029591]Kernel_EL2

[ATF][ 25.032347]Kernel is 64Bit

[ATF][ 25.035535]pc=0x40080000, r0=0x0, r1=0x0

INFO: BL3-1: Preparing for EL3 exit to normal world, Kernel

INFO: BL3-1: Next image address = 0x40080000

INFO: BL3-1: Next image spsr =’ 0x3c9

[ATF][ 25.053198]el3_exit

Any ideas? I dont mind writing a new image I can make my customizations and upgrades there. Could it be my Ubuntu image?

Many thanks

FAT: Misaligned buffer address (4007ff28)

Is strange…which image do you use? My Buster and bullseye using new bootchain and booting fit image

Strange indeed.

I used a matured image based on this thread:

Started with this Ubuntu 16.04 image and built it up based on this thread to a Ubuntu 20.04LTS with Kernel 5.10:

The build was beautifully stable but 5.15 doesnt like it at all

I am going to start again with the original image, apply the new kernel and then take it to Ubuntu 21.04LTS adding LXC, BPF, XDP and iwlwifi WIFI6E. BPF was a challenge on 5.15 but after removing BPF_PRELOAD from the build it went through. Seems Ubuntu 2104LTS is healthy with Kernel 5.15

With my k3s LXC I can’t really deviate from Ubuntu. Debian does not like that due to FUSE and BTRFS

Thank you so much for the assistance. Always appreciated

Again thank you so much for putting me on the right path to compile on X86. I have been having months and months of challenges compiling on MPU E5 Xeons

Upgrade a system is mostly dirty. I prefer a clean install. Maybe 5.15 is not mature enough. You can upgrade it using

./build.sh upgradesrc

Which should add stable git tree and upgrade linux source to latest version step by step. Why does debian not like new kernel? I’ve seen no problems as i use only debian. Maybe kernel for r64 misses some options, but this is independ of operating system. Maybe debian needs update too

apt update && apt upgrade

In my wiki you’ll find instructions to install ubuntu via debootstrap and change basic things (root password,apt sources, …)

“Maybe 5.15 is not mature enough.”

After working with it a few days I agree.

5.10 unfortunately lacks a couple of features in WIFI6 for 11AX and 11AZ especially in GT thoughput. 2500GT capable runs max 434Mbps over R64 MT7x where on 5.10 I have measured 884 Mbps on the R64 MT7622 PHY switch. Unfortunately this filters through to the PCIe’s as well, Spoke to SinoVoip and they will fix PCIe power in v1.2 but even on PCIe 1 the throughput is basically the same as on ETH and they confirmed they are not changing the bus, or going up from USB 2.0 on PCIe :frowning:

For now, What would you suggest maybe 5.12?

try to upgrade 5.15 (afaik in my repo it is still 5.15.0, so first release)

if last 5.15.x is not stable enough i would try 5.10 as it is latest stable, if this is no option because of missing features you should try latest full stable upgraded to last dot-relase (5.14.x)

Thanks a lot. Going back to 5.14 now. Will let you know how it looks

Have you already tried upgrading 5.15?

5.14 worked on the original Ubuntu 16 build. I think the custom setup on Ubuntu 20.04 LTS was probably causing the issue.

I am doing a new build now on 5.15 with ./build.sh upgradesrc. I will update on results.

Thanks again

“In my wiki you’ll find instructions to install ubuntu via debootstrap and change basic things (root password,apt sources, …)”

Would you mind sending me the link to your debootstrap tutorial. I have been looking all over on your wiki and I seem to be missing it.

Upgradesrc does only merge stable git and needs to run for each dot-release. You can also add stable remote,fetch and merge last dot-release of currrent kernel version.

git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch stable
git merge v5.15.10

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

1 Like

Interesting, above error is caused when producing the fit based firmware image. dtb however works perfect.

I am going to try debootstrap with arm64. Thank you very much debootstrap process is most definitely a much cleaner way of doing things and would allow pre loading custom drivers into the initial build as well as custom c headers. Wonderful

Afaik fit can be only loaded by new bootchain with opensource atf,so only with my last 2 debian images

I am very interested in the new bootchain and how to generate clean Images of Ubuntu. I am keen to develop on the cananonical stack. If someone else might want to assist I am even interested in acquiring resources on a ad hoc basis. If you ahve any suggestions this would be very much appreciated. I love the R64 as a network device.

just download my bullseye image, clean the root-partition and add deboostrapped ubuntu :wink:

most infos are in my wiki…after uncompressing image, you can setup it as loopdevice and mount partitons like on real sdcard

basicly:

loopdev=$(losetup -f)
sudo losetup ${loopdev} bpi-r64.img
sudo partprobe ${loopdev}

then you can mount partitons ${loopdev}pX and change stuff you want

bootstrapping ubuntu:

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:ubuntu

It is even possible to boot without uboot if you like…

You can look in my buildscript on how to debootstrap