]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp: stm32prog: Add support of ENV partition type
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 8 Jun 2023 15:09:54 +0000 (17:09 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 16 Jun 2023 09:04:41 +0000 (11:04 +0200)
Add support of "ENV" partition type in flashlayout to select
the "u-boot-env" GUID, with PARTITION_U_BOOT_ENVIRONMENT =
3de21764-95bd-54bd-a5c3-4abe786f38a8, that mean a partition
holding a U-Boot environment introduced by
commit c0364ce1c695 ("doc/README.gpt: define partition type
GUID for U-Boot environment")'

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h

index 0cdc14dd5bc8eff68aa0ca9ce97c3ae753a7c887..bddd7a4462c5e8d2ee8f3fb9250de8bff1b011a5 100644 (file)
@@ -425,6 +425,8 @@ static int parse_type(struct stm32prog_data *data,
                }
        } else if (!strcmp(p, "FIP")) {
                part->part_type = PART_FIP;
+       } else if (!strcmp(p, "ENV")) {
+               part->part_type = PART_ENV;
        } else if (!strcmp(p, "System")) {
                part->part_type = PART_SYSTEM;
        } else if (!strcmp(p, "FileSystem")) {
@@ -1115,6 +1117,9 @@ static int create_gpt_partitions(struct stm32prog_data *data)
                        case PART_BINARY:
                                type_str = LINUX_RESERVED_UUID;
                                break;
+                       case PART_ENV:
+                               type_str = "u-boot-env";
+                               break;
                        case PART_FIP:
                                type_str = FIP_TYPE_UUID;
                                break;
index 04a899ee11849250ecfa2fa3bc7704479940bd86..7493008c8bc7f2d2f082d5d0c36b2f5e7dc8dc5f 100644 (file)
@@ -100,6 +100,7 @@ struct stm32_header_v2 {
 enum stm32prog_part_type {
        PART_BINARY,
        PART_FIP,
+       PART_ENV,
        PART_SYSTEM,
        PART_FILESYSTEM,
        RAW_IMAGE,