some question about / adding commandline files from rootfs

Andy Green andy at openmoko.com
Tue Aug 26 16:33:45 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| xiangfu wrote:
|> i think that AUX key pressing or something  is to choose kernel not
|> commandline
|
| AUX is a bit of a problem in GTA02, because it's already used to switch
| between NOR and NAND, so you can only sample it after having given the
| user a few seconds to press it. In GTA03, we have a lot more buttons to
| choose from.

It takes a couple of seconds to pull in kernel from SD Card.  So the
solution here is to continue to do that by default and abort that if AUX
is seen during that time and go directly to backup kernel load.  In this
way there is no time wasted either way and he can press AUX definitely
after steppingstone is done.

| I think the boot sequence should simply do something like this:
|
| 	if (!magic_button()) {
| 		boot(system[0]);
| 		boot(system[1]);
| 	}
| 	boot(system[2]);
| 	/* add more fallbacks if desired */
| 	howl_in_agony();

We already have better code than this with the kernel source structs and
it needs to work with that as I suggested.

| So all the magic button does is skip the first choice(s). After that,
| we just use whatever we can get to load. Example:
|
| [0] =	SD+ext2: /boot/uImage + /boot/cmdline

I can't convince people that these commandline addons are not necessary,
putting them into the rootfs is not the worst way.  Although it means
one less point to kexec...

| [4] =	NAND(0x....) + NAND(0x....)

But I don't like the way it still requires management of raw partition
in NAND case because we can't mount its rootfs.  Kernel magic partition
is bad enough.  NAND is once again the problem child needing more
special pleading.  We could reduce the size of GTA03 backup rootfs and
go for mounting it jffs2 in Qi, then we unify the kernel location for
NAND too into being inside rootfs.  GTA02 could follow all this really
too and become SD-centric.

What happens if he put a bad thing in this commandline file... it seems
clear that backup kernel itself should not have user modifiable
commandline used to start it, there really is no reason for it anyway.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAki0FEkACgkQOjLpvpq7dMroXQCfaqKiEkk5z9qWTJI2evUUlt8x
tGYAniY+KCWd9HJmegUWeMOMitCR8PVf
=g1Y2
-----END PGP SIGNATURE-----



More information about the openmoko-kernel mailing list