summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBastian Krause <bst@pengutronix.de>2019-09-27 11:59:54 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-30 20:39:04 +0200
commitfbf03e24b9111aea4a11fea1ac67fee446ad2c63 (patch)
treee06a10a94e6fb44637144fd32b15b08aa8308ec2 /include
parentb0ac975d9277b06081b5eff1a49d5bec19a64684 (diff)
downloadbarebox-fbf03e24b9111aea4a11fea1ac67fee446ad2c63.tar.gz
barebox-fbf03e24b9111aea4a11fea1ac67fee446ad2c63.tar.xz
bootm: allow providing machine id to Kernel
By default systemd generates a machine id on first boot and tries to persist it (see `man machine-id`). When the root file system is read-only systemd cannot persist the machine id. In case multiple redundant slots are used the machine id will vary. When not handled explicitly the machine id will also change during system updates. It is possible to pass a machine id to the kernel which will be used by systemd (systemd.machine_id=). If global.bootm.provide_machine_id (or nv.bootm.provide_machine_id) is true then provide the machine id from global.machine_id as systemd.machine_id= parameter to the Kernel. Note that global.machine_id must be set, either by the machine_id_set_bootarg late init call or by setting it manually with nv.machine_id if necessary. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/bootm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bootm.h b/include/bootm.h
index 5ce3318ecc..a041aa35b9 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -26,6 +26,11 @@ struct bootm_data {
* mount the rootfs from the same device as the Kernel comes from.
*/
bool appendroot;
+ /*
+ * provide_machine_id - if true, try to add systemd.machine_id= with
+ * value of global.machine_id to Kernel.
+ */
+ bool provide_machine_id;
unsigned long initrd_address;
unsigned long os_address;
unsigned long os_entry;