|
|
Subscribe / Log in / New account

Kconfiglib

By Jonathan Corbet
February 2, 2011
The kernel configuration system is a complex bit of code in its own right; many people who have no trouble hacking on kernel code find reasons to avoid going into the configuration subsystem. There is value in being able to work with the complicated data structure that is a kernel configuration, though. Ulf Magnusson has recently posted a library, Kconfiglib, which, he hopes, will make that easier.

Kconfiglib is a Python library which is able to load, analyze, and output kernel configurations; care has been taken to ensure that any configuration it creates is identical to what comes out of the existing kernel configuration system. With Kconfiglib, it becomes straightforward to write simple tools like "allnoconfig"; it also is possible to ask questions about a given configuration. One possible tool, for example, would answer the "why can't I select CONFIG_FOO" question - a useful feature indeed.

There are currently no Python dependencies in the kernel build system; trying to add one could well run into opposition. But Kconfiglib could find a role in the creation of ancillary tools which are not required to configure and build a kernel as it's always been done. For the curious, there's a set of examples available.

Index entries for this article
KernelBuild system/Kernel configuration


to post comments

Kconfiglib

Posted Feb 7, 2011 17:47 UTC (Mon) by daniel (guest, #3181) [Link] (6 responses)

"There are currently no Python dependencies in the kernel build system; trying to add one could well run into opposition."

That's a troll, Jon.

Kconfiglib

Posted Feb 7, 2011 17:52 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link]

Umm, no. C.f CML2

Kconfiglib

Posted Feb 7, 2011 17:54 UTC (Mon) by mjg59 (subscriber, #23239) [Link]

Its dependence on python was one of the arguments against CML2. Of course, that was a decade ago - the spread of python in the intervening time should make the argument less relevant, but Jon's entirely right that adding a python dependency could result in pushback.

Troll?

Posted Feb 7, 2011 21:03 UTC (Mon) by corbet (editor, #1) [Link]

Excuse me for being dense, but...exactly how is that a troll? I intended it as a pretty straightforward statement of fact.

Kconfiglib

Posted Feb 10, 2011 14:43 UTC (Thu) by ariveira (guest, #57833) [Link] (2 responses)

People is actively removing even dependencies on perl in some parts of the
linux kernel (build) https://lkml.org/lkml/2011/1/16/115
So yes i would say that adding python will find some resistenace

Kconfiglib

Posted Feb 10, 2011 20:35 UTC (Thu) by oak (guest, #2786) [Link] (1 responses)

I can well understand that for the build itself, but as this is an additional tool, why there would be resistance for it?

One of the nice things of python code is that you don't need to (cross-)compile it, it works as-is on any Linux/architecture (which has python interpreter).

Kconfiglib

Posted Feb 10, 2011 20:39 UTC (Thu) by dlang (guest, #313) [Link]

in part, because when you are trying to bootstrap a new machine you don't have all the tools ported to the new platform yet.

it's hard to run python on a machine that python hasn't been ported to.

Kconfiglib

Posted May 31, 2015 20:04 UTC (Sun) by ulfalizer (guest, #102900) [Link]

Kconfiglib lives at https://github.com/ulfalizer/Kconfiglib these days by the way.

I didn't post the original patches expecting it to become an integral part of the kernel build process. It's more of an an auxiliary support library. :)


Copyright © 2011, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds