[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RT-Kernel for armhf and RPi3 (??)



Hello,

since the question about Debian and a RT-kernels came up, also mentioning
RPi3, here some infos from me:

- Debian buster or unstable should work fine for both armhf and arm64.
The kernel
  should allow booting and normal usage, but it has not all the
patches that are available from
  https://github.com/raspberrypi/linux
- I have collected some scripts to create bootable images that are available at:
  https://github.com/laroche/arm-devel-infrastructure/tree/master/vmdb2-debian
  With vmdb2 is is pretty easy to create standard Debian images and
you should be able to
  adjust the software and add some settings for your own private needs.
- As pointed out raspian is based on Debian, but it is its own
distribution with its own discussion
  forums that you might contact.
- It has been pretty easy to take the patches from
https://github.com/raspberrypi/linux and add
  these to a standard Debian kernel. I've used this some weeks ago
with 4.19.y kernels until
  the RPi4 kernel patches moved on real current 4.19.55 or newer and thus
  didn't work anymore with 4.19.37 from Debian buster.
  Good news is that Debian master has now 5.2.1 available with
RT-patches and raspian also
  provides patches for 5.2.1:
https://salsa.debian.org/kernel-team/linux/commits/master


Here some snippets to compile 5.2.1 kernel from Debian and include the
patches from
raspian:

# extract 5.2.1 raspian patches, change commit id for other kernel versions:
git clone -b rpi-5.2.y https://github.com/raspberrypi/linux/ rpi-linux
cd rpi-linux
git format-patch -o ../rpi-patches-5.2.1
527a3db363a3bd7e6ae0a77da809e01847a9931c
cd ..

# compile newest Debian kernel 5.2.1:
sudo apt install build-essential fakeroot rsync git
sudo apt build-dep linux
git clone --single-branch --depth 1
https://salsa.debian.org/kernel-team/linux.git linux-5
test -f orig/linux_5.2.1.orig.tar.xz || wget
https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.1.tar.xz
cd linux-5
test -f ../orig/linux_5.2.1.orig.tar.xz || XZ_DEFAULTS="-T 0"
debian/bin/genorig.py ../linux-5.2.1.tar.xz
sed -i -e 's/^debug-info: true/debug-info: false/g' debian/config/defines
pushd debian/patches
  mkdir bugfix/rpi
  cp ../../../rpi-patches-5.2.1/*.patch bugfix/rpi/
  ls bugfix/rpi/*.patch >> series
popd
debian/rules orig
debian/rules debian/control
DEB_BUILD_OPTIONS="parallel=$(grep -c ^processor /proc/cpuinfo)"
XZ_DEFAULTS="-T 0" fakeroot debian/rules binary-arch 2>&1 | tee LOG
cd ..


I sometimes upload compiled kernels as well as binary armhf/arm64
vmdb2 install images
to https://github.com/laroche/arm-devel-infrastructure/releases
(5.2.1 is still compiling, if it compiles ok I'll upload it as well)
Feel free to re-use, share or submit a change request. I am also looking forward
to further improved Debian support.


best regards from Germany,

Florian La Roche


Reply to: