Sample Header Ad - 728x90

How to Revert to Kernel 6.1.63 and Compile xtrx-dkms on Raspberry Pi 4 (Bookworm) After apt upgrade?

0 votes
0 answers
33 views
I am a cybersecurity student with what is seeming like at this point some lofty goals. I’m building an RF detector/locator on a Raspberry Pi 4 (8GB) with a SanDisk 32GB microSD card running Raspberry Pi OS Bookworm (64-bit, Desktop), using XTRX (SDR) and other components. **Problem:** After running sudo apt update and sudo apt upgrade, my kernel is 6.12.34+rpt-v8 (uname -r), and xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.2) fails to compile. **What I Did:**
sudo apt update
sudo apt upgrade
sudo apt install xtrx-dkms
**Error (from /var/lib/dkms/xtrx/*/build/make.log):**
error: ‘vm_flags’ undeclared
error: ‘uart_state’ has no member named ‘xmit’
error: ‘class_create’ undeclared
**Output:**
$ uname -r
6.12.34+rpt-v8
$ dpkg --print-architecture
arm64
**What I Expected:** apt upgrade to maintain a compatible kernel (e.g., 6.1.x), and xtrx-dkms to compile and load (lsmod | grep xtrx). **Actual Behavior:** apt upgrade updated to 6.12.34+rpt-v8, causing xtrx-dkms compilation to fail with: E: Sub-process /usr/bin/dpkg returned an error code (1) **Goal:** Revert to kernel 6.1.63-rpi-v8, pin it, and compile xtrx-dkms (possibly using [https://github.com/myriadrf/xtrx_linux_pcie_drv](https://github.com/myriadrf/xtrx_linux_pcie_drv) patch). **Question:** How do I revert to kernel 6.1.63-rpi-v8, pin it, and compile xtrx-dkms on Raspberry Pi OS Bookworm? Is the GitHub patch sufficient? **Planned Steps:**
sudo apt install linux-image-rpi-v8=1:6.1.63-1+rpt1 linux-headers-rpi-v8=1:6.1.63-1+rpt1
sudo nano /boot/firmware/config.txt
**Add:**
[all]
kernel=vmlinuz-6.1.63-rpi8-rpi-v8
initramfs initrd.img-6.1.63-rpi8-rpi-v8 followkernel
auto_initramfs=1
sudo apt-mark hold linux-image-rpi-v8 linux-headers-rpi-v8
sudo reboot
Any help would be appreciated! Thanks!
Asked by MendoBud (1 rep)
Jul 18, 2025, 08:25 PM
Last activity: Jul 19, 2025, 07:06 AM