From: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
To: "'Miguel Ojeda'" <maxextreme@gmail.com>,
"'Jesper Juhl'" <jesper.juhl@gmail.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: How to compile module params into kernel?
Date: Wed, 8 Nov 2006 21:22:24 +0100 [thread overview]
Message-ID: <030b01c70373$9a46ebd0$020120ac@Jocke> (raw)
In-Reply-To: <653402b90611081216o640b1499u8c758775c1cceb51@mail.gmail.com>
> -----Original Message-----
> From: Miguel Ojeda [mailto:maxextreme@gmail.com]
> Sent: den 8 november 2006 21:17
> To: Jesper Juhl
> Cc: Joakim Tjernlund; linux-kernel@vger.kernel.org
> Subject: Re: How to compile module params into kernel?
>
> On 11/8/06, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> > On 08/11/06, Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> > > > -----Original Message-----
> > > > From: Jesper Juhl [mailto:jesper.juhl@gmail.com]
> > > >
> > > > On 08/11/06, Joakim Tjernlund
> <joakim.tjernlund@transmode.se> wrote:
> > > > > Instead of passing a module param on the cmdline I want to
> > > > compile that
> > > > > into
> > > > > the kernel, but I can't figure out how.
> > > > >
> > > > > The module param I want compile into kernel is
> > > > > rtc-ds1307.force=0,0x68
> > > > >
> > > > > This is for an embeddet target that doesn't have
> loadable module
> > > > > support.
> > > > >
> > > > You could edit the module source and hardcode default values.
> > > >
> > >
> > > Yes, but I don't want to do that since it makes maintance
> > > harder.
> > >
> > Well, as far as I know, there's no way to specify default module
> > options at compile time. The defaults are set in the module
> source and
> > are modifiable at module load time or by setting options on
> the kernel
> > command line at boot tiem. So, if that's no good for you I don't see
> > any other way except modifying the source to hardcode new defaults.
> >
>
> You can add parameter values at Kconfig using "int", "hex"... instead
> of tristate, and then do something like:
>
> static unsigned int foo = CONFIG_foo;
> module_param(foo, uint, S_IRUGO);
> MODULE_PARM_DESC(foo, "foo value (uint)");
hmm, don't quite understand.
Can you rewrite that to match the cmdvar "rtc-ds1307.force=0,0x68" ?
next prev parent reply other threads:[~2006-11-08 20:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 18:43 How to compile module params into kernel? Joakim Tjernlund
2006-11-08 19:05 ` Jesper Juhl
2006-11-08 20:02 ` Joakim Tjernlund
2006-11-08 20:09 ` Jesper Juhl
2006-11-08 20:14 ` Jan-Benedict Glaw
2006-11-09 8:31 ` Joakim Tjernlund
2006-11-08 20:16 ` Miguel Ojeda
2006-11-08 20:22 ` Joakim Tjernlund [this message]
2006-11-08 20:59 ` Richard B. Johnson
2006-11-08 21:08 ` Jan-Benedict Glaw
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='030b01c70373$9a46ebd0$020120ac@Jocke' \
--to=joakim.tjernlund@transmode.se \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxextreme@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox