The branch stable/13 has been updated by jrtc27:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=19b23effacafe1313cce83a1f03151e905b6c9b8

commit 19b23effacafe1313cce83a1f03151e905b6c9b8
Author:     Jessica Clarke <[email protected]>
AuthorDate: 2024-09-02 22:21:18 +0000
Commit:     Jessica Clarke <[email protected]>
CommitDate: 2025-12-15 17:56:35 +0000

    gpart: Add u-boot-env alias for U-Boot's environment GPT partition UUID
    
    This is a platform-independent UUID, and this is the name U-Boot uses.
    
    MFC after:      1 week
    
    (cherry picked from commit b162fc3f3094c50c8ed47ab50981c5448cf0052c)
---
 lib/geom/part/gpart.8      | 7 ++++++-
 sys/geom/part/g_part.c     | 1 +
 sys/geom/part/g_part.h     | 1 +
 sys/geom/part/g_part_gpt.c | 2 ++
 sys/sys/disk/gpt.h         | 3 +++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8
index fa0b247c6174..121e6d6a5119 100644
--- a/lib/geom/part/gpart.8
+++ b/lib/geom/part/gpart.8
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 26, 2023
+.Dd September 2, 2024
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -1008,6 +1008,11 @@ A illumos/Solaris partition dedicated to reserved space.
 The scheme-specific type is
 .Qq Li "!6a945a3b-1dd2-11b2-99a6-080020736631"
 for GPT.
+.It Cm u-boot-env
+A raw partition dedicated to U-Boot for storing its environment.
+The scheme-specific type is
+.Qq Li "!3de21764-95bd-54bd-a5c3-4abe786f38a8"
+for GPT.
 .It Cm vmware-vmfs
 A partition that contains a VMware File System (VMFS).
 The scheme-specific types are
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index c0baf5cc8992..5ff74685a1db 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -131,6 +131,7 @@ struct g_part_alias_list {
         { "solaris-home", G_PART_ALIAS_SOLARIS_HOME },
         { "solaris-altsec", G_PART_ALIAS_SOLARIS_ALTSEC },
        { "solaris-reserved", G_PART_ALIAS_SOLARIS_RESERVED },
+       { "u-boot-env", G_PART_ALIAS_U_BOOT_ENV },
        { "vmware-reserved", G_PART_ALIAS_VMRESERVED },
        { "vmware-vmfs", G_PART_ALIAS_VMFS },
        { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG },
diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h
index ffeeca9022fe..13bbb1e4126a 100644
--- a/sys/geom/part/g_part.h
+++ b/sys/geom/part/g_part.h
@@ -103,6 +103,7 @@ enum g_part_alias {
        G_PART_ALIAS_SOLARIS_HOME,      /* A Solaris /home partition entry. */
        G_PART_ALIAS_SOLARIS_ALTSEC,    /* A Solaris alternate sector partition 
entry. */
        G_PART_ALIAS_SOLARIS_RESERVED,  /* A Solaris reserved partition entry. 
*/
+       G_PART_ALIAS_U_BOOT_ENV,        /* A U-Boot environment partition 
entry. */
        G_PART_ALIAS_VMFS,              /* A VMware VMFS partition entry */
        G_PART_ALIAS_VMKDIAG,           /* A VMware vmkDiagnostic partition 
entry */
        G_PART_ALIAS_VMRESERVED,        /* A VMware reserved partition entry */
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
index 07bf36772466..e3471cce9f61 100644
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -223,6 +223,7 @@ static struct uuid gpt_uuid_solaris_var = 
GPT_ENT_TYPE_SOLARIS_VAR;
 static struct uuid gpt_uuid_solaris_home = GPT_ENT_TYPE_SOLARIS_HOME;
 static struct uuid gpt_uuid_solaris_altsec = GPT_ENT_TYPE_SOLARIS_ALTSEC;
 static struct uuid gpt_uuid_solaris_reserved = GPT_ENT_TYPE_SOLARIS_RESERVED;
+static struct uuid gpt_uuid_u_boot_env = GPT_ENT_TYPE_U_BOOT_ENV;
 static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED;
 static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS;
 static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG;
@@ -295,6 +296,7 @@ static struct g_part_uuid_alias {
        { &gpt_uuid_solaris_home,       G_PART_ALIAS_SOLARIS_HOME,       0 },
        { &gpt_uuid_solaris_altsec,     G_PART_ALIAS_SOLARIS_ALTSEC,     0 },
        { &gpt_uuid_solaris_reserved,   G_PART_ALIAS_SOLARIS_RESERVED,   0 },
+       { &gpt_uuid_u_boot_env,         G_PART_ALIAS_U_BOOT_ENV,         0 },
        { &gpt_uuid_vmfs,               G_PART_ALIAS_VMFS,               0 },
        { &gpt_uuid_vmkdiag,            G_PART_ALIAS_VMKDIAG,            0 },
        { &gpt_uuid_vmreserved,         G_PART_ALIAS_VMRESERVED,         0 },
diff --git a/sys/sys/disk/gpt.h b/sys/sys/disk/gpt.h
index e48b13684814..f15596f766d9 100644
--- a/sys/sys/disk/gpt.h
+++ b/sys/sys/disk/gpt.h
@@ -252,6 +252,9 @@ CTASSERT(sizeof(struct gpt_ent) == 128);
 #define GPT_ENT_TYPE_HIFIVE_BBL                \
        {0x2e54b353,0x1271,0x4842,0x80,0x6f,{0xe4,0x36,0xd6,0xaf,0x69,0x85}}
 
+#define GPT_ENT_TYPE_U_BOOT_ENV                \
+       {0x3de21764,0x95bd,0x54bd,0xa5,0xc3,{0x4a,0xbe,0x78,0x6f,0x38,0xa8}}
+
 /*
  * Boot partition used by GRUB 2.
  */

Reply via email to