diff mbox series

[1/3] stm32mp: stm32prog: Add support of ENV partition type

Message ID 20230608170941.1.I0c3b7963b669b6c03e5a3bdf7e9e736e767aafd1@changeid
State Accepted
Commit 82a4a255aa4898cbea16677d7e5b34cc83345f51
Delegated to: Patrice Chotard
Headers show
Series [1/3] stm32mp: stm32prog: Add support of ENV partition type | expand

Commit Message

Patrick DELAUNAY June 8, 2023, 3:09 p.m. UTC
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>
---

 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 5 +++++
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 1 +
 2 files changed, 6 insertions(+)

Comments

Patrice CHOTARD June 13, 2023, 6:21 a.m. UTC | #1
On 6/8/23 17:09, Patrick Delaunay wrote:
> 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>
> ---
> 
>  arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 5 +++++
>  arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 1 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> index 6f3641ccf57b..1bd86b5187da 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> @@ -430,6 +430,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")) {
> @@ -1130,6 +1132,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;
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> index 58f4b96fa752..4c2c1314d990 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> @@ -100,6 +100,7 @@ struct stm32_header_v2 {
>  enum stm32prog_part_type {
>  	PART_BINARY,
>  	PART_FIP,
> +	PART_ENV,
>  	PART_SYSTEM,
>  	PART_FILESYSTEM,
>  	RAW_IMAGE,

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice
Patrice CHOTARD June 16, 2023, 11:38 a.m. UTC | #2
On 6/8/23 17:09, Patrick Delaunay wrote:
> 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>
> ---
> 
>  arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 5 +++++
>  arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 1 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> index 6f3641ccf57b..1bd86b5187da 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> @@ -430,6 +430,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")) {
> @@ -1130,6 +1132,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;
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> index 58f4b96fa752..4c2c1314d990 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
> @@ -100,6 +100,7 @@ struct stm32_header_v2 {
>  enum stm32prog_part_type {
>  	PART_BINARY,
>  	PART_FIP,
> +	PART_ENV,
>  	PART_SYSTEM,
>  	PART_FILESYSTEM,
>  	RAW_IMAGE,
Applied to u-boot-stm/next

Thanks

Patrice
diff mbox series

Patch

diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 6f3641ccf57b..1bd86b5187da 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -430,6 +430,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")) {
@@ -1130,6 +1132,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;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index 58f4b96fa752..4c2c1314d990 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -100,6 +100,7 @@  struct stm32_header_v2 {
 enum stm32prog_part_type {
 	PART_BINARY,
 	PART_FIP,
+	PART_ENV,
 	PART_SYSTEM,
 	PART_FILESYSTEM,
 	RAW_IMAGE,