From patchwork Fri Nov 20 10:45:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1403583 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=KQ9VoFe5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CctXm6B8Xz9sSs for ; Fri, 20 Nov 2020 21:47:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C11F825BC; Fri, 20 Nov 2020 11:46:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="KQ9VoFe5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFB3D82564; Fri, 20 Nov 2020 11:46:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::71e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 894D282384 for ; Fri, 20 Nov 2020 11:45:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P5TslK6hs5bLhfyB/QVFH8zDWv6dwSXSQBCuXPHYTgjxclaLB2kr8bbjDxMwHdWbdsASPzXdrMi5b60YALMMdEQTZhTHggyHP3Vovu1vUltUVq85Bos2tk9MNtD8v4a02lbgz3bCDWQ6iARjvPIlIF57+AdGnDgTP2bPnp/4jDxIL+F+4OHWHIdohNuQYAwpWLNd5M0KUWAnupXJ8wfg8pgZeftTjF8xiznEZ07j6L3mhjgCJXB8J8PyX/X32tJEcnVImAjAIY5KHpZAYPr1Sx/ch00HIdUPfOyD7SaeDRPAOErhqRiX9zB6SNcr2WznZfG/wDM2W9hKv+WLQAMjmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jw5KaUv9JXrDk7RYYHlWC5+MEBkWMRfJgtKmifwVpiA=; b=ajikjMd4C1avFKVxE2RrLYX3QA1Nv9bk/WmBxdXnjRpz6h1GxNmm+QtJ4askNMaybJ1hKLBdFH8J3FTIHno9xdK0svr8AIe0xgrrfKWeJqTK1GJOnXyhfmOysoEnQuIjNrOvkVPsqB7Cg6lIhgTrtI1o0stxVc7/kmKrsiQ971Ey75kLK6fRthTmB/pJxEV/FobV/iEBBfWwbpktVgkFtPBA03FuzkXif66VPjh+SjnGs6WlHw7tpfenHGWYTJbeI6ACFvUf2MHLfD++r1Y3X3U5mZQWYokmlgs4sle2ekw2IgZ85j5Nc5KEbiFH3pKi/8XuNEbJLC3qyla82aTgnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jw5KaUv9JXrDk7RYYHlWC5+MEBkWMRfJgtKmifwVpiA=; b=KQ9VoFe5ySM60K3XBxZN/stfyM5jVqQbmZXzgi1hqogVTn390dQgJVsD53GHxrHrIDZEeTvt8WJeua1OG/XnAgircpdtEsFeKKIpYzQSr8kEsmOgUjgF0nFSt+EUONuJ6YxwGFKlrS5lv884KLIT3G8kmv7gJ6eCx/7NmD3SE1c= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) by AM8PR10MB4276.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:1ea::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Fri, 20 Nov 2020 10:45:49 +0000 Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9068:c899:48f:a8e3]) by AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9068:c899:48f:a8e3%6]) with mapi id 15.20.3589.022; Fri, 20 Nov 2020 10:45:49 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Marcin Juszkiewicz , Rasmus Villemoes Subject: [PATCH 2/3] doc/README.gpt: define partition type GUID for U-Boot environment Date: Fri, 20 Nov 2020 11:45:36 +0100 Message-Id: <20201120104537.619-3-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201120104537.619-1-rasmus.villemoes@prevas.dk> References: <07954a18-fc7d-aaa2-cd1c-649c131b485a@prevas.dk> <20201120104537.619-1-rasmus.villemoes@prevas.dk> X-Originating-IP: [81.216.59.226] X-ClientProxiedBy: HE1PR0501CA0026.eurprd05.prod.outlook.com (2603:10a6:3:1a::36) To AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (81.216.59.226) by HE1PR0501CA0026.eurprd05.prod.outlook.com (2603:10a6:3:1a::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Fri, 20 Nov 2020 10:45:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f41b94a8-b1ca-4742-b374-08d88d4171c1 X-MS-TrafficTypeDiagnostic: AM8PR10MB4276: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /LlmcPftaVUYgunkahzbTn67FzmAj/kEyzO5ih0AXRXO3rWuyryOk2ehy+2LPztlg0U8iFVWVNEwkoq5K7D3GeqOuZ9V8AaPyfGr0eJdLN4NpxPYAS8jb21NKs4B3A8QrzYsQ3QBsWRrJGcSecQ8fmYijGR5NqWT8Yh8rUSyIrmMj9fxd+rt+6H5wxl8zqCxGcMF3ehzq9RQGh24K0/9iNAhySQqUUQfX/tR3r3a7rSQpMwxKNbWx1Awll/yY8dAFNgM33F9Vw6wFGFMMtRt0GZm+kOXCGOQxWVcZQEKCl+gGbe0r8Aqf8fSXDfApSIloxzgZoX446ziOaFcbuwZ3K1VYBxmnaC1lvee66o1dAddbld4diVMKyo2dR/mFWafF4DX4LdQxorQfWIC7qq+vg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(39840400004)(366004)(396003)(376002)(346002)(6666004)(66556008)(5660300002)(52116002)(6512007)(6916009)(4326008)(83380400001)(6506007)(186003)(16526019)(6486002)(44832011)(66946007)(478600001)(26005)(66476007)(8676002)(107886003)(8936002)(2616005)(2906002)(316002)(8976002)(1076003)(956004)(966005)(54906003)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: h7OxPDqL3XdqJarknnCGyXrgXqlwTALf7H2hXTg7eOz12Qb9dGA+mljFd0uzxjkZDVXp+jPI5WO8TOaB65uIVnZcvohAwBPpKYBzC3UkWx5lALHjXKRGl9fvp68DwPZlVJQt2Jf3T4XfjcMJ1AioerlL+wuDOLzGhTAX81ZVrhyxncwaPewQEQrk7+8tn57SS4c+6b3pFjU5nxgHCytO1qkL4ac1WbuKpfmCvXfTFUgQ6mwg/sMZGWSykcByZLoa8XOP6wQ8BqVmFr3o8btbXHKh64v2g3IyZqcs3LBtd3ymE8v1YXNV/myDj6l7vhsoynntelYGcoSY3wzrGWsNuElAxGBYaFDdTGWJkgD+D7SuaJlvYOPCLQYgwxIlzjs4G3K9ZxmNU638+jzijNlVkKdF3XOPfFbjB3qd1VJwLheAc2YHYgajyTpqhBlwRPstah4uzDQt2VmtOksg+4Knu5Dn+KhKfNOCPAvHnVP5DWQ9XfWgUcZebJEMtR2rmkWasc/F8DF0zNHazkKHXtkRzGIXBVnPeYWUJb7BHwlJSKmhAJdNlEbiMc7rAL+aFIFfGZyEEgRVQ/vxntM3NbtGQNnaNaspxZ3x5BXHWdJOA6Co7wzjBi3/t30yIOAXNMzEgOgh/pfZk7C3YrtVnIP/RA== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: f41b94a8-b1ca-4742-b374-08d88d4171c1 X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2020 10:45:49.6044 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xrZ9THRsrDtDyNyApWmvy5kzn4nHhbVbYJAc0MaiLSNRfzc8E3NsqLdeOvFojwHnAOKZS7movXwLiiSXljwE3EH96hjWmjlnP+bTpva9tyM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR10MB4276 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean When setting aside a GPT partition for holding the U-Boot environment, having a partition type GUID [1] indicating "Linux filesystem" (as most tools default to) is somewhat misleading - and there's no other well-known type GUID that is better suited. So to have a canonical value to put into the type field, define 3de21764-95bd-54bd-a5c3-4abe786f38a8 to mean a partition holding a U-Boot environment. This is a v5 namespace-name GUID [2], generated [3] from a namespace of "25cbcde0-8642-47c6-a298-1a3a57cd256b" and name "U-Boot environment". Should future type GUIDs be defined in the context of U-Boot, it's sensible to use that same namespace GUID. [1] https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs [2] https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based) [3] https://www.uuidtools.com/v5 Signed-off-by: Rasmus Villemoes --- doc/README.gpt | 2 ++ include/part_efi.h | 3 +++ lib/uuid.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/README.gpt b/doc/README.gpt index facd7afc3a..9e0d2221ef 100644 --- a/doc/README.gpt +++ b/doc/README.gpt @@ -267,6 +267,8 @@ Some strings can be also used at the place of known GUID : (0657FD6D-A4AB-43C4-84E5-0933C84B4F4F) "lvm" = PARTITION_LINUX_LVM_GUID (E6D6D379-F507-44C2-A23C-238F2A3DF928) + "u-boot-env" = PARTITION_U_BOOT_ENVIRONMENT + (3DE21764-95BD-54BD-A5C3-4ABE786F38A8) "uuid_disk=...;name=u-boot,size=60MiB,uuid=...; name=kernel,size=60MiB,uuid=...,type=linux;" diff --git a/include/part_efi.h b/include/part_efi.h index 1929e4400f..c68529b4da 100644 --- a/include/part_efi.h +++ b/include/part_efi.h @@ -56,6 +56,9 @@ #define PARTITION_LINUX_LVM_GUID \ EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \ 0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28) +#define PARTITION_U_BOOT_ENVIRONMENT \ + EFI_GUID( 0x3de21764, 0x95bd, 0x54bd, \ + 0xa5, 0xc3, 0x4a, 0xbe, 0x78, 0x6f, 0x38, 0xa8) /* linux/include/efi.h */ typedef u16 efi_char16_t; diff --git a/lib/uuid.c b/lib/uuid.c index 6cfb6cd449..54a93aacc9 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -96,7 +96,8 @@ static const struct { {"linux", PARTITION_LINUX_FILE_SYSTEM_DATA_GUID}, {"raid", PARTITION_LINUX_RAID_GUID}, {"swap", PARTITION_LINUX_SWAP_GUID}, - {"lvm", PARTITION_LINUX_LVM_GUID} + {"lvm", PARTITION_LINUX_LVM_GUID}, + {"u-boot-env", PARTITION_U_BOOT_ENVIRONMENT}, }; /*