some question about / adding commandline files from rootfs

Andy Green andy at
Fri Aug 29 08:32:58 CEST 2008

Hash: SHA1

Somebody in the thread at some point said:
| Werner Almesberger wrote:
|> - there has to be a (small) configuration file parser
|> - it would create a shared configuration resource, i.e., first
|>   and second partition would share the same file, even though
|>   they are otherwise independent from each other. (LILO and GRUB
|>   have that issue as well and nobody seems to be overly bothered
|>   by it, so perhaps this isn't such a big problem.)
| A possibility here would be to write Qi configuration into the first
| sector ("MBR") of the SD card. According to Wikipedia there are 440
| bytes available for boot code (which will never be used on a Freerunner)
| before the partition table. This should be enough to store a few boot
| entries, each one specifying the location of a kernel and an optional
| file holding a commandline for that kernel.
| User editing could be done with a small userspace program that would
| dump the sector to a temporary text file, allow the user to edit it, and
| then convert it back to the binary format (after validating it). This
| program could also have a quick mode to change which of the possible
| entries would be booted by default, to make it easy to switch between
| partitions in a multi-boot environment (e.g. "qi-conf -b 3" to set entry
| #3 as the default).
| If Qi detected an invalid structure in the MBR (or if the user pressed
| some button to request recovery mode) then it would ignore the SD card
| and load a kernel + recovery rootfs from NAND.

It seems better to me we have no Qi configuration at all... it starts to
feel it is snowballing into Grub or U-Boot on its slow long journey into
becoming Linux :-)

I didn't hear what it is people are wanting to do with this config
language that can't be done with fix priority boot device ordering and
Aux key to skip, maybe boot flag in partition table.

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora -


More information about the openmoko-kernel mailing list