I'd like to build a jessie kernel with my configuration.

For that:

  1. I download an original tarball of the kernel, debian tarball for the kernel, and "dsc" file.
  2. Issue a command dpkg-source -x ${dsc_file}. After that I get a directory with linux sources.
  3. Update changelog in linux_src/debian directory
  4. Regenerate debian/rules.gen by running debian/bin/gencontrol.py
  5. Put my config to linux_src/.config and make olddefconfig
  6. After that I'm doing fakeroot make -f debian/rules.gen setup_amd64_none_amd64.

Then I check debian/build/build_amd64_none_amd64/.config and see there no options which were set in my config file.

What is the proper way to build the debian kernel package with my kernel configuration?



Try Section 4.5 of the Debian Kernel Handbook: "Building a custom kernel from Debian kernel source". To quote from that section

The easiest way to build a custom kernel (the kernel with the configuration different from the one used in the official packages) from the Debian kernel source is to use the linux-source package and the make deb-pkg target.

Let us know how you get on. I don't remember if I've tried this particular method. You can also write to the authors of the handbook directly. An alternative is kernel-package, but I haven't used that in awhile.

  • Thank you for the answer. Currently I'm playing with this option. But I'd like to know what other options exist for configuring. – Pavel Jul 24 '16 at 7:16

I think this is the most easier way to build a custom kernel on Debian and Ubuntu-childs.

sudo fakeroot make-kpkg --initrd --append-to-version=-whereveryouwanthere kernel-image kernel-headers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.