[gnome-build-meta/alatiera/inst: 2/2] eos-installer: Update to 4.0.2




commit 15147eee909aab24322bc49de9b6a5c166f1c4cc
Author: Jordan Petridis <jordan centricular com>
Date:   Mon Jan 31 22:25:54 2022 +0200

    eos-installer: Update to 4.0.2
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1506>

 elements/iso/eos-installer.bst           |  4 +-
 files/eos-installer/riscv.patch          | 95 +++++++++++++++++++++++++++-----
 files/eos-installer/two-partitions.patch | 63 ---------------------
 3 files changed, 81 insertions(+), 81 deletions(-)
---
diff --git a/elements/iso/eos-installer.bst b/elements/iso/eos-installer.bst
index c0d9e5779..0e6f87126 100644
--- a/elements/iso/eos-installer.bst
+++ b/elements/iso/eos-installer.bst
@@ -8,15 +8,13 @@ sources:
 - kind: git_tag
   url: github:endlessm/eos-installer.git
   track-tags: true
-  track: Release_3.9.5
+  track: Release_4.0.2
   submodules:
     ext/libglnx:
       url: gnome:libglnx.git
       checkout: true
 - kind: patch
   path: files/eos-installer/vfat-eosimages.patch
-- kind: patch
-  path: files/eos-installer/two-partitions.patch
 - kind: patch
   path: files/eos-installer/remove-branding.patch
 - kind: patch
diff --git a/files/eos-installer/riscv.patch b/files/eos-installer/riscv.patch
index 8629104e2..2d2648685 100644
--- a/files/eos-installer/riscv.patch
+++ b/files/eos-installer/riscv.patch
@@ -1,24 +1,89 @@
+From d98735ba5f1846e72a88db387f69c77da7e42f64 Mon Sep 17 00:00:00 2001
+From: Will Thompson <wjt endlessos org>
+Date: Thu, 6 Jan 2022 13:08:18 +0000
+Subject: [PATCH 1/2] gpt: Give GUID constants meaningful names
+
+---
+ gnome-image-installer/util/gpt.c | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
 diff --git a/gnome-image-installer/util/gpt.c b/gnome-image-installer/util/gpt.c
-index 8d23cf6a..3982ef5a 100644
+index c88ba9b9..8d8721b4 100644
 --- a/gnome-image-installer/util/gpt.c
 +++ b/gnome-image-installer/util/gpt.c
