From patchwork Fri Apr 1 07:16:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 89228 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 19C781007D1 for ; Fri, 1 Apr 2011 18:26:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF11A280E2; Fri, 1 Apr 2011 09:24:51 +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 iDFgY3hbXKWn; Fri, 1 Apr 2011 09:24:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8AD45280E3; Fri, 1 Apr 2011 09:23:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEBE7280DD for ; Fri, 1 Apr 2011 09:23:25 +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 RaJnWr2cupIo for ; Fri, 1 Apr 2011 09:23:25 +0200 (CEST) X-policyd-weight: IN_SBL_XBL_SPAMHAUS=4.35 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from pollux.denx.de (p4FF073FC.dip.t-dialin.net [79.240.115.252]) by theia.denx.de (Postfix) with ESMTP id 1B794280A7 for ; Fri, 1 Apr 2011 09:23:10 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 4271E185E3C6A; Fri, 1 Apr 2011 09:16:39 +0200 (CEST) From: Heiko Schocher To: u-boot@lists.denx.de Date: Fri, 1 Apr 2011 09:16:34 +0200 Message-Id: <1301642195-15280-23-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1301642195-15280-1-git-send-email-hs@denx.de> References: <1299591018-8944-1-git-send-email-hs@denx.de> <1301642195-15280-1-git-send-email-hs@denx.de> In-Reply-To: <1299591018-8944-1-git-send-email-hs@denx.de> References: <1299591018-8944-1-git-send-email-hs@denx.de> Cc: Valentin Longchamp , Thomas Herzmann , Holger Brunck , Heiko Schocher Subject: [U-Boot] [PATCH v4 22/23] keymile boards: support of boardId / hwkey lists 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 In order to support boardId / hwkey lists, the u-boot default environment has been updated: Added a script checkboardidlist which checks the list of boardId / hwkey if the boadrId / hwkey of the IVM is included in that list. This feature is used if you got different HW variants but you only want to create one boot package. E.g. supx5 board series. Signed-off-by: Thomas Herzmann Signed-off-by: Holger Brunck cc: Valentin Longchamp cc: Heiko Schocher --- Changes for v2: - nothing Changes for v3: - rebased only include/configs/keymile-common.h | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h index 1344ca9..e9a97b7 100644 --- a/include/configs/keymile-common.h +++ b/include/configs/keymile-common.h @@ -243,6 +243,7 @@ "release=" \ "setenv actual_bank ${initial_boot_bank} && " \ "setenv subbootcmds \"" \ + "checkboardidlist " \ "checkboardid " \ "ubiattach ubicopy " \ "cramfsloadfdt cramfsloadkernel " \ @@ -392,8 +393,34 @@ "default=" \ "setenv default 'run newenv; reset' && " \ "run release && saveenv; reset\0" \ + "checkboardidlist=" \ + "if test \"x${boardIdListHex}\" != \"x\"; then " \ + "IVMbidhwk=${IVM_BoardId}_${IVM_HWKey}; " \ + "found=0; " \ + "for bidhwk in \"${boardIdListHex}\"; do " \ + "echo trying $bidhwk ...; " \ + "if test \"x$bidhwk\" = \"x$IVMbidhwk\"; then " \ + "found=1; " \ + "echo match found for $bidhwk; " \ + "if test \"x$bidhwk\" != \"x${boardId}_${hwKey}\";then "\ + "setenv boardid ${IVM_BoardId}; " \ + "setenv boardId ${IVM_BoardId}; " \ + "setenv hwkey ${IVM_HWKey}; " \ + "setenv hwKey ${IVM_HWKey}; " \ + "echo \"boardId set to ${boardId}\"; " \ + "echo \"hwKey set to ${hwKey}\"; " \ + "saveenv; " \ + "fi; " \ + "fi; " \ + "done; " \ + "else " \ + "echo \"boardIdListHex not set, not checked\"; "\ + "found=1; " \ + "fi; " \ + "test \"$found\" = 1 \0" \ "checkboardid=" \ - "test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ + "test \"x${boardId}\" = \"x${IVM_BoardId}\" && " \ + "test \"x${hwKey}\" = \"x${IVM_HWKey}\"\0" \ "printbootargs=print bootargs\0" \ "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \ ""