mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] partitions: gpt: allow to create barebox state partitions
@ 2025-12-09  9:08 Sascha Hauer
  2025-12-11  8:06 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2025-12-09  9:08 UTC (permalink / raw)
  To: Barebox List

Allow to create barebox state partitions with the GUID
4778ed65-bf42-45fa-9c5b-287a1dc4aab1.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/parted.c       | 2 +-
 common/partitions/efi.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/commands/parted.c b/commands/parted.c
index f03dc37c05..dd79def62a 100644
--- a/commands/parted.c
+++ b/commands/parted.c
@@ -435,7 +435,7 @@ BAREBOX_CMD_HELP_TEXT("")
 BAREBOX_CMD_HELP_TEXT("<unit> can be one of \"s\" (sectors), \"B\" (bytes), \"kB\", \"MB\", \"GB\", \"TB\",")
 BAREBOX_CMD_HELP_TEXT("\"KiB\", \"MiB\", \"GiB\" or \"TiB\"")
 BAREBOX_CMD_HELP_TEXT("<type> must be \"gpt\" or \"msdos\"")
-BAREBOX_CMD_HELP_TEXT("<fstype> can be one of  \"ext2\", \"ext3\", \"ext4\", \"fat16\", \"fat32\" or \"bbenv\"")
+BAREBOX_CMD_HELP_TEXT("<fstype> can be one of  \"ext2\", \"ext3\", \"ext4\", \"fat16\", \"fat32\", \"bbenv\" or \"barebox-state\"")
 BAREBOX_CMD_HELP_TEXT("<name> for MBR partition tables can be one of \"primary\", \"extended\" or")
 BAREBOX_CMD_HELP_TEXT("\"logical\". For GPT this is a name string.")
 BAREBOX_CMD_HELP_TEXT("<end> can be \"max\" it will take all remaining space")
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index 88d8a2d739..56a3a4c43f 100644
--- a/common/partitions/efi.c
+++ b/common/partitions/efi.c
@@ -17,6 +17,7 @@
 #include <init.h>
 #include <asm/unaligned.h>
 #include <crc.h>
+#include <state.h>
 #include <linux/ctype.h>
 
 #include <efi/partition.h>
@@ -616,6 +617,7 @@ static __maybe_unused struct partition_desc *efi_partition_create_table(struct b
 static guid_t partition_linux_data_guid = PARTITION_LINUX_DATA_GUID;
 static guid_t partition_basic_data_guid = PARTITION_BASIC_DATA_GUID;
 static guid_t partition_barebox_env_guid = PARTITION_BAREBOX_ENVIRONMENT_GUID;
+static guid_t partition_barebox_state_guid = BAREBOX_STATE_PARTITION_GUID;
 
 static const guid_t *fs_type_to_guid(const char *fstype)
 {
@@ -631,6 +633,8 @@ static const guid_t *fs_type_to_guid(const char *fstype)
 		return &partition_basic_data_guid;
 	if (!strcmp(fstype, "bbenv"))
 		return &partition_barebox_env_guid;
+	if (!strcmp(fstype, "barebox-state"))
+		return &partition_barebox_state_guid;
 
 	return NULL;
 }
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] partitions: gpt: allow to create barebox state partitions
  2025-12-09  9:08 [PATCH] partitions: gpt: allow to create barebox state partitions Sascha Hauer
@ 2025-12-11  8:06 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-12-11  8:06 UTC (permalink / raw)
  To: Barebox List, Sascha Hauer


On Tue, 09 Dec 2025 10:08:35 +0100, Sascha Hauer wrote:
> Allow to create barebox state partitions with the GUID
> 4778ed65-bf42-45fa-9c5b-287a1dc4aab1.
> 
> 

Applied, thanks!

[1/1] partitions: gpt: allow to create barebox state partitions
      https://git.pengutronix.de/cgit/barebox/commit/?id=ac516005c64c (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-11  8:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09  9:08 [PATCH] partitions: gpt: allow to create barebox state partitions Sascha Hauer
2025-12-11  8:06 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox