Messages in this thread | | | Date | Sat, 9 Apr 2005 20:21:28 +0200 | From | Domen Puncer <> | Subject | Re: [PATCH 0/5] autoparam |
| |
On 21/03/05 00:06 +0100, Magnus Damm wrote: > Here are a set of patches that makes it possible to autogenerate kernel command > line documentation from the source code. The approach is rather straightforward > - the parameter name, the type and the description are stored in a section > called __param_strings. After vmlinux is built this section is extracted using > objcopy and a script is used to generate a primitive - but up to date - > document.
I think it's a great idea. A needed feature with simple implementation. I like it.
> > Right now the section is left in the kernel binary. The document is currently > not generated from the Makefile, so the curious user should perform:
Any plans to make this a complete patch?
> > $ objcopy -j __param_strings vmlinux -O binary foo > $ chmod a+x scripts/section2text.rb > $ cat foo | ./scripts/section2text.rb > > And yeah, you need to install ruby to run the script.
Attached a perl script, that has almost the same output. (I think perl is more usual on linux machines)
> > The ruby script section2text.rb does some checks to see if MODULE_PARM_DESC() > is used without module_param(). You will find interesting typos. > > Future work that extends this idea could include replacing __setup(name) with > __setup(name, descr). And storing the documentation somewhere to make it easy > for the end user to look up the generated parameter list from the boot loader.
And kernel-parameters.txt will never again have obsoleted options :-)
Domen [unhandled content-type:application/x-perl] | |