mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] bootm: export bootm_set_verify_mode
@ 2023-07-26 19:28 Ahmad Fatoum
  2023-07-27  6:17 ` Marco Felsch
  2023-07-28  5:53 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2023-07-26 19:28 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We already have bootm_get_verify_mode() exported, so export
bootm_set_verify_mode() for symmetry. The same can already be achieved
by changing $global.bootm.verify, but direct access makes it easier to
set a default value that can be overridden by built-in environment.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/bootm.c  | 5 +++++
 include/bootm.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/common/bootm.c b/common/bootm.c
index 791d6b8fbbf1..c46b00a86f64 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -70,6 +70,11 @@ enum bootm_verify bootm_get_verify_mode(void)
 	return bootm_verify_mode;
 }
 
+void bootm_set_verify_mode(enum bootm_verify mode)
+{
+	bootm_verify_mode = mode;
+}
+
 static const char * const bootm_verify_names[] = {
 #ifndef CONFIG_BOOTM_FORCE_SIGNED_IMAGES
 	[BOOTM_VERIFY_NONE] = "none",
diff --git a/include/bootm.h b/include/bootm.h
index 655c5152d97e..ee2b574521db 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -145,6 +145,7 @@ int bootm_load_devicetree(struct image_data *data, void *fdt,
 int bootm_get_os_size(struct image_data *data);
 
 enum bootm_verify bootm_get_verify_mode(void);
+void bootm_set_verify_mode(enum bootm_verify mode);
 
 #define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1)
 
-- 
2.39.2




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

* Re: [PATCH] bootm: export bootm_set_verify_mode
  2023-07-26 19:28 [PATCH] bootm: export bootm_set_verify_mode Ahmad Fatoum
@ 2023-07-27  6:17 ` Marco Felsch
  2023-07-28  5:53 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2023-07-27  6:17 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On 23-07-26, Ahmad Fatoum wrote:
> We already have bootm_get_verify_mode() exported, so export
> bootm_set_verify_mode() for symmetry. The same can already be achieved
> by changing $global.bootm.verify, but direct access makes it easier to
> set a default value that can be overridden by built-in environment.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>

> ---
>  common/bootm.c  | 5 +++++
>  include/bootm.h | 1 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/common/bootm.c b/common/bootm.c
> index 791d6b8fbbf1..c46b00a86f64 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -70,6 +70,11 @@ enum bootm_verify bootm_get_verify_mode(void)
>  	return bootm_verify_mode;
>  }
>  
> +void bootm_set_verify_mode(enum bootm_verify mode)
> +{
> +	bootm_verify_mode = mode;
> +}
> +
>  static const char * const bootm_verify_names[] = {
>  #ifndef CONFIG_BOOTM_FORCE_SIGNED_IMAGES
>  	[BOOTM_VERIFY_NONE] = "none",
> diff --git a/include/bootm.h b/include/bootm.h
> index 655c5152d97e..ee2b574521db 100644
> --- a/include/bootm.h
> +++ b/include/bootm.h
> @@ -145,6 +145,7 @@ int bootm_load_devicetree(struct image_data *data, void *fdt,
>  int bootm_get_os_size(struct image_data *data);
>  
>  enum bootm_verify bootm_get_verify_mode(void);
> +void bootm_set_verify_mode(enum bootm_verify mode);
>  
>  #define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1)
>  
> -- 
> 2.39.2
> 
> 
> 



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

* Re: [PATCH] bootm: export bootm_set_verify_mode
  2023-07-26 19:28 [PATCH] bootm: export bootm_set_verify_mode Ahmad Fatoum
  2023-07-27  6:17 ` Marco Felsch
@ 2023-07-28  5:53 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-07-28  5:53 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Wed, Jul 26, 2023 at 09:28:24PM +0200, Ahmad Fatoum wrote:
> We already have bootm_get_verify_mode() exported, so export
> bootm_set_verify_mode() for symmetry. The same can already be achieved
> by changing $global.bootm.verify, but direct access makes it easier to
> set a default value that can be overridden by built-in environment.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  common/bootm.c  | 5 +++++
>  include/bootm.h | 1 +
>  2 files changed, 6 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/common/bootm.c b/common/bootm.c
> index 791d6b8fbbf1..c46b00a86f64 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -70,6 +70,11 @@ enum bootm_verify bootm_get_verify_mode(void)
>  	return bootm_verify_mode;
>  }
>  
> +void bootm_set_verify_mode(enum bootm_verify mode)
> +{
> +	bootm_verify_mode = mode;
> +}
> +
>  static const char * const bootm_verify_names[] = {
>  #ifndef CONFIG_BOOTM_FORCE_SIGNED_IMAGES
>  	[BOOTM_VERIFY_NONE] = "none",
> diff --git a/include/bootm.h b/include/bootm.h
> index 655c5152d97e..ee2b574521db 100644
> --- a/include/bootm.h
> +++ b/include/bootm.h
> @@ -145,6 +145,7 @@ int bootm_load_devicetree(struct image_data *data, void *fdt,
>  int bootm_get_os_size(struct image_data *data);
>  
>  enum bootm_verify bootm_get_verify_mode(void);
> +void bootm_set_verify_mode(enum bootm_verify mode);
>  
>  #define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1)
>  
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-07-28  5:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 19:28 [PATCH] bootm: export bootm_set_verify_mode Ahmad Fatoum
2023-07-27  6:17 ` Marco Felsch
2023-07-28  5:53 ` Sascha Hauer

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