From patchwork Fri Nov 13 06:42:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 544074 X-Patchwork-Delegate: trini@ti.com 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 F06B0140281 for ; Fri, 13 Nov 2015 17:49:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD7E74BA9C; Fri, 13 Nov 2015 07:49:47 +0100 (CET) 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 5sbNWrDPtBef; Fri, 13 Nov 2015 07:49:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C18DF4BAC2; Fri, 13 Nov 2015 07:49:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 649754BAB5 for ; Fri, 13 Nov 2015 07:49:42 +0100 (CET) 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 Cw6KIyE1jYW7 for ; Fri, 13 Nov 2015 07:49:42 +0100 (CET) X-Greylist: delayed 400 seconds by postgrey-1.34 at theia; Fri, 13 Nov 2015 07:49:37 CET 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 7.mo2.mail-out.ovh.net (7.mo2.mail-out.ovh.net [188.165.48.182]) by theia.denx.de (Postfix) with ESMTPS id 096064BABA for ; Fri, 13 Nov 2015 07:49:37 +0100 (CET) Received: from mail629.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo2.mail-out.ovh.net (Postfix) with SMTP id D31B41000B56 for ; Fri, 13 Nov 2015 07:42:58 +0100 (CET) Received: from localhost (HELO queueout) (127.0.0.1) by localhost with SMTP; 13 Nov 2015 08:42:58 +0200 Received: from 109241105088.warszawa.vectranet.pl (HELO localhost.localdomain) (l.majewski%majess.pl@109.241.105.88) by ns0.ovh.net with SMTP; 13 Nov 2015 08:42:56 +0200 From: Lukasz Majewski To: Tom Rini Date: Fri, 13 Nov 2015 07:42:09 +0100 Message-Id: <1447396932-26644-4-git-send-email-l.majewski@majess.pl> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447396932-26644-1-git-send-email-l.majewski@majess.pl> References: <1447396932-26644-1-git-send-email-l.majewski@majess.pl> X-Ovh-Tracer-Id: 9686961323982045709 X-Ovh-Remote: 109.241.105.88 (109241105088.warszawa.vectranet.pl) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekhedrhedtucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekhedrhedtucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Cc: Steve Rae , u-boot@lists.denx.de, Przemyslaw Marczak Subject: [U-Boot] [PATCH 3/6] gpt: doc: README: Update README entry for gpt verify extension X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" ./doc/README.gpt entry has been updated to explain usage of "gpt verify" command. Signed-off-by: Lukasz Majewski Reviewed-by: Tom Rini --- doc/README.gpt | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/README.gpt b/doc/README.gpt index 59fdeeb..9fe97b0 100644 --- a/doc/README.gpt +++ b/doc/README.gpt @@ -167,9 +167,33 @@ To restore GUID partition table one needs to: 2. Define 'CONFIG_EFI_PARTITION' and 'CONFIG_CMD_GPT' -2. From u-boot prompt type: +3. From u-boot prompt type: gpt write mmc 0 $partitions +Checking (validating) GPT partitions in U-Boot: +=============================================== + +Procedure is the same as above. The only change is at point 3. + +At u-boot prompt one needs to write: + gpt verify mmc 0 [$partitions] + +where [$partitions] is an optional parameter. + +When it is not provided, only basic checks based on CRC32 calculation for GPT +header and PTEs are performed. +When provided, additionally partition data - name, size and starting +offset (last two in LBA) - are compared with data defined in '$partitions' +environment variable. + +After running this command, return code is set to 0 if no errors found in +on non-volatile medium stored GPT. + +Following line can be used to assess if GPT verification has succeed: + +U-BOOT> gpt verify mmc 0 $partitions +U-BOOT> if test $? = 0; then echo "GPT OK"; else echo "GPT ERR"; fi + Useful info: ============