From patchwork Mon Mar 21 07:02:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 87704 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 1D661B6F44 for ; Mon, 21 Mar 2011 18:16:45 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9CEA92814D; Mon, 21 Mar 2011 08:15:37 +0100 (CET) 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 DKsp+FRyCIzj; Mon, 21 Mar 2011 08:15:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C0F13280E3; Mon, 21 Mar 2011 08:13:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 126E528089 for ; Mon, 21 Mar 2011 08:13:21 +0100 (CET) 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 NpBjj3Mxysu6 for ; Mon, 21 Mar 2011 08:13:20 +0100 (CET) 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 (p4FF078D1.dip.t-dialin.net [79.240.120.209]) by theia.denx.de (Postfix) with ESMTP id 07DFA2808F for ; Mon, 21 Mar 2011 08:13:11 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id 0152B185E3C6A; Mon, 21 Mar 2011 08:02:23 +0100 (CET) From: Heiko Schocher To: u-boot@lists.denx.de Date: Mon, 21 Mar 2011 08:02:18 +0100 Message-Id: <1300690939-31511-23-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1300690939-31511-1-git-send-email-hs@denx.de> References: <1299591018-8944-1-git-send-email-hs@denx.de> <1300690939-31511-1-git-send-email-hs@denx.de> Cc: Valentin Longchamp , Thomas Herzmann , Holger Brunck , Heiko Schocher Subject: [U-Boot] [PATCH v3 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" \ ""