Xonar
Xonar

Reputation: 1326

Where is Linux Kernel Boot Arguments parsed

I am playing around with a Android Linux kernel. The kernel is the P970 V30B kernel. Available here.I want to find out what a specific cmdline argument does exactly.

I know it's commandline arguments and there's one argument that is included that I can't find what exactly it does. It's not a standard commandline argument (I can't find any documentation on it) and I suspect it's specific to this kernel. I want to find out what that specific cmdline argument does exactly.

The best reference I was able to find on the subject is this. This told me where about it parses the arguments, but it didn't have enough detail for what I wanted to to find out.

I've looked at the source for the commandline parsing, but it jump around alot and I can't find where it actually parses the individual commands.

I'm looking for a way to get where it parses the command argument. I've tried various fgrep commands to look for a string containing the parameter as a starting point, but to no avail.

Any help or pointers on the subject will be greatly appreciated.

Upvotes: 3

Views: 6411

Answers (1)

user1284631
user1284631

Reputation: 4606

See the file cmdline.c

http://lxr.hpcs.cs.tsukuba.ac.jp/#linux/lib/cmdline.c

You have there the functions get_option(), get_options() etc.

They should be used where the actual parameters are read and dispatched.

edit: The actual parsing is in the file main.c

http://lxr.hpcs.cs.tsukuba.ac.jp/#linux/init/main.c

Upvotes: 3

Related Questions