public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] autoparam
@ 2005-03-20 23:06 Magnus Damm
  2005-03-20 23:06 ` [PATCH 1/5] autoparam: includes Magnus Damm
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Magnus Damm @ 2005-03-20 23:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Magnus Damm

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.

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:

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

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.

/ magnus


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-04-11 10:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-20 23:06 [PATCH 0/5] autoparam Magnus Damm
2005-03-20 23:06 ` [PATCH 1/5] autoparam: includes Magnus Damm
2005-03-20 23:06 ` [PATCH 2/5] autoparam: script Magnus Damm
2005-03-20 23:06 ` [PATCH 3/5] autoparam: af_unix workaround Magnus Damm
2005-03-20 23:06 ` [PATCH 4/5] autoparam: ide workarounds Magnus Damm
2005-03-20 23:06 ` [PATCH 5/5] autoparam: various fixes Magnus Damm
2005-04-09 18:21 ` [PATCH 0/5] autoparam Domen Puncer
2005-04-11 10:15   ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox