summaryrefslogtreecommitdiffstats
path: root/common/Kconfig
diff options
context:
space:
mode:
authorBastian Krause <bst@pengutronix.de>2019-09-27 11:59:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-30 20:39:04 +0200
commitaada84e72e150e0d0abc835f5b2237d64499f9e0 (patch)
treee4c7d46eba389edbdec0a46fbb4d26f1ca661cc5 /common/Kconfig
parent0ef90e6b42aa38e07623d37583d30caab2582cd6 (diff)
downloadbarebox-aada84e72e150e0d0abc835f5b2237d64499f9e0.tar.gz
barebox-aada84e72e150e0d0abc835f5b2237d64499f9e0.tar.xz
common: machine_id: introduce machine id generation
This patch adds functionality to pass device-specific information that will be hashed to generate a persistent unique machine id. It is then available as global.machine_id. It can be overwritten with nv.machine_id if necessary. Passing the machine id to the kernel is done in a separate patch. Note: if multiple sources provide hashable device-specific information (via machine_id_set_hashable()) the information provided by the last call prior to the late initcall set_machine_id() is used to generate the machine id from. Thus when updating barebox the machine id might change. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Kconfig')
-rw-r--r--common/Kconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index cafaadb3d4..7c56eb469e 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -982,6 +982,24 @@ config RESET_SOURCE
of the reset and why the bootloader is currently running. It can be
useful for any kind of system recovery or repair.
+config MACHINE_ID
+ bool "pass machine-id to kernel"
+ depends on FLEXIBLE_BOOTARGS
+ depends on SHA1
+ help
+ Sets the linux.bootargs.machine_id global variable with a value of
+ systemd.machine_id=UID. The UID is a persistent device-specific
+ id. It is a hash over device-specific information provided by various
+ sources.
+
+ Note: if multiple sources provide hashable device-specific information
+ (via machine_id_set_hashable()) the information provided by the last call
+ prior to the late initcall set_machine_id() is used to generate the
+ machine id from. Thus when updating barebox the machine id might change.
+
+ Note: if no hashable information is available no machine id will be passed
+ to the kernel.
+
endmenu
menu "Debugging"