
On 09/01/2013 12:57, Otavio Salvador wrote:
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Hi Otavio,
Changes in v5:
- Change subject
- Reword the warning
Changes in v4:
- Use a warning, instead of error when failing to fetch fdt
- Drop exit use
- Fix netboot
- Use fdt instead of ftd
Changes in v3:
- Add loadfdt
- Use loadfdt
- Call exit to abort script
Changes in v2:
- Allow use of dynamic/static ip
- Allow force use, or not, of fdt
- Change 'auto' to 'try'
I get some problems: - loadbootscript is not correctly set. In fact:
env default -f -a ## Resetting to default environment MX53LOCO U-Boot > pri mmcargs mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
There is still a '0' missing for mmcargs, and loadbootscript is not set.
Then there is a problem with netboot. It is set correctly, but "pri netboot" crashes:
pri netboot netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo ERROR: Cannot load the DT; exit; fi; fi; else bootm; fi; prefetch abort pc : [<203b6d78>] lr : [<203b6d74>] sp : af565e00 ip : 00000000 fp : 00000000 r10: 00000002 r9 : 00000000 r8 : af565f58 r7 : af568c7c r6 : 00000001 r5 : 00000000 r4 : 6f6f6220 r3 : 00000083 r2 : 00000060 r1 : af565cc0 r0 : 00000173 Flags: nZCv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
Then I do not understand the boot_fdt when set to try. I have imagined that it tries to start a DT kernel, and if no fdt find is found, it tries with a legacy kernel without fdt. But it does not try to load the FDT file, because this is done only when boot_fdt = yes. When boot_fdt = try, it starts always a legacy kernel.
Best regards, Stefano Babic