[U-Boot] [RFC] bootm: Add sub commands

Jerry Van Baren gerald.vanbaren at ge.com
Thu Sep 18 13:25:36 CEST 2008


Wolfgang Denk wrote:
> Dear Kumar Gala,
> 
> In message <1221688841-3197-1-git-send-email-galak at kernel.crashing.org> you wrote:
>> Having bootm sub-commands allows both of these as we can break up
>> the sequeunce of steps that are part of the bootm process.
> 
> OK.
> 
>> +int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> +{
>> +	int ret = 0;
>> +
>> +	/* start */
>> +	if (argv[1][0] == 's') {
> 
> I think just matching on the first letter is to restrictive; we'll end
> up with artificical command "names" that nobody can remember.

That is what the all the other command subcommands do: match on the 
minimum unique sequence, preferably one letter.

>> +	else if (argv[1][0] == 'i') {
> 
> And we need comments what all this means. WTF is 'i' ?

Ich in German :-D  (That is a bad cross-lingual pun: "ick" is what you 
say in English when you step in dog poo.)

You snipped the preceding comment line.  Granted, it was pretty terse:
> +	/* initrd relocate */

The "help" string helps:

> @@ -782,6 +883,17 @@ U_BOOT_CMD(
>  	"\tUse iminfo command to get the list of existing component\n"
>  	"\timages and configurations.\n"
>  #endif
> +	"\t\nSub-commands to do part of the bootm sequence:\n"
> +	"\tstart [addr [arg ...]]\n"
> +	"\tloados - load OS image\n"
> +	"\tprepos - OS specific prep before relocation or go\n"
> +#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC)
> +	"\tinitrd - relocate initrd, set env initrd_start/initrd_end\n"
> +#endif
> +#if defined(CONFIG_OF_LIBFDT)
> +	"\tfdt - relocate initrd\n"
> +#endif
> +	"\tgo - start os\n"
>  );

[snip]

> Best regards,
> 
> Wolfgang Denk

Ditto,
gvb



More information about the U-Boot mailing list