[U-Boot] [PATCH] km/common: add pnvramsize to default environment

Valentin Longchamp valentin.longchamp at keymile.com
Fri Apr 8 14:47:45 CEST 2011


From: Holger Brunck <holger.brunck at keymile.com>

The pnvram size was used later from start scripts in linux. Therefore
it must be set inside u-boot.

Signed-off-by: Holger Brunck <holger.brunck at keymile.com>
Acked-by: Heiko Schocher <hs at denx.de>
cc: Wolfgang Denk <wd at denx.de>
cc: Detlev Zundel <dzu at denx.de>
cc: Valentin Longchamp <valentin.longchamp at keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
---
 board/keymile/common/common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 72278a0..da73f66 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -100,6 +100,9 @@ int set_km_env(void)
 	sprintf((char *)buf, "0x%x", pnvramaddr);
 	setenv("pnvramaddr", (char *)buf);
 
+	sprintf((char *)buf, "0x%x", CONFIG_KM_PNVRAM);
+	setenv("pnvramsize", (char *)buf);
+
 	pram = (CONFIG_KM_RESERVED_PRAM + CONFIG_KM_PHRAM + CONFIG_KM_PNVRAM) /
 		0x400;
 	sprintf((char *)buf, "0x%x", pram);
-- 
1.7.0.5



More information about the U-Boot mailing list