I'm running Ubuntu 15.10 on a new laptop but in order to get proper full support for this hardware I apparently need the 4.4 kernel + a custom patch. See here if you're interested in the details.
I know about the mainline kernel PPAs but my understanding is that they don't come with source. If this is the case, This would seem to eliminate the possibility of using a mainline kernel PPA because I can't patch it. So I've been trying to check out the git source and build it but can't find up to date, relevant instructions.
Can somebody help with instructions for building a 4.4 kernel on 15.10?
Best Answer
Get and compile the mainline kernel, git method:
see also: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild I do things a little different (what else is new?).
Prerequisites (Must):
Step 1 is to
apt-get update
andapt-get dist-upgrade
(i.e. make sure everything is up to date)Step 2
Step 3
Step 4
Prerequisites as of kernel 4.3:
Step 5 - based on not being able to compile on a new 20.04 server installation 2019.12.02
Prerequisites (Optional):
The git part:
Never do stuff in the default master branch. Always make some work area.
Steal the Ubuntu kernel configuration file (already installed):
Ubuntu config file has full debugging. Makes an enormous kernel and takes twice as long to compile
Special note as of Kernel 4.4 and if compiling using Ubuntu 14.04 (I don't know about 15.10), with an older version of the c compiler: It can not compile with CONFIG_CC_STACKPROTECTOR_STRONG.
If your version doesn't have LZ4 compression (i.e. 16.04) you need also:
Special note as of Kernel 5.12-rc1 one needs to override some newly added certificate stuff.
Compile the kernel:
or
or
When the build has completed, install it:
So, at this point we know the mainline kernel compiles O.K., so move onto the custom kernel. Create a new branch, apply the patches and compile:
Note that it is on purpose that I do not do a
make clean
, as it is desirable to save a lot of time by doing an incremental build. The first compile took 21 minutes and 26 seconds, but the next custom compile took only 4 minutes and 43 seconds.