On Mon, Jan 7, 2013 at 12:04 PM, Tom Rini <tr...@ti.com> wrote: > On Fri, Dec 28, 2012 at 05:17:05PM -0200, Otavio Salvador wrote: > >> Signed-off-by: Otavio Salvador <ota...@ossystems.com.br> >> --- >> Changes in v2: >> - Allow use of dynamic/static ip >> - Allow force use, or not, of fdt >> - Change 'auto' to 'try' > [snip] >> @@ -169,13 +173,43 @@ >> "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ >> "mmcboot=echo Booting from mmc ...; " \ >> "run mmcargs; " \ >> - "bootm\0" \ >> + "if test ${boot_fdt} = yes; then " \ >> + "if fatload mmc ${mmcdev}:${mmcpart} ${ftd_addr} >> ${ftd_file}; then " \ > > How about adding loadfdtfile after 'loaduimage' above?
The command for netboot is different so we'd need to have two vars for it. I think it will be confusing ... >> + "bootm ${loadaddr} - ${ftd_addr}; " \ >> + "else " \ >> + "if test ${boot_fdt} = try; then " \ >> + "bootm; " \ >> + "else " \ >> + "echo ERROR: Cannot load the DT, >> aborting...; " \ > > Strings must not be broken, so this is fine. But, you aren't really > aborting. If you had a loop of "try mmcboot. Fail? Try netboot" it > would continue. So the error message should perhaps just be about > cannot load DT from mmc? I don't have a strong opinion about this. I'd prefer to abort here so user really knows it failed. In case user wish it to not be fatal it can use the 'try' in boot_fdt. How I could abort here? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot