[PATCH 1/2] imd: create new helper macro to add data from oftree to image meta data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 include/image-metadata.h | 4 ++++
 scripts/gen-dtb-s        | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/image-metadata.h b/include/image-metadata.h
index 8739bffb92e1..5904d95acd37 100644
--- a/include/image-metadata.h
+++ b/include/image-metadata.h
@@ -118,6 +118,10 @@ static inline void imd_used(const void *unused)
 
 #define IMD_USED(_name) \
 	imd_used(&__barebox_imd_##_name)
+#define IMD_USED_OF(_name) ({ \
+	extern char __barebox_imd_OF_ ## _name[]; \
+	imd_used(&__barebox_imd_OF_ ## _name); \
+	})
 
 #endif /* __BAREBOX__ */
 
diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 2b44ffb361eb..c3144df851bf 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -18,8 +18,8 @@ FDTGET=scripts/dtc/fdtget
 
 if [ "$imd" = "y" ]; then
 	echo ".section .barebox_imd_0.${name},\"a\""
-	echo ".global __imd_${name}_start"
-	echo "__imd_${name}_start:"
+	echo ".global __barebox_imd_OF_${name}"
+	echo "__barebox_imd_OF_${name}:"
 
 	compat=$($FDTGET -d notfound -t bi "$dtb" / compatible | sed "s^ ^,^g")
 	if [ "$compat" != "notfound" ]; then
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux