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>
1 parent b0ac975 commit fbf03e24b9111aea4a11fea1ac67fee446ad2c63
@Bastian Krause Bastian Krause authored on 27 Sep 2019
Sascha Hauer committed on 30 Sep 2019
Showing 2 changed files
View
common/bootm.c
View
include/bootm.h