Sometimes a user might want to build her own kernel instead of using the provided binary, for various reasons. This means creating own .config and maintaining it through kernel version bumps, which often results in running "make oldconfig" and mostly holding down the enter button to accept upstream defaults.

What I envision instead is a way to say where I want my own config to deviate from the distro default (as provided by e.g. kernel-stable on openSUSE), and only those options will override the distro default configuration. This distro default configuration is always updated for new upstream releases, so there should be no need to (manually or automatically) accept new upstream defaults, thus less risk of producing a broken kernel, as e.g. any new kernel options will be configured in the distro kernel so that they work with the distro itself (while upstream defaults might not be safe or desired). So the plan is to prototype a set of scripts to manipulate .config files so that user can create .config containing just the options he cares about having enabled/disabled/module, and the result is combined with distro defaults before building the kernel. If it works as intended, these scripts could be perhaps incorporated into upstream kernel's kconfig environment.

I plan to prototype this approach on Gentoo first, for several reasons: 1) On Gentoo, kernels are currently built only manually and users have to maintain their configs. Yet people are asking for automation, so I believe this would get used rather quickly. 2) It's source-based distro, so it's easy to create a new package (ebuild) which will use the prototype .config manipulation scripts to build+install kernel binaries automatically without need for external service such as OBS. 3) I'm still more familiar with ebuilds than spec files :)

Later for openSUSE, this would probably require some kind of OBS wrapper script that takes the distro kernel's (e.g. kernel-stable) OBS directory and produces a new one in home:user with the resulting .config file, and builds a rpm of that.

Looking for mad skills in:

Nothing? Add some keywords!

This project is part of:

Hack Week 11

Activity

  • almost 2 years ago: deneb_alpha disliked Support for automatically building kernels with user-influenced configuration
  • almost 5 years ago: a_faerber liked Support for automatically building kernels with user-influenced configuration
  • about 5 years ago: sleep_walker liked Support for automatically building kernels with user-influenced configuration
  • about 5 years ago: pluskalm liked Support for automatically building kernels with user-influenced configuration
  • about 5 years ago: whdu joined Support for automatically building kernels with user-influenced configuration
  • Show History

    Comments

    • whdu
      about 5 years ago by whdu | Reply

      It's a good idea for it can help customize and maintain own kernel easily. I had a little experiences about Gentoo and have ever build gentoo kernel. I'm not quite familiar with ebuild. But still hope to give you some helps (learn from the project mostly ;) ). I also have a future idea. Besides providing "some kind of OBS wrapper script", we can also make it more easy to complete all building works on local (automatically). It's a kind of method of import "Gentoo" way on openSUSE.

    • a_faerber
      almost 5 years ago by a_faerber | Reply

      Possibly related: agraf recently put together a script for packaging downstream kernels http://users.suse.com/~dmueller/contrib_kernel.sh and schwab sent a patch to opensuse-kernel to support config files outside the official configs tarball.

      • vbabka
        almost 5 years ago by vbabka | Reply

        Thanks I will look into that. Meanwhile my work is at https://github.com/tehcaster/ There's overlay with very crude kernel ebuild and a copy of funtoo's genkernel ebuild that adds some support for building inside emerge. In the kernel-scripts repo there's the initial prototype script for config manipulation. Also the whole idea is in more details described here http://labs.suse.cz/vbabka/ld.pdf

    Similar Projects

    This project is one of its kind!