-@@ -9,6 +9,8 @@ static uint8_t GPT_GUID_LINUX_ROOTFS1[] = {0x40, 0x95, 0x47, 0x44, 0x97, 0xf2, 0
- static uint8_t GPT_GUID_LINUX_ROOTFS2[] = {0xe3, 0xbc, 0x68, 0x4f, 0xcd, 0xe8, 0xb1, 0x4d, 0x96, 0xe7, 
0xfb, 0xca, 0xf9, 0x84, 0xb7, 0x09};
- static uint8_t GPT_GUID_LINUX_ROOTFS3[] = {0x10, 0xd7, 0xda, 0x69, 0xe4, 0x2c, 0x3c, 0x4e, 0xb1, 0x6c, 
0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3};
- static uint8_t GPT_GUID_LINUX_ROOTFS4[] = {0x45, 0xb0, 0x21, 0xb9, 0xf0, 0x1d, 0xc3, 0x41, 0xaf, 0x44, 
0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae};
-+static uint8_t GPT_GUID_LINUX_ROOTFS5[] = {0xa6, 0x70, 0xec, 0x72, 0x74, 0xcf, 0xe6, 0x40, 0xbd, 0x49, 
0x4b, 0xda, 0x08, 0xe8, 0xf2, 0x24};
-+static uint8_t GPT_GUID_LINUX_ROOTFS6[] = {0xfe, 0xa7, 0xd5, 0x60, 0x7d, 0x8e, 0x5c, 0x43, 0xb7, 0x14, 
0x3d, 0xd8, 0x16, 0x21, 0x44, 0xe1};
+@@ -4,12 +4,18 @@
+ #include "gpt.h"
+ #include "crc32.h"
+ 
++/* See https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html
++ * Note that these are encoded in the mixed-endian on-disk format required by
++ * GPT, so GPT_GUID_LINUX_ROOTFS_X86_64 would be written
++ * 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 in the standard string representation.
++ */
+ static uint8_t GPT_GUID_EFI[] = {0x28, 0x73, 0x2a, 0xc1, 0x1f, 0xf8, 0xd2, 0x11, 0xba, 0x4b, 0x00, 0xa0, 
0xc9, 0x3e, 0xc9, 0x3b};
+ static uint8_t GPT_GUID_LINUX_DATA[] = {0xaf, 0x3d, 0xc6, 0x0f, 0x83, 0x84, 0x72, 0x47, 0x8e, 0x79, 0x3d, 
0x69, 0xd8, 0x47, 0x7d, 0xe4};
+-static uint8_t GPT_GUID_LINUX_ROOTFS1[] = {0x40, 0x95, 0x47, 0x44, 0x97, 0xf2, 0x41, 0xb2, 0x9a, 0xf7, 
0xd1, 0x31, 0xd5, 0xf0, 0x45, 0x8a};
+-static uint8_t GPT_GUID_LINUX_ROOTFS2[] = {0xe3, 0xbc, 0x68, 0x4f, 0xcd, 0xe8, 0xb1, 0x4d, 0x96, 0xe7, 
0xfb, 0xca, 0xf9, 0x84, 0xb7, 0x09};
+-static uint8_t GPT_GUID_LINUX_ROOTFS3[] = {0x10, 0xd7, 0xda, 0x69, 0xe4, 0x2c, 0x3c, 0x4e, 0xb1, 0x6c, 
0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3};
+-static uint8_t GPT_GUID_LINUX_ROOTFS4[] = {0x45, 0xb0, 0x21, 0xb9, 0xf0, 0x1d, 0xc3, 0x41, 0xaf, 0x44, 
0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae};
++
++static uint8_t GPT_GUID_LINUX_ROOTFS_X86[] = {0x40, 0x95, 0x47, 0x44, 0x97, 0xf2, 0x41, 0xb2, 0x9a, 0xf7, 
0xd1, 0x31, 0xd5, 0xf0, 0x45, 0x8a};
++static uint8_t GPT_GUID_LINUX_ROOTFS_X86_64[] = {0xe3, 0xbc, 0x68, 0x4f, 0xcd, 0xe8, 0xb1, 0x4d, 0x96, 
0xe7, 0xfb, 0xca, 0xf9, 0x84, 0xb7, 0x09};
++static uint8_t GPT_GUID_LINUX_ROOTFS_ARM[] = {0x10, 0xd7, 0xda, 0x69, 0xe4, 0x2c, 0x3c, 0x4e, 0xb1, 0x6c, 
0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3};
++static uint8_t GPT_GUID_LINUX_ROOTFS_AARCH64[] = {0x45, 0xb0, 0x21, 0xb9, 0xf0, 0x1d, 0xc3, 0x41, 0xaf, 
0x44, 0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae};
  
  uint8_t is_nth_flag_set(uint64_t flags, uint8_t n)
  {
-@@ -234,7 +236,9 @@ int is_eos_gpt_valid(struct ptable *pt, uint64_t *size)
-           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS1, 16)==0
-           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS2, 16)==0
-           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS3, 16)==0
+@@ -237,10 +243,10 @@ int is_eos_gpt_valid(struct ptable *pt, uint64_t *size)
+     int has_root = 0;
+     for (i = 1; i < pt->header.ptable_count; ++i) {
+       if (memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_DATA, 16)==0
+-          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS1, 16)==0
+-          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS2, 16)==0
+-          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS3, 16)==0
 -          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS4, 16)==0) {
-+          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS4, 16)==0
-+          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS5, 16)==0
-+          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS6, 16)==0) {
-         // invalid third partition GUID
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_X86, 16)==0
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_X86_64, 16)==0
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_ARM, 16)==0
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_AARCH64, 16)==0) {
+         uint64_t flags = 0;
+         memcpy(&flags, pt->partitions[i].attributes, 8);
+         if(!is_nth_flag_set(flags, 55)) {
+
+From 8c241be62cb2dd7ebaa30bb363a8509a71616f07 Mon Sep 17 00:00:00 2001
+From: Will Thompson <wjt endlessos org>
+Date: Thu, 6 Jan 2022 13:11:29 +0000
+Subject: [PATCH 2/2] gpt: Add RISC-V rootfs GUIDs
+
+Based on a patch by Valentin David <valentin david codethink co uk>:
+https://gitlab.gnome.org/GNOME/gnome-build-meta/-/blob/464bb407/files/eos-installer/riscv.patch
+---
+ gnome-image-installer/util/gpt.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/gnome-image-installer/util/gpt.c b/gnome-image-installer/util/gpt.c
+index 8d8721b4..02926a5e 100644
+--- a/gnome-image-installer/util/gpt.c
++++ b/gnome-image-installer/util/gpt.c
+@@ -16,6 +16,10 @@ static uint8_t GPT_GUID_LINUX_ROOTFS_X86[] = {0x40, 0x95, 0x47, 0x44, 0x97, 0xf2
+ static uint8_t GPT_GUID_LINUX_ROOTFS_X86_64[] = {0xe3, 0xbc, 0x68, 0x4f, 0xcd, 0xe8, 0xb1, 0x4d, 0x96, 
0xe7, 0xfb, 0xca, 0xf9, 0x84, 0xb7, 0x09};
+ static uint8_t GPT_GUID_LINUX_ROOTFS_ARM[] = {0x10, 0xd7, 0xda, 0x69, 0xe4, 0x2c, 0x3c, 0x4e, 0xb1, 0x6c, 
0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3};
+ static uint8_t GPT_GUID_LINUX_ROOTFS_AARCH64[] = {0x45, 0xb0, 0x21, 0xb9, 0xf0, 0x1d, 0xc3, 0x41, 0xaf, 
0x44, 0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae};
++static uint8_t GPT_GUID_LINUX_ROOTFS_RISCV_32[] = {0xfe, 0xa7, 0xd5, 0x60, 0x7d, 0x8e, 0x5c, 0x43, 0xb7, 
0x14, 0x3d, 0xd8, 0x16, 0x21, 0x44, 0xe1};
++static uint8_t GPT_GUID_LINUX_ROOTFS_RISCV_64[] = {0xa6, 0x70, 0xec, 0x72, 0x74, 0xcf, 0xe6, 0x40, 0xbd, 
0x49, 0x4b, 0xda, 0x08, 0xe8, 0xf2, 0x24};
++
++
+ 
+ uint8_t is_nth_flag_set(uint64_t flags, uint8_t n)
+ {
+@@ -246,7 +250,9 @@ int is_eos_gpt_valid(struct ptable *pt, uint64_t *size)
+           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_X86, 16)==0
+           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_X86_64, 16)==0
+           || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_ARM, 16)==0
+-          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_AARCH64, 16)==0) {
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_AARCH64, 16)==0
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_RISCV_32, 16)==0
++          || memcmp(&pt->partitions[i].type_guid, GPT_GUID_LINUX_ROOTFS_RISCV_64, 16)==0) {
          uint64_t flags = 0;
          memcpy(&flags, pt->partitions[i].attributes, 8);
+         if(!is_nth_flag_set(flags, 55)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]