[PATCH] imagebuilder: fix build if the target is sourced from a feed

thomas.richard at bootlin.com thomas.richard at bootlin.com
Tue Mar 19 08:14:12 PDT 2024


From: Thomas Richard <thomas.richard at bootlin.com>

If a target is sourced from a feed, an error occurs during the build of
the imagebuilder. It fails to find the target directory.

To fix the issue, add a check to test if the target is in the feed
directory.

Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
---
 target/imagebuilder/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index c3b6c9c10c..0fd830020c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -80,7 +80,12 @@ endif
 
 	$(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux
 	$(CP) -L $(TOPDIR)/target/linux/generic $(PKG_BUILD_DIR)/target/linux
-	$(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux
+	if [ -d $(TOPDIR)/target/linux/feeds/$(BOARD) ]; then \
+		$(INSTALL_DIR) $(PKG_BUILD_DIR)/target/linux/feeds; \
+		$(CP) -L $(TOPDIR)/target/linux/feeds/$(BOARD) $(PKG_BUILD_DIR)/target/linux/feeds/; \
+	else \
+		$(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux; \
+	fi
 	if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
 		$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
 	fi
-- 
2.39.2




More information about the openwrt-devel mailing list