[PATCH] imagebuilder: include device tree bindings
Tomasz Maciej Nowak
tmn505 at terefe.re
Tue Feb 27 10:12:38 PST 2024
From: Tomasz Maciej Nowak <tmn505 at gmail.com>
Image Builder includes target dts which might reference device tree
bindings for various integrated peripherals and trying to build dtb
without access to bindings will fail.
Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
target/imagebuilder/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index c3b6c9c10c58..fb187c90228c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -26,7 +26,7 @@ all: compile
$(BIN_DIR)/$(IB_NAME).tar.xz: clean
rm -rf $(PKG_BUILD_DIR)
- mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
+ mkdir -p $(IB_KDIR) $(IB_LDIR)/include $(PKG_BUILD_DIR)/staging_dir/host/lib \
$(PKG_BUILD_DIR)/target/linux $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
$(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
@@ -99,6 +99,9 @@ endif
if [ -d $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts ]; then \
$(CP) -L $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \
fi
+ if [ -d $(LINUX_DIR)/include/dt-bindings ]; then \
+ $(CP) -L $(LINUX_DIR)/include/dt-bindings $(IB_LDIR)/include; \
+ fi
$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk
$(SED) 's,^# SOURCE_DATE_EPOCH:=.*,SOURCE_DATE_EPOCH:=$(SOURCE_DATE_EPOCH),g' $(PKG_BUILD_DIR)/include/version.mk
$(SED) '/LINUX_VERMAGIC:=/ { s,unknown,$(LINUX_VERMAGIC),g }' $(PKG_BUILD_DIR)/include/kernel.mk
--
2.44.0
More information about the openwrt-devel
mailing list