diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-05-22 09:21:54 +0000 |
---|---|---|
committer | Albert ARIBAUD (U-Boot) <uboot@lilith.(none)> | 2012-07-09 22:44:33 +0200 |
commit | 5e724ca2b65cea97a5945b163c765427a7ebf3d1 (patch) | |
tree | cf173d7b7d648d6a8ad3ed9424898d83667d32d6 /common | |
parent | f857fff6068fe36a327a0ff6d837412caaf2e07d (diff) | |
download | u-boot-imx-5e724ca2b65cea97a5945b163c765427a7ebf3d1.zip u-boot-imx-5e724ca2b65cea97a5945b163c765427a7ebf3d1.tar.gz u-boot-imx-5e724ca2b65cea97a5945b163c765427a7ebf3d1.tar.bz2 |
Add env vars describing U-Boot target board
This can be useful for generic scripts. For example, rather than hard-
coding a script to ext2load tegra-harmony.dtb, it could load
${soc}-${board}.dtb and hence not need adjustments to run on multiple
boards.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/env_common.c | 11 | ||||
-rw-r--r-- | common/env_embedded.c | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/common/env_common.c b/common/env_common.c index c33d22d..d9e990d 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -116,6 +116,17 @@ const uchar default_environment[] = { #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) "pcidelay=" MK_STR(CONFIG_PCI_BOOTDELAY) "\0" #endif +#ifdef CONFIG_ENV_VARS_UBOOT_CONFIG + "arch=" CONFIG_SYS_ARCH "\0" + "cpu=" CONFIG_SYS_CPU "\0" + "board=" CONFIG_SYS_BOARD "\0" +#ifdef CONFIG_SYS_VENDOR + "vendor=" CONFIG_SYS_VENDOR "\0" +#endif +#ifdef CONFIG_SYS_SOC + "soc=" CONFIG_SYS_SOC "\0" +#endif +#endif #ifdef CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_SETTINGS #endif diff --git a/common/env_embedded.c b/common/env_embedded.c index 80fb29d..3872878 100644 --- a/common/env_embedded.c +++ b/common/env_embedded.c @@ -179,6 +179,17 @@ env_t environment __PPCENV__ = { #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) "pcidelay=" MK_STR(CONFIG_PCI_BOOTDELAY) "\0" #endif +#ifdef CONFIG_ENV_VARS_UBOOT_CONFIG + "arch=" CONFIG_SYS_ARCH "\0" + "cpu=" CONFIG_SYS_CPU "\0" + "board=" CONFIG_SYS_BOARD "\0" +#ifdef CONFIG_SYS_VENDOR + "vendor=" CONFIG_SYS_VENDOR "\0" +#endif +#ifdef CONFIG_SYS_SOC + "soc=" CONFIG_SYS_SOC "\0" +#endif +#endif #ifdef CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_SETTINGS #endif |