From: Cory Tusar <Cory.Tusar@zii.aero>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: Chris Healy <Chris.Healy@zii.aero>
Subject: [PATCH 1/2] common: boot: Instantiate storage for global.boot.machine_id
Date: Fri, 14 Jun 2019 20:35:08 +0000 [thread overview]
Message-ID: <20190614203438.18900-2-cory.tusar@zii.aero> (raw)
In-Reply-To: <20190614203438.18900-1-cory.tusar@zii.aero>
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@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);
+
BAREBOX_MAGICVAR_NAMED(global_boot_default, global.boot.default, "default boot order");
+BAREBOX_MAGICVAR_NAMED(global_boot_machine_id, global.boot.machine_id, "optional machine-id, per Bootloader Spec");
--
2.21.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-06-14 20:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 20:35 [PATCH 0/2] Fix machine-id operation Cory Tusar
2019-06-14 20:35 ` Cory Tusar [this message]
2019-06-17 12:21 ` [PATCH 1/2] common: boot: Instantiate storage for global.boot.machine_id Sascha Hauer
2019-06-17 18:06 ` Cory Tusar
2019-06-14 20:35 ` [PATCH 2/2] common: blspec: Both environment and config file machine-id must match Cory Tusar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190614203438.18900-2-cory.tusar@zii.aero \
--to=cory.tusar@zii.aero \
--cc=Chris.Healy@zii.aero \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox