Newer linux kernels than 5.10.x on BBAI64

Has anyone done any work on using newer linux kernels then the default 5.10.x on the BBAI64?
Are there any ongoing work available somewhere?
Are there identified problems with newer kernels when running on BBAI64?

Hi @Jonas_Bulow officially merged on 12/12, for v6.2-rc…

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01f3cbb296a9ad378167c01758c99557b5bc3208

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts

Here’s my plan for the unlimited number of kernel versions…

5.10.x-ti this will be the pre-install for probably the next 3-6 months… Then we will move to ti’s 6.1.x-ti stack…

Outside of that, i’ll do my usual “6.W.x-bone (bone/k3/something…)” that i’ve done before… I’m going to cherry pick commits from 6.2 and backport into 6.1, thus creating an 6.1.x-k3 lts branch and still do 6.2.x-k3 branch, 6.3.x etc… So every major branch will get a separate group… lts will get long term builds…

Just like: Debian 10.x/11.x Kernel Updates but for k3 only!

RT is dynamic in newer kernel’s so we shouldn’t have the non-rt vs rt builds…

What works… A lot… video, ethernet, usb, i know worked while testing mainline…

pcie - patches…
audio - not working anywhere

Now that kernel dts is merged, once -rc1 we can talk to Tom @ u-boot and start getting that mainline… (kernel dts is before u-boot…)

PS… you’ve could of tested the whole time!

While the dtb is not present in 6.1.0, the install script will use the old one from 5.10.x.

I’ve been keeping the device-tree in 5.10.x pretty in sync with what went mainline…

Edit: here’s my plan…

sudo apt update
sudo apt install bbb.io-kernel-6.1-k3-lts
sudo reboot

Options (pick one, remove installed before installing new…)

bbb.io-kernel-5.10-ti
bbb.io-kernel-6.1-ti

bbb.io-kernel-mainline  #(follows weekly rc's)

bbb.io-kernel-6.1-k3-lts
bbb.io-kernel-6.2-k3

Then just run, to stay in sync with that branch…

sudo apt update ; sudo apt upgrade

Regards,

3 Likes

I tried to go back to 5.10 from mainline but it still boots into 6.2. I have the following files in /boot:

root@beaglebone:/boot# ls -1
SOC.sh
System.map-5.10.120-ti-arm64-r67
System.map-5.10.145-ti-arm64-r72
System.map-5.10.153-ti-arm64-r86
config-5.10.120-ti-arm64-r67
config-5.10.145-ti-arm64-r72
config-5.10.153-ti-arm64-r86
dtbs
firmware
initrd.img-5.10.120-ti-arm64-r67
initrd.img-5.10.145-ti-arm64-r72
initrd.img-5.10.153-ti-arm64-r86
vmlinuz-5.10.120-ti-arm64-r67
vmlinuz-5.10.145-ti-arm64-r72
vmlinuz-5.10.153-ti-arm64-r86

Where is 6.2 placed in the filesystem and why is it not removed when uninstalling mainline?

sudo apt update
sudo apt install linux-image-5.10.153-ti-arm64-r86 --reinstall

Will place the boot files into the correct location…

Our default setup is:

/boot/firmware/extlinux/extlinux.conf

    fdtdir /
    #fdt /k3-j721e-<custom>.dtb
    #fdtoverlays /overlays/<file>.dtbo
    initrd /initrd.img
voodoo@bbai64-02:~$ ls -lha /boot/firmware/
total 41M
drwxr-xr-x 4 root root   16K Jan  1  1970 .
drwxr-xr-x 4 root root  4.0K Jan  6 18:46 ..
-rwxr-xr-x 1 root root    57 Nov  1 07:35 ID.txt
-rwxr-xr-x 1 root root   28M Jan  6 18:46 Image
-rwxr-xr-x 1 root root     0 Dec 21 00:29 config.txt
drwxr-xr-x 2 root root  2.0K Nov 11 01:10 extlinux
-rwxr-xr-x 1 root root  9.2M Jan  6 18:46 initrd.img
-rwxr-xr-x 1 root root   55K Jan  6 18:46 k3-am625-sk-lpmdemo.dtb
-rwxr-xr-x 1 root root   55K Jan  6 18:46 k3-am625-sk.dtb
-rwxr-xr-x 1 root root   42K Jan  6 18:46 k3-am625-skeleton.dtb
-rwxr-xr-x 1 root root   18K Jan  6 18:46 k3-am62a7-sk.dtb
-rwxr-xr-x 1 root root   55K Jan  6 18:46 k3-am62x-lp-sk.dtb
-rwxr-xr-x 1 root root   55K Jan  6 18:46 k3-am642-evm.dtb
-rwxr-xr-x 1 root root   54K Jan  6 18:46 k3-am642-sk.dtb
-rwxr-xr-x 1 root root   63K Jan  6 18:46 k3-am654-base-board.dtb
-rwxr-xr-x 1 root root   53K Jan  6 18:46 k3-j7200-common-proc-board.dtb
-rwxr-xr-x 1 root root  195K Jan  6 18:46 k3-j721e-beagleboneai64-no-shared-mem.dtb
-rwxr-xr-x 1 root root  202K Jan  6 18:46 k3-j721e-beagleboneai64.dtb
-rwxr-xr-x 1 root root  109K Jan  6 18:46 k3-j721e-common-proc-board.dtb
-rwxr-xr-x 1 root root  110K Jan  6 18:46 k3-j721e-proc-board-tps65917.dtb
-rwxr-xr-x 1 root root  107K Jan  6 18:46 k3-j721e-sk.dtb
-rwxr-xr-x 1 root root   79K Jan  6 18:46 k3-j721s2-common-proc-board.dtb
-rwxr-xr-x 1 root root   86K Jan  6 18:46 k3-j784s4-evm.dtb
drwxr-xr-x 2 root root  4.0K Dec  8 17:49 overlays
-rwxr-xr-x 1 root root  263K Nov 10 23:49 sysfw.itb
-rwxr-xr-x 1 root root  264K Nov 10 23:49 tiboot3.bin
-rwxr-xr-x 1 root root  799K Nov 10 23:49 tispl.bin
-rwxr-xr-x 1 root root 1006K Nov 10 23:49 u-boot.img

So the important files are Image, initrd.img, and k3-j721e-beagleboneai64.dtb

From: /etc/kernel/postinst.d/zz-uenv_txt

You can see how these are copied over:

#!/bin/sh -e

version="$1"

# passing the kernel version is required
if [ -z "${version}" ] ; then
        echo >&2 "W: zz-uenv_txt: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
        exit 2
fi

if [ -f /boot/firmware/extlinux/extlinux.conf ] ; then
        if [ -f /boot/vmlinuz-${version} ] ; then
                rm -f /boot/firmware/Image || true
                cat /boot/vmlinuz-${version} | gunzip -d > /boot/firmware/Image
                cp -v /usr/lib/linux-image-${version}/ti/k3-*.dtb /boot/firmware/ || true
                rm -f /boot/firmware/initrd.img || true
                cp -v /boot/initrd.img-${version} /boot/firmware/initrd.img || true
                if [ -d /usr/lib/linux-image-${version}/ti/overlays/ ] ; then
                        mkdir -p /boot/firmware/overlays/ || true
                        cp -v /usr/lib/linux-image-${version}/ti/overlays/*.dtbo /boot/firmware/overlays/ || true
                fi
                echo "zz-uenv_txt: Updated extlinux.conf /boot/firmware/ for: [${version}]"
        fi
fi

Regards,

Regards,

1 Like

Do I understand correctly that the lines above will, when added, override the default dtb file and/or add additional overlays?

How/where is the default name of the dtb selected when the fdt line is missing?

correct, those two extlinux.conf variables would allow you to overide the default…

In u-boot, the eeprom is read and that helps select teh default device tree: include/configs/j721e_evm.h · v2021.01-ti-08.05.00.001 · BeagleBoard.org / u-boot · GitLab

		"elif test $board_name = BBONEAI-64-B0-; then "		\
			"setenv name_fdt k3-j721e-beagleboneai64.dtb; " \

One common fdt ovride users can use: fdt /k3-j721e-beagleboneai64-no-shared-mem.dtb this allows all 4GB’s of ram to the A72 instead of splitting off into different sub systems (R5/C7x/etc…)

Rrgards,