Skip to content

Commit

Permalink
Fix create+prepare rt kernel scripts (#701)
Browse files Browse the repository at this point in the history
* Updating build and prepare scripts

* wget failing due to ssl cert fix

* matching linux version formatting across scripts
  • Loading branch information
Athen-Player1 authored Apr 11, 2024
1 parent 9e76b17 commit aa368eb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
16 changes: 11 additions & 5 deletions bin/create_rt_kernel_deb.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash

KERNEL_VERSION="4.13.13"
# 1) Replace with kernel version
KERNEL_VERSION="x.x.x"

# https://www.debian.org/releases/stable/i386/ch08s06.html.en
sudo apt-get install kernel-package fakeroot libssl-dev
sudo apt-get install kernel-package fakeroot libssl-dev dpkg-dev libelf-dev

cd linux-${KERNEL_VERSION}/
make-kpkg clean
make clean

# set concurrency to all cores but one
export CONCURRENCY_LEVEL=$(expr $(grep -c ^processor /proc/cpuinfo) - 1)
sudo fakeroot make-kpkg --initrd --revision=1.0.custom kernel_image

# 2)a) on systems prior to 22.04 run below
#sudo fakeroot make-kpkg --initrd --revision=1.0.custom kernel_image

#2)b) on systems 22.04 and up run
#sudo fakeroot make bindeb-pkg
16 changes: 10 additions & 6 deletions bin/prepare_rt_kernel.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

RT_PATCH_DIR="4.13"
RT_PATCH_VERSION="4.13.13-rt5"
KERNEL_DIR="v4.x"
KERNEL_VERSION="4.13.13"
RT_PATCH_DIR="x.xx"
RT_PATCH_VERSION="x.xx.xx-rtx"
KERNEL_DIR="vx.x"
KERNEL_VERSION="x.xx.xx"

wget https://www.kernel.org/pub/linux/kernel/projects/rt/${RT_PATCH_DIR}/patch-${RT_PATCH_VERSION}.patch.xz
wget https://www.kernel.org/pub/linux/kernel/${KERNEL_DIR}/linux-${KERNEL_VERSION}.tar.xz
# Double check the links here as they do change over time to include new paths i.e. kernel/projects/old/rt
wget https://www.kernel.org/pub/linux/kernel/projects/rt/${RT_PATCH_DIR}/patch-${RT_PATCH_VERSION}.patch.xz --no-check-certificate
wget https://www.kernel.org/pub/linux/kernel/${KERNEL_DIR}/linux-${KERNEL_VERSION}.tar.xz --no-check-certificate
tar -xvJf linux-${KERNEL_VERSION}.tar.xz
cd linux-${KERNEL_VERSION}/
xzcat -dc ../patch-${RT_PATCH_VERSION}.patch.xz | patch -p1
Expand All @@ -18,6 +19,9 @@ make mrproper
cp /boot/config-`uname -r` .config

make olddefconfig
# Setting systemkeys to avoid; No rule to make target 'debian/certs/test-signing-certs.pem' build error
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
scripts/config --disable SYSTEM_REVOCATION_KEYS

# edit manually the RT_PREEMPT parameters:
# General Setup -> Preemption Model set to Fully Preemptible Kernel (RT)
Expand Down

0 comments on commit aa368eb

Please sign in to comment.