I can build working kernel packages (kernel-image
and kernel-headers
) from vanilla kernel git sources (plus any random patches I like) following instructions at http://veithen.github.io/2013/12/19/ubuntu-vanilla-kernel.html (most important parts copied below in case the referenced page goes away):
- Have enough unused disk space (15-20 GB)
- (once)
sudo apt-get install kernel-package git libssl-dev
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
- (optional) modify the source as needed, apply patches, add remotes etc.
cp /boot/config-$(uname -r) .config
yes "" | make oldconfig
ormake olddefconfig
unless you want to build an ancient kernelfakeroot make-kpkg --initrd --append-to-version=-my-so-and-so-patches kernel-image kernel-headers -j $(nproc)
or maybemake-kpkg --root=fakeroot --initrd --append-to-version=-my-so-and-so-patches kernel-image kernel-headers -j $(nproc)
(I'm not sure if there's a difference but I've used the former but found references suggesting the latter.)
However, make-kpkg
does not know how to build package linux-tools
which contains (among other things) the command perf
which I really would like to use. I know that I could build linux-tools
using Ubuntu source code (https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel) but is it possible to create package linux-tools
from vanilla source?
0 Answers