Patchwork [U-Boot] Add board_name to CONFIG_ENV_VARS_UBOOT_CONFIG

login
register
mail settings
Submitter Stephen Warren
Date Oct. 31, 2012, 9:17 p.m.
Message ID <1351718248-781-1-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/196000/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Stephen Warren - Oct. 31, 2012, 9:17 p.m.
From: Stephen Warren <swarren@nvidia.com>

CONFIG_ENV_VARS_UBOOT_CONFIG creates environment variables indicating
which configuration U-Boot was built for. Some U-Boot binaries run on
multiple boards, and hence this information may not uniquley describe
the HW that U-Boot is actually running on. Another patch introduces
environment variable board_name to represent that. In order to avoid
scripts having to check $board_name, use it if set, and then fall back
to using $board, make CONFIG_ENV_VARS_UBOOT_CONFIG also set a default
value for board_name, so that variable is always available.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 include/env_default.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Joe Hershberger - Oct. 31, 2012, 9:23 p.m.
Hi Stephen,

On Wed, Oct 31, 2012 at 4:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> CONFIG_ENV_VARS_UBOOT_CONFIG creates environment variables indicating
> which configuration U-Boot was built for. Some U-Boot binaries run on
> multiple boards, and hence this information may not uniquley describe
> the HW that U-Boot is actually running on. Another patch introduces
> environment variable board_name to represent that. In order to avoid
> scripts having to check $board_name, use it if set, and then fall back
> to using $board, make CONFIG_ENV_VARS_UBOOT_CONFIG also set a default
> value for board_name, so that variable is always available.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tom Rini - Nov. 4, 2012, 6:29 p.m.
On Wed, Oct 31, 2012 at 04:23:27PM -0500, Joe Hershberger wrote:
> Hi Stephen,
> 
> On Wed, Oct 31, 2012 at 4:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > From: Stephen Warren <swarren@nvidia.com>
> >
> > CONFIG_ENV_VARS_UBOOT_CONFIG creates environment variables indicating
> > which configuration U-Boot was built for. Some U-Boot binaries run on
> > multiple boards, and hence this information may not uniquley describe
> > the HW that U-Boot is actually running on. Another patch introduces
> > environment variable board_name to represent that. In order to avoid
> > scripts having to check $board_name, use it if set, and then fall back
> > to using $board, make CONFIG_ENV_VARS_UBOOT_CONFIG also set a default
> > value for board_name, so that variable is always available.
> >
> > Signed-off-by: Stephen Warren <swarren@nvidia.com>
> > ---
> 
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!

Patch

diff --git a/include/env_default.h b/include/env_default.h
index 375e5ca..a1db73a 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -118,6 +118,7 @@  const uchar default_environment[] = {
 	"arch="		CONFIG_SYS_ARCH			"\0"
 	"cpu="		CONFIG_SYS_CPU			"\0"
 	"board="	CONFIG_SYS_BOARD		"\0"
+	"board_name="	CONFIG_SYS_BOARD		"\0"
 #ifdef CONFIG_SYS_VENDOR
 	"vendor="	CONFIG_SYS_VENDOR		"\0"
 #endif