From: "Richard B. Johnson" <jmodem@AbominableFirebug.com>
To: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>,
"'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 15:59:44 -0500 [thread overview]
Message-ID: <00fc01c70378$d1ffa760$0732700a@djlaptop> (raw)
In-Reply-To: 02fd01c70370$d9af6700$020120ac@Jocke
----- Original Message -----
From: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
To: "'Jesper Juhl'" <jesper.juhl@gmail.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Wednesday, November 08, 2006 3:02 PM
Subject: RE: How to compile module params into kernel?
>> -----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.
>
> Jocke
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
If you don't have a module, you can not use module parameters. However, it
might even be simpler...
You just put your parameters (strings to parse) on the kernel command-line
and you put code in your driver to interpret them.
You want to look at "saved_command_line." It is a string as:
extern char saved_command_line[COMMAND_LINE_SIZE];
You need to parse ASCII text yourself, in your driver, but it's trivial.
Look at .../arch/i386/kernel/setup.c parse_cmdline_early().
I don't see anywhere in the kernel that it gets overwritten so it should be
good to use.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 (somewhere). IT removed email for
engineers!
New Book: http://www.AbominableFirebug.com
next prev parent reply other threads:[~2006-11-08 21:00 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
2006-11-08 20:59 ` Richard B. Johnson [this message]
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='00fc01c70378$d1ffa760$0732700a@djlaptop' \
--to=jmodem@abominablefirebug.com \
--cc=jesper.juhl@gmail.com \
--cc=joakim.tjernlund@transmode.se \
--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.