Slashdot Mirror


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.'"

45 of 190 comments (clear)

  1. why no LL1 talk? by brlewis · · Score: 2, Offtopic

    ESR was previously going to be talking about this at the Lightweight Languages Workshop, but he's not on the agenda now. What happened?

    1. Re:why no LL1 talk? by nvainio · · Score: 2, Informative

      Well, many want him to speak in their conference or similar and he's travelling quite a lot. I think it's just fair that he wants good sleep and proper food. See esr's travelling rules. Calendar is also available.

  2. Other Projects by aridhol · · Score: 4, Interesting

    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.
    1. Re:Other Projects by Telex4 · · Score: 3, Interesting

      Post compilation, configuration can only really be done with configuration files, like those used by LILO, XFree86 and various other apps. At the moment, you're right, there's no standard for the layout and internals of config files, and no standard program to interpret them. Some of the biggest steps forward have been made in this area in GUIs like KDE and GNOME, where configuration has been made simple and accessible. Although it would be a mammoth task given the number of config files in any OS already, it would be a good project to try and extend ESR's idea to formalise config files for compiled packages.

    2. Re:Other Projects by Telex4 · · Score: 2, Interesting

      Yes, it is. Making a GNU/Linux registry would have its ups and downs - the downs probably outweighing the ups. The up would be that it would make using the OS a lot easier for newer users. The downs would be that it would be hell to implement, it would put a lot of developers off, and it would make cross-platform compatability harder to achieve.

    3. Re:Other Projects by Sludge · · Score: 2

      Telex4, maybe you can tell me the answer to this: Does the Windows registry allow fine grained access priveledges? It seems to me that you have either allow every user full write access(unacceptable) or no access at all(unacceptable).

  3. Hmmm by einhverfr · · Score: 5, Interesting

    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
  4. A promising step by Telex4 · · Score: 5, Insightful

    It's good to see some high profile hackers putting their minds to making GNU/Linux easier for people. This language should make it easier for hackers to fiddle with their kernel, and to get into kernel hacking, which is a great thing considering how daunting a challenge it is at the moment. It will also help people who have been playing with GNU/Linux for a short while start setting their systems up properly, instead of running on a hastily preconfigured kernel that came from their distribution installer.

    It was promising then to see ESR say that he wanted this language to help GNU/Linux newbies. There's been a lot of good work recently on making the first steps more accessible, but there's been little progress in helping people who have completed the first challenge and who then want to get their OS running smoothly.

    1. Re:A promising step by rhekman · · Score: 2, Informative
      For those of us more experienced at building kernels, there is another project that is looking to make building kernels much better. That is Keith Owens' new kbuild architecture. He has rewritten the makefiles to make readability better, put compile time dependency checking in the right place, and make creating patches easier. It will work wonderfully with ESR's system and have the effect of making repeated compiles much faster. Anyway, I can't wait.

      http://kbuild.sourceforge.net/

      Regards
      --
      I like teamwork. It's easier to assign blame that way.
    2. Re:A promising step by wrinkledshirt · · Score: 2, Insightful

      It's good to see some high profile hackers putting their minds to making GNU/Linux easier for people. This language should make it easier for hackers to fiddle with their kernel, and to get into kernel hacking, which is a great thing considering how daunting a challenge it is at the moment.

      I don't know that I agree. What we've essentially got here is yet another language that a user needs to learn in order to take advantage of something that's supposed to make the user's life easier. It's like forcing a student to study thermal dynamics so that they can learn to put gas in the car tank. It's this approach to making things user-friendly that Linux has been taking for a long time now, and it's only making things worse the more applications and tools show up.

      Windows may have it's sucky points, but it's pretty much always click-point-click-scroll-click to get something set up. You can't get easier than that. Yes, it limits the interface for the user. For a potential hacker, I know that's a problem. For an end user and help-desk technician, it is a wonderful boon.

      In my opinion, a completely radical approach should be taken -- all config and setup scripts as XML files. That way, you've got one DTD binding you to whatever you're trying to set up, and a protocol that you only need to learn the nuances of once.

      --

      --------
      Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

  5. Kernel configuration as a game? by Araneas · · Score: 3, Funny
    Very cool idea. Hmmm... now to screen out the L class users:

    In order to install bind you must complete level 25, please try again.

    1. Re:Kernel configuration as a game? by cperciva · · Score: 3, Funny

      Shouldn't that be
      In order to install sendmail you must complete level 25
      and
      In order to install bind you must completey level 53?

  6. You can tell he's from the 80s by Anonymous Coward · · Score: 3, Funny

    Adventure games are soooo passe. I would prefer a Quake style interface with hidden buttons for config options. And maybe you could shoot all those stupid options that no-one ever uses. Like "Amateur Radio Support" and so on.

    1. Re:You can tell he's from the 80s by Bilbo · · Score: 2
      This is for real hackers bro. If you don't recognize all the commands, then you shouldn't be using the interface.

      (Ever read, "The Soul of a New Machine"? Starts out with someone going through, "You are in a maze of twisty passages that all look the same...")

      --
      Your Servant, B. Baggins
  7. An adventure game by spectrum · · Score: 3, Funny

    And if you configure your kernel wrong you end up in the Oops room with Colonel Panic. ?

    Could be worse.. you could end up in the blue-fluffy-cloud room with General Protection-Fault.

    --
    dave.
    1. Re:An adventure game by Accipiter · · Score: 2

      And if you configure your kernel wrong you end up in the Oops room with Colonel Panic.

      Of course not.

      You have removed all disk support. It is dark. You are likely to be eaten by a Grue...

      > _

      --

      -- Give him Head? Be a Beacon?
      (If you can't figure out how to E-Mail me, Don't. :P)

  8. Wish we had this in Windows... by Tsar · · Score: 2, Offtopic

    _________________________

    General Protection Fault

    _________________________

    > Kill fault

    With what -- your bare hands?

    > Yes

    Congratulations -- you have just made Windows a stable OS with your bare hands!
    Unlikely, isn't it?


    > Format c: /y

    You are in a maze of unallocated sectors, all alike.

    1. Re:Wish we had this in Windows... by Anonymous Coward · · Score: 3, Funny
      > open Internet Explorer

      You are suddenly surrounded on all sides by a dense blue fog.
      You are dead.

  9. Why not XML? by Anonymous Coward · · Score: 3, Interesting

    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?

    1. Re:Why not XML? by Black+Perl · · Score: 2, Insightful
      Well, you'd still have to create a DTD or Schema representation; you just wouldn't have to create a new syntax.

      But I agree. There's no reason why he had to invent a new syntax, when CML2 could have been defined as an XML application. Like you say, there's plenty of tool support.

      --
      bp
    2. Re:Why not XML? by Black+Perl · · Score: 2
      So, the tool ensure that only sane kernel configs are built is where the real meat of the problem is. XML wouldn't be much help there.

      Why do you say that? That's the whole point of XML validation. You define up front what a sane config is (THIS is the meat of the problem) and express it in a DTD or Schema. Then you could use your favorite validator to determine if it was a sane kernel or not. In fact, you could use a standard XML IDE that could enforce the DTD/Schema to make sure you CAN'T create anything but a sane kernel!

      Instead, he's created another non-standard format and tool writers will have to create kernel config tools from scratch.

      --
      bp
    3. Re:Why not XML? by Splork · · Score: 2

      XML is human -readable- but not easily human -writable-

  10. another language? by krokodil · · Score: 3, Interesting

    Why people keep inventing new pet laguages?
    Whe he could not use GUILE, which is designed for things like this, adding domain-specific functions.

    1. Re:another language? by psamuels · · Score: 2, Insightful
      Whe he could not use GUILE, which is designed for things like this, adding domain-specific functions.

      Uh -- CML2 is not a programming language, per se, but a language for representing a dependency graph for configuration options.

      I fail to see how either XML or Scheme would be at all useful there. You would still have to invent conventions for how to store the graph, so instead of a language invented out of the blue, you get a language in XML or S-exp syntax invented out of the blue.

      If anything, you should be advocating Prolog, which (unlike Scheme or XML) is a rule-based language, somewhat similar in semantics to CML2 data files. What's that, you say? Not enough people know Prolog? You can't be expected to install a Prolog compiler just to build a kernel? My point exactly.

      --
      "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
  11. How about the Inverse Problem? by Anonymous Coward · · Score: 3, Interesting

    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).

    1. Re:How about the Inverse Problem? by MikeBabcock · · Score: 2

      If you select a network card, networking would get enabled, etc. because of the built-in dependancy tracking -- you can download versions of CML2 for kernels 2.4.x and try it yourself.

      --
      - Michael T. Babcock (Yes, I blog)
  12. What's wrong with xconfig? by RelliK · · Score: 2

    I've used xconfig (and to a lesser extent menuconfig) and I found them more than adequate. My only gripe is that the help text is not defined for all the options (though all the major options have excellent documentation that you can display by pressing the help button). So, I don't mean to knock CML2 but what's in it for me? And are there screenshots anywhere?

    --
    ___
    If you think big enough, you'll never have to do it.
    1. Re:What's wrong with xconfig? by kevinank · · Score: 3, Troll
      The CML project got started when kernel developers started complaining about how hard it was to maintain the current configuration tool. The idea was to stop maintaining xconfig (and brethren), and move wholesale to CML.

      That obviously hasn't happened yet, but mostly only because Eric decided to implement CML in Python which a number of kernel hackers refuse to install on their systems (originally because it wasn't GPL compatibly licensed, and these days probably ostensibly because it isn't GPL'd, but more likely because it has icky syntax and they don't want to learn it or reconfigure their editors to edit it.)

      Anyway, the idea was not so much to improve on xconfig, but to give you the ability to continue configuring your kernel once xconfig was no longer being maintained.

      --
      LibBT: BitTorrent for C - small - fast - clean (Now Versio
    2. Re:What's wrong with xconfig? by MikeBabcock · · Score: 3, Interesting

      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)
    3. Re:What's wrong with xconfig? by MSG · · Score: 4, Informative

      I know, I know.... "Don't moderate, reply."

      The CML project got started when kernel developers started complaining about how hard it was to maintain the current configuration tool.

      The current configuration tool *is* CML. The tool that ESR has produced is CML2. CML does its work with a mix of shell, perl, other tools. It's nasty. CML2 is pure Python.

      That obviously hasn't happened yet, but mostly only because Eric decided to implement CML in Python

      No, it hasn't happened yet because it's not material for a *stable* kernel series. It'll go into the development kernel, and all of the stuff that needs to be updated to make it work will get updated in the devel tree.

      because it wasn't GPL compatibly licensed

      Python has had a few releases that the FSF thought were not compliant, but Guido and co. thought that they were. Python has always tried to be GPL compatible. 1.5.2 and lesser are compatible, and so are all of the current newer branches of Python.

      Anyway, the idea was not so much to improve on xconfig, but to give you the ability to continue configuring your kernel once xconfig was no longer being maintained.

      The idea was to create a uniform set of configuration tools that got dependancy checking right and were easy to maintain. CML was none of those things.

    4. Re:What's wrong with xconfig? by MSG · · Score: 2

      FACT: CML1 does not require PERL.

      Perl is not only required by the build system, but by several drivers:
      $ cd /usr/src/linux-2.4
      $ find . -name '*.pl' -print
      ./drivers/net/starfire_firmware.pl
      ./drivers/scsi/script_asm.pl
      ./drivers/usb/serial/ezusb_convert.pl
      ./scripts/checkincludes.pl
      ./scripts/checkconfig.pl
      ./scripts/checkhelp.pl

      In ./Makefile, three rules requiring perl:
      checkconfig:
      find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl

      checkhelp:
      find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl

      checkincludes:
      find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl

      In ./drivers/scsi/Makefile, four rules require perl scripts.

      It is downright stupid to make a package as large as python an essential system component. If anything we should reduce the number of base dependencies.

      Uh... you've never heard of cross compiling, have you? Getting linux to scale down, and work on minute devces is certainly a goal that a lot of people are working on. However, using Python to build the kernel isn't going to present a greater barrier to overcome. Any system for which Python is too much of a barrier, a compiler is going to be *way* over the top. Compare the relative size of gcc, supporting libs, headers, devel packages to the size of Python. On my system, gcc *alone* is larger than Python.

      Cross compiling is how those systems has always been done, and always will be done.

      I think you (and the AC you quote) do injustice to ESR AND to Linus. ESR's been developing software for a sight longer than you, I'd wager, and Linus is not swayed by "fame". He makes decisions based on technical merits. If CML2 makes it into the kernel proper, then Linus has decided that it's the best thing for Linux. Who are you to disagree?

  13. Simple intelligent kernel config for newbies by 2Bits · · Score: 3, Interesting

    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.

    1. Re:Simple intelligent kernel config for newbies by jfunk · · Score: 2

      90% of the time I configure a kernel, it's for a *different* machine.

      Thanks to modules, regular users do not generally need to configure kernels. CML is most often used by people like me, who play with esoteric hardware and regularly apply various kernel patches, messing with the code in the process.

    2. Re:Simple intelligent kernel config for newbies by jfunk · · Score: 2

      No, no ,no. You didn't totally get what I meant. I am very glad that CML2 will make an appearance. Hell, I'm a very happy professional Python programmer. Even I want a system that handles dependencies.

      What I mean is that regular users no longer need to compile kernels regularly. Modules were available for at least 3 years before I started bothering with them, and it has only been the past year that I haven't bothered compiling kernels on my desktop/laptop machines. This is mostly due to the way SuSE handles everything for me (I'm an ex-Slackware user and old habits die hard).

      What I really mean is that Joe Blow ex-Windows user doesn't need to configure kernels. If I don't, then he/she doesn't need to, either.

      If you're, say, a Debian or Slackware user, then you're used to doing these things. I'm strange in that I put myself into Joe Blow's position whenever I'm normally using a computer (I try to to think as a user). You're talking to somebody who actually migrated from vi to SciTE. Seriously. I was actually a die hard vi user. Nowadays, I forget most of that stuff and I like hitting F5, having code-completion, etc.

      To sum up: Easier-to-compile kernels: good. The need to do so: not-so-good.

      I hope that clears it up, but I'm quite drunk right now, so...

  14. Widespread acceptance by Moooo+Cow · · Score: 2, Insightful

    "Well, it is optional, but as a gedankenexperiment, let's suppose it weren't. If something gets into the kernel (or any other open project), it's because people want it there. If it isn't made optional, and no one forks a version without it, it's because not enough people dislike it enough."

    That statement is only true if 'people' == 'developers compentent enough to maintain kernel code'. If Linux is to gain widespread acceptance, then for 99.9%+ percent of the population, it will be equally difficult to remove an easter egg from the Linux kernel as is to remove the flight simulator from Microsoft Excel.

    I believe it is the development paradigm you are espousing here that is one of the largest roadblocks to mainstream acceptance - you've implicitly excluded the large majority of the 'people' who could be using Linux, without even noticing that you did.

    --
    Slashdot is entertaining like pro wrestling is entertaining
    1. Re:Widespread acceptance by ichimunki · · Score: 2

      Except that any developer wants to can fork the project so that it does not include the easter eggs, thereby gaining all those users who are upset about such things. Whatever benefit that might have to such a developer I leave as an exercise for the reader.

      --
      I do not have a signature
  15. Re:Something similar for BSD? by Null_Packet · · Score: 2

    Primarily because the BSD's maintainers seem to prefer the configuration file. There are several things that distinguish BSD from Linux, and the Kernel Config file is a big one. You may find that not all OS quirks are due to technical roadblocks but to particular people's preferences.

    To use an analogy, Directors of movies like to step into the editing booth and make sure certain scenes/footage stay in the movie- sometimes not because they have merit on their own, but because the director wants them there.

    An often-overlooked aspect of the kernel community of the open Unices is the lack of true central authority. Before you flame, some OS's have stronger leadership than others, and some are ruled more by a group concensus than others. It seems a it obvious that this question came from a user who hasn't spent much time in the BSD 'community'. Spend more time there and I think this and many other questions will be answered, just maybe not the way you expect.

  16. Thanx to ESR by farrellj · · Score: 2

    I new adventure game!

    And I thought "make config" was enough like a adventure anyways!

    ttyl
    Farrell

    --
    CAN-CON 2019 - Ottawa's only book oriented Science Fiction Convention! October 18-20, Sheraton Hotel, Ottawa, Canada h
  17. Re:Something similar for BSD? by Watts+Martin · · Score: 3, Insightful

    Yet even with that "archaicness" I find kernel configuration in BSD to be easier. This isn't because I'm a canonical GUI-hating Unix guy; it's probably because I'm not. XConfig and particularly MenuConfig are excruciatingly tedious compared to opening your own kernel configuration file in one window in a text editor and the LINT file in the other. My FreeBSD configuration generally is a matter of commenting out a bunch of lines (mostly SCSI stuff) and adding two at the bottom for my sound card.

    I've honestly been very impressed with how logical the BSD configuration "system" is; it's not pretty but it's straightforward and easy to make changes to. The /etc/rc.conf file changes or overrides many things that Linux distributions tend to scatter around the system (often in places that change from distribution to distribution, no less).

  18. This'll make kernel builds more fun by rnturn · · Score: 2

    If memory serves, there was a column in DEC Professional years ago (obviously) that jokingly likened the RSX-11 SYSGEN process as an adventure game. Now something like that's finally available!

    I'm sort of wondering how long it'll be before I see ``Munging the SCSI adapter has no effect or what ``Hello, sailor'' does to the kernel. And, yes, I know, those are more from the Zork games. Just can't remember any of the good funny responses from adventure any more. Other than the one about the maze of twisty passages, of course.

    --
    CUR ALLOC 20195.....5804M
  19. Re:Python ? by Balinares · · Score: 2

    And yet you didn't mind having to install Tcl/Tk to be able to configure the kernel before?

    --

    -- B.
    This sig does in fact not have the property it claims not to have.
  20. An even better interface by theLime · · Score: 4, Funny

    While Adventure is amusing, a Nethack/Angband-style configuration could be far more useful. The same room/object analogy could be used (town-level: different stores as sub-menus), you can check your inventory for current config, choose your race/class (arch/proc), etc etc etc.

    When you are suited up and ready to battle, the compilation process could be initiated by entering the dungeon and watching gcc slay the demons of .h and hordes .c ! Return victorious with the Amulet of bzImage!

    Well, maybe that's taking it too far.

    But if it got popular enough, maybe Blizzard would re-hash it in a fully-graphic real-time game for Windows.....

  21. XML is a syntax, not a language by MenTaLguY · · Score: 2

    They'd still have to learn the semantics of the tags. XML _only_ provides a common syntax/metasyntax, and not even that pleasant a one (although it does have a lot of nice features).

    --

    DNA just wants to be free...
  22. Re:Python ? by Balinares · · Score: 2

    How does your comment justify the installation of a yet another shitfest like Python for kernel configuration?

    It doesn't. In the past you needed either Tcl/Tk or the curses lib, now you need either Python or a version of CML2 frozen to vanilla C, but in both case you can edit the makefiles by hand if you prefer. Whee, aren't we happy now. Unhappy? Take it up to ESR and try to contest his choices if you can (if you really can, which I kind of doubt, considering you're an AC of the ilk that uses words such as 'shitfest' apparently for the sheer trolling value of it, please let me know -- I'd sincerely be most interested to hear of it).

    --

    -- B.
    This sig does in fact not have the property it claims not to have.
  23. Re:Python ? by Balinares · · Score: 2

    Yep, I know what Tkinter is, but thank you. This said, make menuconfig does need stuff installed too, namely the curses lib, to compile the interface. Does compiling the C file generated from a frozen CML2 differ majorly?

    --

    -- B.
    This sig does in fact not have the property it claims not to have.