I've been installing kernels from mainline repository - all simple there, just *.deb files, one can do simple dpkg -i on them. But how can one apply the patches 0001-base-packaging.patch , 0002-debian-changelog.patch, 0003-configs-based-on-Ubuntu-4.4.0-0.10.patch manually ?
Asked
Active
Viewed 3.2k times
8
Sergiy Kolodyazhnyy
- 103,293
- 19
- 273
- 492
1 Answers
11
As stated in README at mainline:
These binary packages represent builds of the mainline or stable Linux kernel tree at the commit below:
v4.4 (afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc)To obtain the source from which they are built fetch the commit below:
git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v4.4and apply the following patches on top in the order below:
0001-base-packaging.patch 0002-debian-changelog.patch 0003-configs-based-on-Ubuntu-4.4.0-0.10.patch
This means that you need to apply those patches only if you are building your kernel from source and not from *.deb.
In case if you are building it from source, then these are the steps you need to follow:
Install these packages:
sudo apt-get install git build-essential kernel-package fakeroot libncurses5-devGet the source code:
mkdir anyname; cd anyname git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v4.4Copy the patches files.
Change to kernel directory:
cd v4.4Make any custom changes.
Apply patches:
patch -p1 < ~/anyname/0001-base-packaging.patch patch -p1 < ~/anyname/0002-debian-changelog.patch patch -p1 < ~/anyname/0003-configs-based-on-Ubuntu-4.4.0-0.10.patchMake:
cp /boot/config-`uname -r` .config gedit .config make oldconfig make menuconfig make clean make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-customInstall generated deb:
sudo dpkg -i ../*.debUpdate
GRUBand reboot:sudo update-grub; sudo reboot
Raphael
- 7,985
- 5
- 34
- 51
-
So in short, if I'm using the `*.deb` files, patches are already there ? – Sergiy Kolodyazhnyy Jan 24 '16 at 05:53
-
@Serg - Yes! right. – Raphael Jan 24 '16 at 05:55
-
I do not think the package list is complete. For example, and as of kernel 4.3 `libssl-dev` is needed. – Doug Smythies Jan 25 '16 at 16:30
-
After oldconfig runs, the config is much different then the one provided by the mainline kernel (eg: extracting boot/config-xxxx from linux-image-xxxx.deb). It would be desirable to have identical config vs. the one that shipped. – Kevin Feb 11 '16 at 20:19
-
forgot to do the important part "git checkout v4.4" you compile the main branch not v4.4 – user249654 Dec 19 '19 at 23:27