From: Magnus Damm <magnus.damm@gmail.com>
To: Domen Puncer <domen@coderock.org>
Cc: Magnus Damm <damm@opensource.se>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] autoparam
Date: Mon, 11 Apr 2005 12:15:08 +0200 [thread overview]
Message-ID: <aec7e5c305041103154461ac5c@mail.gmail.com> (raw)
In-Reply-To: <20050409182128.GA5542@nd47.coderock.org>
On 4/9/05, Domen Puncer <domen@coderock.org> wrote:
> 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.
Thanks! And together with the "disable built-in" patch we have a much
more user-friendly system...
> > 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?
Yes, if there is enough interest. I think autogenerating documents
from source code is the right way to do it, but I am not sure about
the disadvantages. Maybe someone could enlighten me? The latest patch
does not support obsolete MODULE_PARM() parameters - so I need to add
that to next release but that is no biggie.
> > $ 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)
Great, thanks! I prefer to do prototype hacking in ruby, but I realize
that "the magic duct tape language" is more suitable.. =)
Also, I am thinking of using a prefix with the parameter type to
determine the origin of the parameter, ie:
prefix "s:" means from __setup()
prefix "e:" means from early_param()
prefix "m:" means from module_param()
prefix "o:" means from obsolete MODULE_PARM()
Then I would like to let the script convert the types to a common set of types.
I thought about treating descriptions without parameters as errors,
and generate warnings about parameters without description. And to
reduce the amount of warnings I think it is a good idea to add a
SETUP_DESC() as suggested by Matt Domsch.
> > 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 :-)
Exactly! =)
/magnus
prev parent reply other threads:[~2005-04-11 10:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aec7e5c305041103154461ac5c@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=damm@opensource.se \
--cc=domen@coderock.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.