summaryrefslogtreecommitdiffstats
path: root/include/bootm.h
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2024-03-13 20:45:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-04-04 15:40:01 +0200
commitc1bb8f33009e69f2c83d5963278bcf26d88cf819 (patch)
tree51cac4e1f800385d4812ee95192a06de35d54a21 /include/bootm.h
parente0d5d8bf9a81b58660f19482a723342c7506ad95 (diff)
downloadbarebox-c1bb8f33009e69f2c83d5963278bcf26d88cf819.tar.gz
barebox-c1bb8f33009e69f2c83d5963278bcf26d88cf819.tar.xz
bootm: add global.bootm.provide_hostname option
Add a new bootm option to automatically provide the $global.hostname via the kernel commandline parameter systemd.hostname. The logic is based on the provide_machine_id logic. To only provide valid hostnames the new barebox_hostname_is_valid() is used therefore we need to make this function public. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240313194547.3725723-4-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/bootm.h')
-rw-r--r--include/bootm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bootm.h b/include/bootm.h
index ee2b574521..c69da85cdd 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -34,6 +34,11 @@ struct bootm_data {
* value of global.machine_id to Kernel.
*/
bool provide_machine_id;
+ /*
+ * provide_hostname - if true, try to add systemd.hostname= with value
+ * of global.hostname to Kernel.
+ */
+ bool provide_hostname;
unsigned long initrd_address;
unsigned long os_address;
unsigned long os_entry;