-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] parsing kernel cmdline parameter when modprobe #522
Comments
On 10/7/24 09:13, mjiey wrote:
Linux doc describes that modprobe supports two ways of passing parameter,
and toybox modprobe seems to support one (modprobe command line). Could we
also support reading from kernel command line? That would help a lot when
using toybox across platforms.
Does modprobe need to parse /proc/cmdline to get this? I thought the
kernel did it internally (since the kernel already HAS this
information). Your link says the kernel does it for static linking and
has modprobe do it for dynamic linking which seems silly, but ok...
I don't see a command line option in man modprobe to _not_ do this. (If
it's also specified on the command line, does the command line one win?
Is there a command line way to switch it off?)
Not hugely familiar with this area, I tend to build static kernels...
Rob
|
I don't find a nice doc describing order of precedence except linux-util source code ... , and current implementation is that modprobe command line overrides kernel command line. I think the general idea is Jie |
On 10/13/24 23:02, mjiey wrote:
I don't find a nice doc describing order of precedence except linux-util
source code ... , and current implementation is that modprobe command line
overrides kernel command line.
Mostly it's a "what if we don't want to supply this argument at ALL"
question (would thingy= on the command line sufficiently nerf it?), but
I don't use modules enough to know if that comes up much. (Which is also
the main reason modprobe.c is still in pending: I understand _insmod_
enough to promote it, but not modprobe. It was submitted by some
developers who have since moved on.)
I checked the man page for some way to switch off checking /proc/cmdline
(which seems like it would only work when /proc is mounted, not always
the case doing bringup from initramfs?) but didn't see an existing option.
Also, /proc/cmdline is space separated not NULL separated so needs to be
re-parsed, and the kernel-parameters.html you pointed to says double
quotes can be used to preserve spaces but are double quotes themselves
escaped? (And nothing ELSE will have double quotes? /proc/mounts uses
percent escapes, but I shouldn't expect consistency from proc...)
I think the general idea is `modprobe command line` > `modprobed
config` > `kernel boot parameter`.
Understood. I'll take a stab at it, thanks.
Rob
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linux doc describes that modprobe supports two ways of passing parameter, and toybox modprobe seems to support one (modprobe command line). Could we also support reading from kernel command line? That would help a lot when using toybox across platforms.
reference: https://www.kernel.org/doc/html/v4.12/admin-guide/kernel-parameters.html
The text was updated successfully, but these errors were encountered: