summaryrefslogtreecommitdiff
path: root/include/configs/mx51evk.h
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-04-19 11:04:36 +0000
committerStefano Babic <sbabic@denx.de>2013-04-25 21:43:30 +0200
commit94b5f3edc0e1c626fcdb21cb4ebbb285dd177872 (patch)
treef83f0a04cf1eac8835961e39cfd7bed6108c54c6 /include/configs/mx51evk.h
parenteaffaa2d25ce6e94a965460467352bd12513bf09 (diff)
downloadu-boot-imx-94b5f3edc0e1c626fcdb21cb4ebbb285dd177872.zip
u-boot-imx-94b5f3edc0e1c626fcdb21cb4ebbb285dd177872.tar.gz
u-boot-imx-94b5f3edc0e1c626fcdb21cb4ebbb285dd177872.tar.bz2
mx51evk: Update environment in order to allow booting a dt kernel
Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x92000000, so that we can have the: - uImage at 0x92000000 - imx51-babbage.dtb at 0x91000000 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'include/configs/mx51evk.h')
-rw-r--r--include/configs/mx51evk.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index cb3d938..4545a80 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -149,11 +149,15 @@
#define CONFIG_ETHPRIME "FEC0"
-#define CONFIG_LOADADDR 0x90800000 /* loadaddr env var */
+#define CONFIG_LOADADDR 0x92000000 /* loadaddr env var */
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
+ "fdt_file=imx51-babbage.dtb\0" \
+ "fdt_addr=0x91000000\0" \
+ "boot_fdt=try\0" \
+ "ip_dyn=yes\0" \
"mmcdev=0\0" \
"mmcpart=2\0" \
"mmcroot=/dev/mmcblk0p3 rw\0" \
@@ -166,15 +170,47 @@
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm\0" \
+ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+ "if run loadfdt; then " \
+ "bootm ${loadaddr} - ${fdt_addr}; " \
+ "else " \
+ "if test ${boot_fdt} = try; then " \
+ "bootm; " \
+ "else " \
+ "echo WARN: Cannot load the DT; " \
+ "fi; " \
+ "fi; " \
+ "else " \
+ "bootm; " \
+ "fi;\0" \
"netargs=setenv bootargs console=ttymxc0,${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
- "dhcp ${uimage}; bootm\0" \
+ "if test ${ip_dyn} = yes; then " \
+ "setenv get_cmd dhcp; " \
+ "else " \
+ "setenv get_cmd tftp; " \
+ "fi; " \
+ "${get_cmd} ${uimage}; " \
+ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; 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;\0"
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \