[PATCH 1/2] common: boot: Instantiate storage for global.boot.machine_id

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 17 05:21:23 PDT 2019


On Fri, Jun 14, 2019 at 08:35:08PM +0000, Cory Tusar wrote:
> There are references throughout the documentation (and elsewhere in the
> boot code) regarding the use of machine-id in a bootloader spec file.
> However, there was no global storage allocated for this variable.
> 
> This commit adds the necessary storage and associated initialization.
> 
> Signed-off-by: Cory Tusar <cory.tusar at zii.aero>
> ---
>  common/boot.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/common/boot.c b/common/boot.c
> index 974eaf5d0..fae2ff935 100644
> --- a/common/boot.c
> +++ b/common/boot.c
> @@ -348,4 +348,13 @@ void bootsources_list(struct bootentries *bootentries)
>  		printf("%-20s %s\n", entry->title, entry->description);
>  }
>  
> +static int boot_init(void)
> +{
> +	globalvar_add_simple("boot.machine_id", NULL);
> +
> +	return 0;
> +}
> +late_initcall(boot_init);

There already is an initcall in this file adding a globalvar. Could you
add this change to the existing initcall and rename
init_boot_watchdog_timeout() to something more suitable?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list