[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <653402b90611081216o640b1499u8c758775c1cceb51@mail.gmail.com>
Date: Wed, 8 Nov 2006 20:16:35 +0000
From: "Miguel Ojeda" <maxextreme@...il.com>
To: "Jesper Juhl" <jesper.juhl@...il.com>
Cc: "Joakim Tjernlund" <joakim.tjernlund@...nsmode.se>,
linux-kernel@...r.kernel.org
Subject: Re: How to compile module params into kernel?
On 11/8/06, Jesper Juhl <jesper.juhl@...il.com> wrote:
> On 08/11/06, Joakim Tjernlund <joakim.tjernlund@...nsmode.se> wrote:
> > > -----Original Message-----
> > > From: Jesper Juhl [mailto:jesper.juhl@...il.com]
> > >
> > > On 08/11/06, Joakim Tjernlund <joakim.tjernlund@...nsmode.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)");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists