[U-Boot] [PATCH 5/6] move pandaboard over to use the generic distro configuation and environment

Dennis Gilmore
2014-03-20T22:13:00Z

port pandaboard to use the generic distro configuation.
remove duplicated config options, clean up the environment, include new
environment.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
include/configs/omap4_panda.h | 2 --
include/configs/ti_omap4_common.h | 37 +++++++++++--------------------------
2 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 7378acd..1b81a24 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -33,8 +33,6 @@

#define CONFIG_UBOOT_ENABLE_PADS_ALL

-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP

#include <configs/ti_omap4_common.h>
#define CONFIG_CMD_NET
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 387f570..f9baa50 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -86,6 +86,7 @@
/*
* Environment setup
*/
+#ifndef CONFIG_SPL_BUILD
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
"console=ttyO2,115200n8\0" \
@@ -102,16 +103,16 @@
"vram=${vram} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+ "loadbootscript=load mmc ${mmcdev} ${kernel_addr_r} boot.scr\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
- "source ${loadaddr}\0" \
- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
+ "source ${kernel_addr_r}\0" \
+ "loadbootenv=load mmc ${mmcdev} ${kernel_addr_r} uEnv.txt\0" \
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
- "env import -t ${loadaddr} ${filesize}\0" \
- "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+ "env import -t ${kernel_addr_r} ${filesize}\0" \
+ "loadimage=load mmc ${bootpart} ${kernel_addr_r} ${bootdir}/${bootfile}\0" \
"mmcboot=echo Booting from mmc${mmcdev} ...; " \
"run mmcargs; " \
- "bootz ${loadaddr} - ${fdtaddr}\0" \
+ "bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
"findfdt="\
"if test $board_name = sdp4430; then " \
"setenv fdtfile omap4-sdp.dtb; fi; " \
@@ -123,29 +124,13 @@
"setenv fdtfile omap4-panda-es.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ "loadfdt=load mmc ${bootpart} ${fdt_addr_r} ${bootdir}/${fdtfile}\0" \
+ BOOTCMDS_COMMON
+#endif

#define CONFIG_BOOTCOMMAND \
"run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadbootenv; then " \
- "run importbootenv; " \
- "fi;" \
- "if test -n ${uenvcmd}; then " \
- "echo Running uenvcmd ...;" \
- "run uenvcmd;" \
- "fi;" \
- "fi;" \
- "if run loadimage; then " \
- "run loadfdt;" \
- "run mmcboot; " \
- "fi; " \
- "fi"
-
+ "for target in ${boot_targets}; do run bootcmd_${target}; done "
/*
* Defines for SPL
* It is known that this will break HS devices. Since the current size of
--
1.9.0