You are here: Home / Projects / OSADL Linux Add-on Patch / 
2020-04-02 - 18:00
OSADL Projects

OSADL Linux Add-on Patch: Built-in kernel patchset

Ping SysRqNMI SysRqLatency histograms - Built-in kernel patchset - Precise load measurement

Why storing the patchset in the kernel?

The kernel configuration can be stored in the binary kernel using the CONFIG_IKCONFIG=y kernel configuration setting; this is a welcome feature to reproduce a particular kernel at a later date when the original configuration may got lost. However, the kernel configuration is useless, if the kernel was patched and the patch set got lost as well. Therefore, an additional mechanism to also store the quilt queue in the binary kernel was added, configuration setting CONFIG_IKPATCHSET=y. If the patchset shall be made available via /proc filesystem, the configuration setting CONFIG_IKPATCHSET_PROC=y must additionally be given (equivalent to CONFIG_IKCONFIG_PROC=y).

BTW: Making the kernel sources available through this mechanism certainly does not fulfill the disclosure obligations of the GPL (but it already is much better than making available nothing).

How to recreate the kernel source tree?

The following command sequence will create a patched kernel source tree from which an identical kernel can be rebuilt (assumes that IKPATCHSET_PROC is also configured):
tar zxf /proc/patchset.tar.gz baseversion
major=`cut -d. -f1 baseversion`
dir=linux-`cat baseversion`
rm -f baseversion
wget $urldir/$archive
tar Jxf $archive
cd $dir
tar zxf /proc/patchset.tar.gz
quilt push -a
zcat /proc/config.gz >.config

Download patch