CML2 Coming in Kernel 2.5
MrHat writes: "Eric S. Raymond's CML2, or 'Configuration Menu Language' -- part of the next-generation Linux kernel build system -- is now officially ready for 2.5. CML2 includes a compiler for a domain-specific configuration language, used to configure kernel subsystems and resolve dependencies between them. CML2 and Linux 2.5 will 'ship' with several different configuration interfaces, including an adventure game, whipped up by ESR during an extended flight. The story from the horse's mouth (or LKML, if you prefer):'This release resolves all known logic bugs and rulebase problems. The only things left on the to-do list are convenience features and some minor improvements in the test/coverage tools. This code is now officially ready for the 2.5 fork.'"
The other examples posted on ESR's page are for kernel-oriented projects. How hard is it to stick this in another project? Something slightly smaller-scale than the kernel?
Also, this seems to only be concerned with compilation-time configuration. Although pre-compilation config is important, how hard is it to adapt this to work after compilation? If another app could use this configuration engine after it's been compiled and distributed, it may make it easier to customize pre-compiled packages (RPMs, DEBs, etc).
I can't say that I don't give a fuck. I've just run out of fuck to give.
I read the article and I was immediately impressed at how much MORE readable CML1 was... Perhaps because I know enough shell scripting to follow it in my head. CLM2 was impossible for me to quickly follow what was going on and I had to think about it quite a bit more.
I think the basic idea of CLM2 remains sound, but I wonder if it will result in more "cutting and pasting" rather than direct editing...
LedgerSMB: Open source Accounting/ERP
If it's a tree then why not use XML? I mean there are hundreds of tools available right now on every platform - why bother making your own language?
Why people keep inventing new pet laguages?
Whe he could not use GUILE, which is designed for things like this, adding domain-specific functions.
It would be great if this makes Linux kernel configuration easier and more flexible. With all the things Linux is designed to do nowadays (that is, operate on pretty much everything from a wristwatch to a computer the size of a building and everything in between), with so many different processor types and kernel configuration options, it must be a nightmare to configure a kernel from scratch. Hopefully CML2 will make this process easier for everybody.
Sorry ESR, but I don't want to install Python to be able to configure and compile the kernel.
One issue for newbies with the current linux kernel configuration is the "inverse problem:"
I want feature X, what requirements will enable me to select it?
A trivial example: 2.4.0 required "experimental features" to allow resiserfs to be selected.
I hope that CML2 will alow for searching for and selecting choices anywhere in the decision tree, and "pushing-up" the requirements imposed by the decision (or pointing out problems).
Why can't we have a very simple but intelligent suggestion for newbie kernel config?
...
For example, the utility starts by doing a hardware diagnostics first, to see what does the system has. Then ask a few simple questions on the normal usage patterns, like
- Do you have any plug-and-play hardwares that you plug in on run-time?
- what kind of pnp hardwares?
- do you do multimedia?
-
Then base on the user answers, just come up with an "optimal" configuration, and ask for the user's approval (you may want to tell the user the reason behind this config, e.g. put the sound module as loadable module, because the user said s/he is using sound only once a while). Then compile the kernel for optimal performance for the user's specific hardware configuration and usage patterns.
The current configuration system is really bloated and hard to maintain, especially for new module coders. The main thing that CML2 did first was to organise the configuration dependancies and information into a logical system that's consistent across the kernel. More importantly to me though is that it has a 'solver' if you will in it. It can 'prove' that a given configuration is valid before you go through the rigors of a 'make bzImage'. This keeps you from selecting options that unselect others (without telling you first) and makes it easier for module maintainers to code in these dependancies themselves.
- Michael T. Babcock (Yes, I blog)