Back to Eric's Home Page Up to Site Map $Date: 2001/04/10 00:12:08 $

CML2 Transition Guide

You need to read this guide if you are a maintainer of configuration code in the Linux kernel. Linus has scheduled this work to be incorporated in the tree during the 2.5.1/2.5.2 series. It will explain the plan for transitioning from the old system to the new one, what I'm planning to do, and what I need you to do.

I have made every effort to minimize the amount of work anybody but me has to do, but some is unavoidable. I don't think anybody will have more than maybe two hours' work to do, and it will save all of us a lot of future grief.

How to transition your code

Step 1: Get the background

Read, or at least skim, the following files:
Release 1.0.0 announcement
Goals of the project. Why it's worthwhile. What you will gain.

Recent news
Project release history.

The CML2 Language
Overview of CML2. Design philosophy, language semantics, implementation.

CML2 Reference
A complete description of CML2.

Step 2: Install the CML2 tools and rules files

You can untar the source distribution anywhere. Run the install-cml2 utility to install it in a Linux source directory on your system. The install-cml2 script will make sure your build environment is adequate, prompt you for a source tree location if there is more than one, and install the CML2 files there.

The installer has been carefully designed not to step on or interfere with the existing config system, except that it will modify the configuration productions in the top-level makefile. (The old ones will remain available under different names.)

Step 3: Take a look at the menu map

Change directory to your source tree. Do:

make menu-map

This will generate a map of the menu hierarchy defined by the rules file. Notice that it first compiles the rules file using cmlcompile. All the configuration productions will do this when necessary (which is only when configuration rules change).

For a more verbose result, including default values and requirements, add the -v debugging option to the command that make generates. (If this doesn't match what you remeber, it's OK; the debugging option was -d in pre-1.0.0 versions of CML2.) You can do it this way:

make CONFIGOPTS=-v menu-map

Step 4: Run the interpreter in interactive mode

Next, try `make ttyconfig' to see the line-oriented mode. The line-oriented mode is intended to be used as a configuration debugger; adding the -v option to the command (with `make CONFIGOPTS=-v ttyconfig') will tell you a lot about what the interpreter is doing.

You can try via `make menuconfig' to test the curses mode. This is the one I expect people will use the most.

Run via `make xconfig' to test the Tkinter mode.

Step 5: Take a harder look at the configuration parts you own

The rules files (.cml extension) will be distributed through your kernel tree near the code and drivers they configure. One or more of them is yours. Find them and try to grok what's going on with them.

Step 6: Now get serious and try to break it

Do a bunch of configurations. Try weird stuff -- stress-test the constraint machinery. Use the line-oriented `make ttyconfig' mode for this; it makes the debugging output easiest to read.

Remember that you can write out partial configurations with `s' and read them back in with the `i' command, so you don't have to re-do your boilerplate multiple times. Also remember the `g' command that lets you go straight to your piece after you've set up stuff like architecture and system buses (possibly with an `i').

Finally, be aware of the (undocumented) `e' command in the curses and tty modes, with which you can examine the state of any symbol at any time.

You can run the curses mode with 2>LOG to capture debug output from it.

Step 7: Tell me what you found

If the configurator breaks, tell me. When you're satisfied with your piece of the translation, please email me and tell me so.

Step 8: Do your bit to keep CML2 in sync

Until CML1 is scrapped and the CML2 rules files owned by different maintainers, I'll need you to keep me up to date on the changes you're making to your CML1 files so I can keep the CML2 rulebase current.

State of the maintainers

In the following table, status marks are as follows:
Maintainer has certified that configuration behavior is correct for his subystem.
Maintainer is testing CML2's behavior.
Maintainer has acknowledged responsibility for the subsystem, but not yet reported on CML2's behavior.
Maintainer not yet confirmed.

Here is the current state of the transition:

There are 48 identified configuration subsystems. 5 have been certified. Maintainers for 19 others have confirmed and 3 others are testing. The table below covers every nonempty configuration file in the CML1 corpus at the time of the most recent CML2 release.

Maintainer Subsystem Files Status
Urban Widmark
Andrzej Krzysztofowicz
NLS configuration fs/nls/ certified
12 Jun 2000
Niibe Yutaka SuperH port arch/sh/ certified
26 Jun 2000
Simon Vogl I2C configuration drivers/i2c/ certified
30 Jun 2000
Andreas Bombe IEEE394 configuration drivers/ieee1394/ certified
13 Jul 2000
Randy Dunlap USB configuration drivers/usb/ certified
24 Jul 2000
Theodore Y. Ts'o File-system configuration fs/
Petr Vandrovec NCP configuration fs/ncpfs/ confirmed
Matthias Welwarsky AX25 configuration net/ax25/ -
Steven Whitehouse Decnet configuration net/decnet/ confirmed
David S. Miller
Andi Kleen
Alexey Kuznetsov
TCP/IP support net/
Rusty Russell IPv4 netfilter configuration net/ipv4/netfilter/ confirmed
Phil Blundell IPv6 netfilter configuration net/ipv6/netfilter/ confirmed
Jay Schulist IPX support net/ipx/ confirmed
Dag Brattli IRDA configuration net/irda/
Arjan van de Ven KHTTPD configuration net/khttpd/ testing
Jaspreet Singh WAN configuration drivers/net/wan/ -
Alan Cox Alan holds up the earth drivers/sound/
Geert Uytterhoven DMA sound and video drivers/sound/dmasound/
Boji T Kannanthanam I20 support drivers/i2o/
Mike Phillips Responsible drivers/net/tokenring/
Joerg Reuter ham-radio configuration drivers/net/hamradio/ -
David Woodhouse ARCnet configuration drivers/mtd/ drivers/net/arcnet/ confirmed
David Hinds PCMCIA configuration drivers/net/pcmcia/
Jay Schulist Appletalk configuration drivers/net/appletalk/ confirmed
Tim Waugh Parallel-port and parallel-IDE configuration drivers/parport/
Theodore Ts'o Character-device configuration drivers/char/ -
Claus-Justus Heine Floppy-tape configuration drivers/char/ftape/ -
Vojtech Pavlik Joystick configuration drivers/char/joystick/ confirmed SCSI configuration drivers/scsi/ -
Martin Mares PCI configuration drivers/pci/ -
Jens Axboe CD-ROM configuration drivers/cdrom/ confirmed
Fritz Elfert ISDN configuration drivers/isdn/ -
David S. Miller Sun SBUS configuration drivers/sbus/char/
Andre Hedrick Block and IDE configuration drivers/block/
Jaroslav Kysela PNP configuration drivers/pnp/ -
Jakub Jelinek Fiber Channel configuration drivers/fc4/ -
Russell King ARM port drivers/acorn/scsi/
Werner Almesberger ATM configuration drivers/atm/ confirmed
Ed Okerson Telephony configuration drivers/telephony/ confirmed
Martin Schwidefsky S390 port arch/s390/ confirmed
Linus Torvalds 386 port arch/i386/ -
Richard Henderson alpha port arch/alpha/ confirmed
David S. Miller SPARC port arch/sparc/
Ralf Baechle MIPS64 port arch/mips/
Cort Dougan PowerPC port arch/ppc/
Jes Sørensen M68K port arch/m68k/ -
Walt Drummond IA64 port arch/ia64/ arch/parisc/ -

Back to Eric's Home Page Up to Site Map $Date: 2001/04/10 00:12:08 $

Eric S. Raymond <>