Commit cc39a36a authored by Adam Wujek's avatar Adam Wujek

sw/patches/uboot: add uboot version to FDT

Under /chosen/uboot_version
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent c15c7481
From 314e1aae7a9ec863dc09e0529ff1c5f1f7bc20b0 Mon Sep 17 00:00:00 2001
From: Adam Wujek <dev_public@wujek.eu>
Date: Fri, 1 Jul 2022 01:31:07 +0200
Subject: [PATCH] fdt_support: add uboot version to FDT
Under /chosen/uboot_version
Signed-off-by: Adam Wujek <dev_public@wujek.eu>
---
common/fdt_support.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 2b3f811bbd..630fe3ebc5 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -16,6 +16,7 @@
#include <fdt_support.h>
#include <exports.h>
#include <fdtdec.h>
+#include <version.h>
/**
* fdt_getprop_u32_default_node - Return a node's property or a default
@@ -332,6 +333,14 @@ int fdt_chosen(void *fdt)
}
}
+ err = fdt_setprop(fdt, nodeoffset, "uboot_version", PLAIN_VERSION,
+ strlen(PLAIN_VERSION) + 1);
+ if (err < 0) {
+ printf("WARNING: could not set uboot_version %s.\n",
+ fdt_strerror(err));
+ return err;
+ }
+
return fdt_fixup_stdout(fdt, nodeoffset);
}
--
2.17.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment