Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A19AC001DE for ; Sun, 13 Aug 2023 14:31:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 659DD869C6; Sun, 13 Aug 2023 16:27:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="JkB5qoWW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22914869B8; Sun, 13 Aug 2023 16:27:46 +0200 (CEST) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 19CAF86978 for ; Sun, 13 Aug 2023 16:27:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-349a32cca76so5404655ab.1 for ; Sun, 13 Aug 2023 07:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691936862; x=1692541662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sQLfocoKyex6rjmhNrmmuRuVY1deaqOKnwamwDNWLMs=; b=JkB5qoWWTvQfuKC43hPCTJ9DNk9g6RXEavlVctVfTzAgyZrHqEmKuHveEx/jgII6Zy CF9cxIHno91RQCplTOUgVtC7zOHhPDcapM3lsoL5wMy3jwedVmhxkodIKUsu5NPG7Pf6 E5xe/MubS9cacgSorYj0DnYzjcBmnjTLegzTg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691936862; x=1692541662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sQLfocoKyex6rjmhNrmmuRuVY1deaqOKnwamwDNWLMs=; b=LMEh0p0AOsZwwcQY8b/2GIs+1Vru6QqluP8eTbpj5Gk814ftr6WdqhoQPF4hi29a4F FLJbHCmwhCxeHRMp5JgZlnI2GMq5jUWnYzHmFoWglk+XE5Oz5ZNzzuPwnGhFyqsUsD4p m4CbqxOTMvIRZoJy5MyzPNxMMB80WdkF9xNxXfXKoVK1oHm2oGrLXD3naLgcc6CnKssp JoQ3RP42zJe7XoThIJtsKsx+kIm+DKiM789j9WYE/0wJWGK8OQXF7gA16tY09vVv2yxf 8spgJXRSCfqwPtcL3P1DJoBbUrKi7/57f5vLsBid+TsWtofVm5NkP/KWnGE8KFKoCXqr CN9Q== X-Gm-Message-State: AOJu0YwNTQb+sgRCJE/EgQxGB89YzbWVoEjAifrFFW76DNBIwmeHWx76 rhDhfnJdY5Jr7+wzxOgHkgMcFSMAI/dKuLC1rWw= X-Google-Smtp-Source: AGHT+IGrDdacfoXnOAtw+a7pDLNDl6dAOxU/Mw/nBLyzLVVj+2s3JEpuouR9jSVoqE97PHMFDqwJQQ== X-Received: by 2002:a05:6e02:174d:b0:349:7eac:b385 with SMTP id y13-20020a056e02174d00b003497eacb385mr11331345ill.1.1691936862589; Sun, 13 Aug 2023 07:27:42 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id w7-20020a02cf87000000b00430cf006d9bsm2280952jar.30.2023.08.13.07.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 07:27:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Abdellatif El Khlifi , Bin Meng , Heinrich Schuchardt , Jose Marinho Subject: [PATCH 22/24] uuid: Add ChromiumOS partition types Date: Sun, 13 Aug 2023 08:26:50 -0600 Message-ID: <20230813142708.361456-23-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog In-Reply-To: <20230813142708.361456-1-sjg@chromium.org> References: <20230813142708.361456-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Add some GUIDs for ChromiumOS so we can detect the partitions. Signed-off-by: Simon Glass --- include/part_efi.h | 14 ++++++++++++++ lib/uuid.c | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/include/part_efi.h b/include/part_efi.h index c68529b4dafe..59b7895b8a23 100644 --- a/include/part_efi.h +++ b/include/part_efi.h @@ -60,6 +60,20 @@ EFI_GUID( 0x3de21764, 0x95bd, 0x54bd, \ 0xa5, 0xc3, 0x4a, 0xbe, 0x78, 0x6f, 0x38, 0xa8) +/* Special ChromiumOS things */ +#define PARTITION_CROS_KERNEL \ + EFI_GUID(0xfe3a2a5d, 0x4f32, 0x41a7, \ + 0xb7, 0x25, 0xac, 0xcc, 0x32, 0x85, 0xa3, 0x09) +#define PARTITION_CROS_ROOT \ + EFI_GUID(0x3cb8e202, 0x3b7e, 0x47dd, \ + 0x8a, 0x3c, 0x7f, 0xf2, 0xa1, 0x3c, 0xfc, 0xec) +#define PARTITION_CROS_FIRMWARE \ + EFI_GUID(0xcab6e88e, 0xabf3, 0x4102, \ + 0xa0, 0x7a, 0xd4, 0xbb, 0x9b, 0xe3, 0xc1, 0xd3) +#define PARTITION_CROS_RESERVED \ + EFI_GUID(0x2e0a753d, 0x9e48, 0x43b0, \ + 0x83, 0x37, 0xb1, 0x51, 0x92, 0xcb, 0x1b, 0x5e) + /* linux/include/efi.h */ typedef u16 efi_char16_t; diff --git a/lib/uuid.c b/lib/uuid.c index 61cd146d63ea..bab676019ff3 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -3,6 +3,8 @@ * Copyright 2011 Calxeda, Inc. */ +#define LOG_CATEGOT LOGC_CORE + #include #include #include @@ -57,6 +59,10 @@ static const struct { {"swap", PARTITION_LINUX_SWAP_GUID}, {"lvm", PARTITION_LINUX_LVM_GUID}, {"u-boot-env", PARTITION_U_BOOT_ENVIRONMENT}, + {"cros-kern", PARTITION_CROS_KERNEL}, + {"cros-root", PARTITION_CROS_ROOT}, + {"cros-fw", PARTITION_CROS_FIRMWARE}, + {"cros-rsrv", PARTITION_CROS_RESERVED}, #endif #if defined(CONFIG_CMD_EFIDEBUG) || defined(CONFIG_EFI) { @@ -254,6 +260,7 @@ int uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin, uint64_t tmp64; if (!uuid_str_valid(uuid_str)) { + log_debug("not valid\n"); #ifdef CONFIG_PARTITION_TYPE_GUID if (!uuid_guid_get_bin(uuid_str, uuid_bin)) return 0; -- 2.41.0.640.ga95def55d0-goog