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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to