[PATCH] of: Pass barebox version to kernel

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 19 03:30:41 PDT 2018


Pass the barebox version to Linux in case somebody is interested in it
under Linux. We use put the version under /chosen/barebox-version and
it can be read under Linux in /sys/firmware/devicetree/base/chosen/barebox-version.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/oftree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/oftree.c b/common/oftree.c
index 40eb35f188..8a2ede4c60 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -128,6 +128,7 @@ static int of_fixup_bootargs(struct device_node *root, void *unused)
 	if (!node)
 		return -ENOMEM;
 
+	of_property_write_string(node, "barebox-version", release_string);
 
 	err = of_property_write_string(node, "bootargs", str);
 
-- 
2.16.1




More information about the barebox mailing list