mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 0/5] autoparam v0.2: generating parameter descriptions on compile
@ 2005-07-07 11:25 domen
  2005-07-07 11:25 ` [patch 1/5] autoparam: includes domen
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: domen @ 2005-07-07 11:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: damm

Hi!

The purpose of autoparam is to generate boot parameter descriptions
from sources. It does that by creating a new section called
__param_strings. (The interesting bits here are from Magnus Damm.)
It fills a gap about undocumented boot options from modules.

It consists of 5 patches:

autoparam_1-includes
  Descriptions get saved in __param_strings. Also added a new
  __setup_desc().

autoparam_2-makefile
  On every vmlinux change .kernel-parameters.o gets regenerated, and
  __param_strings removed from vmlinux. (It's still bigger than
  non-patched vmlinux, but all sections are of same length, alignment
  issues?)
  Also, a new target "make kernelparams" which generates
  Documentation/kernel-parameters-gen.txt. It should probably not be
  in $(srctree) though.
  There should be some more work done here, but I'm out of ideas ATM.

autoparam_3-extract_script
  Simple perl script to extract descriptions.

autoparam_4-af_unix_workaround
autoparam_5-ide_workaround
  Workarounds needed.


Comments, improvements?


	Domen


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/5] autoparam
@ 2005-03-20 23:06 Magnus Damm
  2005-03-20 23:06 ` [PATCH 1/5] autoparam: includes Magnus Damm
  0 siblings, 1 reply; 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-07-07 17:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-07 11:25 [patch 0/5] autoparam v0.2: generating parameter descriptions on compile domen
2005-07-07 11:25 ` [patch 1/5] autoparam: includes domen
2005-07-07 11:25 ` [patch 2/5] autoparam: makefile domen
2005-07-07 11:25 ` [patch 3/5] autoparam: extract script domen
2005-07-07 11:25 ` [patch 4/5] autoparam: af_unix workaround domen
2005-07-07 17:13   ` Alexey Dobriyan
2005-07-07 11:25 ` [patch 5/5] autoparam: ide workarounds domen
  -- strict thread matches above, loose matches on Subject: below --
2005-03-20 23:06 [PATCH 0/5] autoparam Magnus Damm
2005-03-20 23:06 ` [PATCH 1/5] autoparam: includes Magnus Damm

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

all inboxes | Powered by JetHome®