[U-Boot] [RFC v2][PATCH] bootm: Add sub commands
Kumar Gala
galak at kernel.crashing.org
Wed Aug 13 17:38:43 CEST 2008
I'm also looking for feedback on the fact that OS specific code looks
like to allow sub-commands to do 'PREP' and 'GO' that are OS specific,
while maintaining the full 'bootm' functionality.
We assume the user handles doing 'BODY' via other sub-commands/
commands (like bootm initrd, bootm fdt, fdt chosen, fdt boardsetup,
etc.)
int __attribute__((noinline))
do_bootm_linux(int flag, bootm_headers_t *images)
{
if (flag & BOOT_OS_PREP) {
boot_prep_linux(&images->lmb);
return 0;
}
if (flag & BOOT_OS_GO) {
boot_jump_linux(images, of_flat_tree);
return 0;
}
boot_prep_linux(&images->lmb);
ret = boot_body_linux(images, &of_flat_tree);
if (ret)
return ret;
boot_jump_linux(images, of_flat_tree);
return 0;
}
- k
More information about the U-Boot
mailing list