diff mbox

[U-Boot,v2,1/8] km/common: fix initial_boot_bank for bootpackages

Message ID caa5ff7d66fe8127b7d2578024a2a5ae2e9a2989.1304508448.git.holger.brunck@keymile.com
State Accepted
Headers show

Commit Message

Holger Brunck May 4, 2011, 11:47 a.m. UTC
From: Thomas Herzmann <thomas.herzmann@keymile.com>

The initial_boot_bank can be set when more than one application is
used in a bootpackage. But a value n <> 0 never led to booting from
bank n. Instead, bank 0 was booted. This patch fixes this.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
---
Changes for v2:
   - split up first large patch serie to three independent smaller
     patch series
   - no change in the content of this patch

 include/configs/keymile-common.h |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

Comments

Wolfgang Denk May 10, 2011, 9:17 p.m. UTC | #1
Dear Holger Brunck,

In message <caa5ff7d66fe8127b7d2578024a2a5ae2e9a2989.1304508448.git.holger.brunck@keymile.com> you wrote:
> From: Thomas Herzmann <thomas.herzmann@keymile.com>
> 
> The initial_boot_bank can be set when more than one application is
> used in a bootpackage. But a value n <> 0 never led to booting from
> bank n. Instead, bank 0 was booted. This patch fixes this.
> 
> Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> Acked-by: Heiko Schocher <hs@denx.de>
> cc: Wolfgang Denk <wd@denx.de>
> cc: Detlev Zundel <dzu@denx.de>
> ---
> Changes for v2:
>    - split up first large patch serie to three independent smaller
>      patch series
>    - no change in the content of this patch
> 
>  include/configs/keymile-common.h |   15 ++++++++-------
>  1 files changed, 8 insertions(+), 7 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h
index cb6d0fb..bc8a896 100644
--- a/include/configs/keymile-common.h
+++ b/include/configs/keymile-common.h
@@ -247,10 +247,10 @@ 
 		"printbootargs boot "					\
 		"\" && "						\
 		"setenv bootcmd \'"					\
-		"run bootrunner; reset"					\
+		"run actual bootrunner; reset"				\
 		"\' && "						\
 		"setenv altbootcmd \'"					\
-		"run actual0 bootcmd; reset"				\
+		"run backup bootrunner; reset"				\
 		"\' && "						\
 		"saveenv && "						\
 		"reset\0"						\
@@ -288,7 +288,7 @@ 
 	"addramfs="							\
 		"setenv bootargs \""					\
 		"${bootargs} phram.phram="				\
-		"rootfs${actual_bank},${rootfsaddr},${rootfssize}\"\0"	\
+		"rootfs${boot_bank},${rootfsaddr},${rootfssize}\"\0"	\
 	"addtty="							\
 		"setenv bootargs ${bootargs}"				\
 		" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0"	\
@@ -303,7 +303,7 @@ 
 	"flashargs="							\
 		"setenv bootargs "					\
 		"ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " "		\
-		"root=mtdblock:rootfs${actual_bank} "			\
+		"root=mtdblock:rootfs${boot_bank} "			\
 		"rootfstype=squashfs ro\0"				\
 	""
 
@@ -352,7 +352,7 @@ 
 		"cramfsload ${kernel_addr_r} uImage && "		\
 		"setenv actual_kernel_addr ${kernel_addr_r}\0"		\
 	"ubiattach=ubi part ${ubipartition}\0"				\
-	"ubicopy=ubi read ${cramfsaddr} bootfs${actual_bank}\0"		\
+	"ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}\0"		\
 	"ubipartition=" CONFIG_KM_UBI_PARTITION_NAME "\0"		\
 	""
 
@@ -382,9 +382,10 @@ 
  * - 'default': setup default environment
  */
 #define CONFIG_KM_DEF_ENV_CONSTANTS					\
-	"actual=setenv actual_bank ${initial_boot_bank}\0"		\
-	"actual0=setenv actual_bank 0\0"				\
+	"actual=setenv boot_bank ${actual_bank}\0"			\
+	"backup=setenv boot_bank ${backup_bank}\0"			\
 	"actual_bank=${initial_boot_bank}\0"				\
+	"backup_bank=0\0"						\
 	"default="							\
 		"setenv default 'run newenv; reset' &&  "		\
 		"run release && saveenv; reset\0"			\