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>
1 parent 0ef90e6 commit aada84e72e150e0d0abc835f5b2237d64499f9e0
@Bastian Krause Bastian Krause authored on 27 Sep 2019
Sascha Hauer committed on 30 Sep 2019
Showing 4 changed files
View
common/Kconfig
View
common/Makefile
View
common/machine_id.c 0 → 100644
View
include/machine_id.h 0 → 100644