From patchwork Tue Mar 8 13:30:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 85986 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 431FAB70CC for ; Wed, 9 Mar 2011 00:38:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47717280B7; Tue, 8 Mar 2011 14:38:30 +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 J-F2WUxPJDAo; Tue, 8 Mar 2011 14:38:30 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11C2A280CF; Tue, 8 Mar 2011 14:38:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F4AB280B1 for ; Tue, 8 Mar 2011 14:38:10 +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 A5TpGrCdeW2b for ; Tue, 8 Mar 2011 14:38:09 +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 (p4FF0750E.dip.t-dialin.net [79.240.117.14]) by theia.denx.de (Postfix) with ESMTP id 0DD8F280B2 for ; Tue, 8 Mar 2011 14:38:07 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id D9ABA18015E17; Tue, 8 Mar 2011 14:30:32 +0100 (CET) From: Heiko Schocher To: u-boot@lists.denx.de Date: Tue, 8 Mar 2011 14:30:16 +0100 Message-Id: <1299591018-8944-19-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.7.4 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 18/20] 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 --- 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 a04c39e..ed24072 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" \ ""