From patchwork Fri Apr 8 12:47:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 90324 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 111B6B6F1E for ; Fri, 8 Apr 2011 23:00:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C053280DF; Fri, 8 Apr 2011 14:59:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KXzTZZbfwRwX; Fri, 8 Apr 2011 14:59:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15386280C5; Fri, 8 Apr 2011 14:58:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ADB562808A for ; Fri, 8 Apr 2011 14:58:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BJcGka4YXm-x for ; Fri, 8 Apr 2011 14:58:09 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.ch.keymile.com (mail.ch.keymile.com [193.17.201.103]) by theia.denx.de (Postfix) with SMTP id 14B632809C for ; Fri, 8 Apr 2011 14:58:00 +0200 (CEST) Received: from SRVCHBER1212.ch.keymile.net ([172.31.32.9]) by eSafe SMTP Relay 1297237168; Fri, 08 Apr 2011 14:36:34 +0100 Received: from localhost.localdomain ([172.31.32.134]) by SRVCHBER1212.ch.keymile.net with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Apr 2011 14:47:56 +0200 From: Valentin Longchamp To: u-boot@lists.denx.de Date: Fri, 8 Apr 2011 14:47:41 +0200 Message-Id: <6390dd22d5ac3bcf6dfe8de677c5d4b62cd48a29.1302266367.git.valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.7.0.5 In-Reply-To: In-Reply-To: References: References: X-OriginalArrivalTime: 08 Apr 2011 12:47:56.0994 (UTC) FILETIME=[2F4DD220:01CBF5EB] X-ESAFE-STATUS: Mail allowed X-ESAFE-DETAILS: Cc: Valentin Longchamp , Detlev@theia.denx.de, Thomas Herzmann , holger.brunck@keymile.com, hs@denx.de Subject: [U-Boot] [PATCH] km/common: fix initial_boot_bank for bootpackages X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Thomas Herzmann 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 Signed-off-by: Holger Brunck Acked-by: Heiko Schocher cc: Wolfgang Denk cc: Detlev Zundel cc: Valentin Longchamp Signed-off-by: Valentin Longchamp --- include/configs/keymile-common.h | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h index 6329a1c..5c32023 100644 --- a/include/configs/keymile-common.h +++ b/include/configs/keymile-common.h @@ -249,10 +249,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" \ @@ -290,7 +290,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" \ @@ -305,7 +305,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" \ "" @@ -354,7 +354,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" \ "" @@ -384,9 +384,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" \