2

Is there any documentation on how to build custom kernel packages and upload the result into a PPA? In particular, I would like to build mostly the stable upstream kernel (i.e. git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git) with a patch for MPTCP. Since the MPTCP patch requires a very specific kernel version, I cannot simply use the Ubuntu kernel repositories.

So far, I found this:

  • Manually building kernels works, of course, i.e.: fakeroot make-kpkg clean CONCURRENCY_LEVEL=getconf _NPROCESSORS_ONLN fakeroot make-kpkg --initrd --append-to-version=-mptcp \ kernel_image kernel_headers kernel_source kernel_doc kernel_manual kernel_debug

Then, I get .deb packages. "dpkg -i ..." works as well, but I would like to automatise package handling with apt-get and a PPA.

  • make-kpkg does not generate a .changes file, which is necessary for dput. I of course checked documentation, manpage of make-kpkg, and grep'ed through the sources of the kernel-package package -> no information on how to let it generate the right output.

  • Some other users (like https://forum.ubuntuusers.de/topic/ppa-mit-custom-kernel-erstellen/) did not manage a kernel PPA upload as well. At least, there is no documentation available.

Is there any change of building PPA-uploadable kernel packages with reasonable effort?

1 Answer 1

1

I had the same question and I have finally found a working solution.

The following worked for me. Some steps can certainly be optimized.

  1. get the source for a mainline build, check the SOURCES file and get everything:

    git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
    cd mainline-crack/
    git checkout -b v4.7.10 b3afc4525a507f21e98cc7571ea8c3f28484241c
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0001-base-packaging.patch
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0004-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0005-debian-changelog.patch
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.10/0006-configs-based-on-Ubuntu-4.7.0-0.2.patch
    
    1. apply the patches:

      git am 000*

    2. build files in debian:

      debian/rules clean

    3. build the source debs (without signature):

      dpkg-buildpackage -us -uc -S

    4. adjust the Changed-By: in the .changes file to your ppa uploader account

    5. sign the package

      deb-sign linux_4.7.10-040710.201610220847_source.changes

    6. upload

      dput ppa linux_4.7.10-040710.201610220847_source.changes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .