Source package for Patchbox


In order to compile some MIDI drivers I need to download the source package for 4.19.71-rt24-v7l+.
This does not work with the expected commands however, see below:

**patch@patchbox:~ $ more /etc/apt/sources.list**
deb buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src buster main contrib non-free rpi

**patch@patchbox:~ $ sudo apt-get update**
Hit:1 rpi InRelease
Hit:2 buster InRelease 
Hit:3 syncthing InRelease                     
Hit:4 buster InRelease
Get:5 buster/main Sources [11.4 MB]
Get:6 buster/non-free Sources [139 kB]                                                                               
Get:7 buster/contrib Sources [78.5 kB]                                                                               
Get:8 buster/rpi Sources [1132 B] 
Fetched 11.6 MB in 11s (1021 kB/s) 
Reading package lists... Done

**patch@patchbox:~ $ sudo apt-get source linux-image-$(uname -r)**
Reading package lists... Done
E: Unable to find a source package for linux-image-4.19.71-rt24-v7l+

Crossing my fingers that someone in this forum has some hint on how I can can download the source package.

It’s built from here:

The build script for cross-compiling the kernel is here:

On Raspberry Pi itself, you’ll have to ‘prepare’ the sources first by doing:

cd ~
git clone --depth 1 --branch rpi-4.19.y-rt linux
cd linux
make bcm2711_defconfig # For Pi4, so below for other versions
cp /boot/Module7l.symvers Module.symvers # Copy symvers for Pi4, see below for other versions
make modules_prepare

# You may create build & source links too, so 'out of tree' module builds work:
sudo ln -sf /home/patch/linux /lib/modules/$(uname -r)/build
sudo ln -sf /home/patch/linux /lib/modules/$(uname -r)/source

bcm2711_defconfig is for RPi4, use bcm2709_defconfig for RPi2/3 or bcmrpi_defconfig for 1 / zero.
/boot/Module7l.symvers is for RPi4, use /boot/Module7.symvers for RPi2/3 or /boot/Module.symvers for 1 / zero.

See following links & tool source code for more information:

1 Like