bbai64 - realtime kernel

Hello,
I am successfully using a bbai64 with a modified Dunfell-Yocto image based on TI-LINUX-SDK using BB.ORG linux-kernel-5.10.162-arm64 with a Intel ax200 wifi card. However, as soon as I switch to the linux-kernel-rt-5.10.162 (using same defconfig) the board boots fine, but it doesn’t find the Intel ax200 wifi card anymore - lspci doesn’t show a card pluged-in anymore.
Is this a known issue with the rt kernel?
Thanks a lot for your help,
have a nice day,
Bernd

Not sure if I would call it an “issue”. RT makes the kernel more deterministic and predictable. In doing so other stuff is prioritized differently and some is disabled.

Might look at your kernel config and see what is going on, might have to tweak a little bit. Keep in mind that when you change settings the deterministic nature of that kernel build will change.

Hello,
attached is the defconfig which I use for the linux-kernel-5.10.162-arm64 as well as linux-kernel-rt-5.10.162 - I intended to use it as a starting point before enabling RT in menuconfig. It is based on the bb.org defconfig for bbai64.
defconfig (207.8 KB)

Use $ diff <file a> <file b> it will show you the differences assuming both are in the same line by line order.

Hello,
@RobertCNelson: you write in the “AI-64 - RT Kernel?”(AI-64 - RT Kernel?) thread, that BeagleBone AI-64 “RT is still not booting on 5.10.x for us yet…” Do you know the reason why this fails?
Thanks a lot for your help Robert,
have a nice day,
Bernd

@foxsquirrel: did you read my previous posts? I run the BBAI64 with both the linux-kernel-rt-5.10.162 and the linux-kernel-5.10.162 while applying the same defconfig - which is the original BBAI64 defconfig from bb.org kernel repository (just turned off the compression for modules)! Thus there is no difference between the two defconfig’s.

Hi @bernd please give this a try with a spare image, (might not boot)…

sudo apt update
sudo apt install bbb.io-kernel-6.3-rt-k3
sudo reboot

It’s just mainline 6.3-rc3 + RT

Regards,

1 Like

Hello Robert,
unfortunately, the mainline 6.3-rc3-RT kernel has the same issue - lspci doesn’t list the intel ax200 wlan adapter…
I guess I have to wait until this issue is fixed and use as a work around a USB-based wifi adapter…

Thanks a lot for your help,
have a nice day,
Bernd

PS: The realtime-behaviour is much better with the BBAI64 than it is with the BBlue - I got now 2 CanOpen servo drives running in CSP @500Hz on the BBAI64 without any timing issues, whereas the BBlue didn’t manage to run those without timing issues @100Hz… (latest 5.10 rt kernel, disabled USB gadget)

@RobertCNelson
There are some changes related to PCIe-PLL setup in the kernel driver “drivers/phy/cadence/phy-cadence-sierra.c” in the bb.org-arm64 branch - Applying those changes to the ti-linux(-rt) branches fixes the pcie issue. Wifi with the Intel ax200 and a fully preempt-rt kernel works now like a charm… Making the bbai64 an ideal plattform for mobile-robotics
:wink:

1 Like

Thanks for testing @bernd , pushed; add 0001-HACK-Sierra-Drive-clock-out.patch (3b4de6f4) · Commits · Robert Nelson / arm64-multiplatform · GitLab

1 Like

Hi guys,

Looks like lots of progress on this :slight_smile:

So what is now the easiest way to install the kernel, does sudo apt install bbb.io-kernel-6.3-rt-k3 now work?

Thanks

Andy

Correct, that’ll install it… Now that 6.4 is opening up, if there is a 6.4-rt branch, i’ll do the same…

Regards,

1 Like

Great, thanks @RobertCNelson

@RobertCNelson Hello Robert, just for information.
I didn’t realize that modifying the phy-cadence-sierra driver breaks the USB functionality for RT and non-RT kernels 6.1-ti, 6.1, 6.3 & 6.4-ti as well… “lsusb” doesn’t show any USB-devices anymore… I only tested with the latest 6.1-ti, 6.1, 6.3 & 6.4-ti kernels (It works fine on the latest 5.10-ti version).

Testing Right now…

6.4.0-rc6 usb works:

debian@BeagleBone:~/examples$ uname -r ; lsusb ; cat /sys/firmware/devicetree/base/model 
6.4.0-rc6-arm64-k3-r6.1
Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c34b Logitech, Inc. USB Keyboard
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
BeagleBoard.org BeagleBone AI-64

and rt:

uname -r ; lsusb ; cat /sys/firmware/devicetree/base/model 
6.4.0-rc6-rt-arm64-k3-r6.1
Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c34b Logitech, Inc. USB Keyboard
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
BeagleBoard.org BeagleBone AI-64

Regards,

1 Like

Hello Robert,
thanks for your tests - sorry for the late reply, but I was busy with other tasks…
I am working with a yocto based system and applied all the patches of the arm64-multiplatform repository, but still got the same issue (Either PCIe works and USB is broken, or USB works and PCIe is broken). The only reason I can think of might be that I use a uboot version which configures the clock-tree in the SOC differently… Which uboot version from bb.org do you suggest to use?
Thanks a lot for your help,
Bernd

Hello Robert
in the past I used your pre-compiled library

from : https://rcn-ee.com/repos/debian/pool/main/l/linux-upstream/
i.e
“linux-firmware-image-4.4.14-bone-rt-r11_1jessie_armhf.deb”
“linux-headers-4.4.14-bone-rt-r11_1jessie_armhf.deb”
“linux-image-4.4.14-bone-rt-r11_1jessie_armhf.deb

do you think there will be also similar process to patch BBAI-rt kernel?

I’m not an expert with kernel compiling…

Thanks in advance
Massimiliano

Confused, BeagleBone AI or BeagleBone AI64 (you replied to the BeagleBone AI64 thread?)

Regards,

Hello Robert
I’m looking for a pre-compiled rt kernel to mount into ssd for BB-AI-64
or
similar solution used to patch the kernel like we did BBB. (but of curse different files…)

our final target is to have a fully preempt rt kernel in the way to use the board : “BBAI64” like an hard -real time PLC.

we used, till now, BBB but for some application we reach its limit (CPU and memory) , so we are looking for some strong board solution and we tough to BB-AI-64. we hope that with preempt -rt kernel we can reach a jitter <= 50us

Best regards
Massimiliano

Today here are some options to try:

long lived TI 6.1.x + RT branch

sudo apt update ; sudo apt install bbb.io-kernel-6.1-rt-ti

mainline 6.6.x + RT branch

sudo apt update ; sudo apt install bbb.io-kernel-6.6-rt-k3

TI is also playing around with RT Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel.git/shortlog , this “repo” builds it when things get pushed to ti’s repo…

git: BeagleBoard.org / ti-rt-linux-kernel-6.1.y-arm64 · GitLab

repo: Index of /public

Regards,

Hello Robert
Many thanks for your information and support
Regards
Massimiliano