PREEMPT_RT patch version for current Debian 12 v6.1 kernel
30 Dec 2023 03:02 #289354
by sky_1
PREEMPT_RT patch version for current Debian 12 v6.1 kernel was created by sky_1
Hello,
I'm setting up a fresh Debian 12 machine, and have downloaded the kernel source onto the target machine to build it there.
uname -r indicates that the version is 6.1.0-16-amd64
I checked out the kernel source version v6.1 since I could see that tag existed.
When I search for the RT patch, on cdn.kernel.org/pub/linux/kernel/projects/rt/6.1/older/
I cannot see a version with a matching number, such as patch-6.1.0.patch.xz
I don't understand the naming convention. Would the following one be the correct one to select?
patch-6.1-rc7-rt5.patch.xz
Apologies if this is a basic question. I have searched around and couldn't find an answer.
(I cannot use a pre-built kernel, because I need to patch some extra stuff as well).
Many thanks!
I'm setting up a fresh Debian 12 machine, and have downloaded the kernel source onto the target machine to build it there.
uname -r indicates that the version is 6.1.0-16-amd64
I checked out the kernel source version v6.1 since I could see that tag existed.
When I search for the RT patch, on cdn.kernel.org/pub/linux/kernel/projects/rt/6.1/older/
I cannot see a version with a matching number, such as patch-6.1.0.patch.xz
I don't understand the naming convention. Would the following one be the correct one to select?
patch-6.1-rc7-rt5.patch.xz
Apologies if this is a basic question. I have searched around and couldn't find an answer.
(I cannot use a pre-built kernel, because I need to patch some extra stuff as well).
Many thanks!
Please Log in or Create an account to join the conversation.
30 Dec 2023 03:10 #289355
by cornholio
Replied by cornholio on topic PREEMPT_RT patch version for current Debian 12 v6.1 kernel
Why not leave the hard work behind and go for this
forum.linuxcnc.org/9-installing-linuxcnc...nly?start=100#289353
If you do want to build your own I'd base it on 6.1.69 kernel
rc7 would point to it being release candidate 7
forum.linuxcnc.org/9-installing-linuxcnc...nly?start=100#289353
If you do want to build your own I'd base it on 6.1.69 kernel
rc7 would point to it being release candidate 7
The following user(s) said Thank You: sky_1
Please Log in or Create an account to join the conversation.
30 Dec 2023 05:27 - 30 Dec 2023 05:28 #289358
by sky_1
Replied by sky_1 on topic PREEMPT_RT patch version for current Debian 12 v6.1 kernel
Hi,
Unfortunately I cannot use a pre-built version, because I need to patch some extra stuff in the kernel (my particular machine requires patches to get some particular hardware to work).
Since my current kernel is 6.1.0-16-amd64 I checked out the v6.1 linux source, with the assumption that if I didn't stray too far ahead in release number then it wouldn't break anything unexpectedly.
What RT patch file should be applied to the v6.1 tagged linux source?
Unfortunately I cannot use a pre-built version, because I need to patch some extra stuff in the kernel (my particular machine requires patches to get some particular hardware to work).
Since my current kernel is 6.1.0-16-amd64 I checked out the v6.1 linux source, with the assumption that if I didn't stray too far ahead in release number then it wouldn't break anything unexpectedly.
What RT patch file should be applied to the v6.1 tagged linux source?
Last edit: 30 Dec 2023 05:28 by sky_1.
Please Log in or Create an account to join the conversation.
30 Dec 2023 23:21 - 30 Dec 2023 23:23 #289396
by rodw
Replied by rodw on topic PREEMPT_RT patch version for current Debian 12 v6.1 kernel
The key is to ensure the base kernel source matches exactly with the RT Patch.
Here is an example for the 6.3 kernel but its easy to adapt to other kernels. I'd probably go with the 6.6 kernel today.
[/code]
Here is an example for the 6.3 kernel but its easy to adapt to other kernels. I'd probably go with the 6.6 kernel today.
Warning: Spoiler!
[code]apt update
sudo apt install -y build-essential bin86 libncurses5-dev pkg-config libssl-dev dwarves bison flex gnupg libelf-dev libssl-dev wget qtbase5-dev debhelper rsync git
mkdir rtlinux
cd rtlinux
#wget https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.3.tar.xz
git clone -b v6.3 --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-6.3
wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.3/patch-6.3-rt11.patch.gz
tar xvf linux-6.3.tar.xz
gunzip patch-6.3-rt11.patch.gz
cp patch-6.3-rt11.patch linux-6.3
cd linux-6.3
cat patch-6.3-rt11.patch | patch -p1
make xconfig
#Set the following: General Settings/Preemption model = Fully Preemptible Kernel
#Save then exit (Click on General settings and select option on the right side.
# These keys override security and key settings to allow .debs to be built
scripts/config --disable SYSTEM_REVOCATION_KEYS
scripts/config --disable DEBUG_INFO
scripts/config --enable DEBUG_INFO_NONE
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
git add *
make -j$(nproc) deb-pkg LOCALVERSION=-linuxcnc
[/spoiler]
Last edit: 30 Dec 2023 23:23 by rodw.
The following user(s) said Thank You: sky_1
Please Log in or Create an account to join the conversation.
01 Jan 2024 06:12 #289461
by sky_1
Replied by sky_1 on topic PREEMPT_RT patch version for current Debian 12 v6.1 kernel
Hi Rod,
Thank you for sharing your notes! I had already switched to 6.1.69 and installed some other patches that I needed before I saw your comments. However, I followed the steps you wrote, just making changes to reflect 6.1.69 instead of 6.3, and it worked! I now have the kernel running (I checked with uname -v), and it has both the RT patch, plus the extra unrelated patch I needed. This is the first time I've done a successful kernel build, so I was not looking forward to it, but your instructions were perfectly detailed.
Next step for me will be to install or build LinuxCNC, I'll give that a shot in the next day or two. Thanks again Rod, and je_dois_partir for the fast responses at this time of the year! Happy New Year : )
Thank you for sharing your notes! I had already switched to 6.1.69 and installed some other patches that I needed before I saw your comments. However, I followed the steps you wrote, just making changes to reflect 6.1.69 instead of 6.3, and it worked! I now have the kernel running (I checked with uname -v), and it has both the RT patch, plus the extra unrelated patch I needed. This is the first time I've done a successful kernel build, so I was not looking forward to it, but your instructions were perfectly detailed.
Next step for me will be to install or build LinuxCNC, I'll give that a shot in the next day or two. Thanks again Rod, and je_dois_partir for the fast responses at this time of the year! Happy New Year : )
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds