Subject: Discussion on ARM kernel command line boot options.

From: "Steven J. Hill" <[email-masked]>
Date: Sat, 11 Mar 2000 08:55:22 -0500

Greetings.

I would like to generate just a little discussion about kernel command line
boot options as related to the Linux ARM port. In my current system I have
an interactive boot loader that is located FLASH. I use it to load my kernel
into RAM and then boot it. It would be very useful to pass kernel options to
the kernel during development/prototyping. I realize that a lot of the ARM
ports are being used in embedded systems without a need for this, but to
support future development where people will/may have bootloaders in FLASH,
this could be useful.

It appears from my digging in the code that then only way to send any options
to the kernel is to put them in at compile time. 'arch/arm/kernel/setup.c'
contains the static character array 'default_command_line' which is set equal
to the string hard coded during kernel configuration. I have two possible
suggestions for passing options:

1) If the kernel is located in RAM, carve out 128 or so bytes located at a
   known offset in the kernel that the bootloader could place options into.

2) If the kernel is located in FLASH, ROM, etc.,  carve out 128 or so bytes
   at a know place in RAM the the bootloader could write options to.

The x86 kernels in conjunction with LILO use an approach similar to #1 as
far as selecting the root filesystem and other stuff. This is where I kind
of got the "idea". For my platform and project, I will need to have the
ability to pass boot options to the kernel. I wanted to get input from
those of you on the list and see what people thought and what mechanisms
they would employ before I started hacking away. Currently I am running my
kernel out of RAM so I will probably use method #1. After I stabilize my
kernel however, I will place my kernel in FLASH and then use method #2. I
look forward to hearing everyone's input. Cheers.

-Steve

-- 
 Steven J. Hill - Embedded SW Engineer
 Public Key: 'finger [email-masked]'
 FPR1: E124 6E1C AF8E 7802 A815
 FPR2: 7D72 829C 3386 4C4A E17D

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Philip Blundell <[email-masked]>
Date: Sat, 11 Mar 2000 15:40:55 +0000

>suggestions for passing options:

If you arrange for your bootloader to pass a parameter block to the kernel you 
can put commandline options in there.  

See struct param_struct in <asm/setup.h>, the `param_offset' member of struct 
machine_desc (in arch/arm/kernel/arch.c) and so on.  This is more or less the 
same as your option #2 in fact.

p.