[openwrt/openwrt] imagebuilder: add check if target is sourced from feed

LEDE Commits lede-commits at lists.infradead.org
Fri Mar 29 12:01:21 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a998a12a2fe2b0f29b8bba11fec386b05c5ac1cc

commit a998a12a2fe2b0f29b8bba11fec386b05c5ac1cc
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Wed May 3 13:29:42 2023 +0200

    imagebuilder: add check if target is sourced from feed
    
    The image generation would fail, if the target is included from a feed.
    To fix this, check if targets is found in the feed directory.
    
    Signed-off-by: Florian Eckert <fe at dev.tdt.de>
    Tested-by: Thomas Richard <thomas.richard at bootlin.com>
---
 target/imagebuilder/files/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 78ec7e2e94..0466fc7dcc 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -205,8 +205,13 @@ build_image: FORCE
 	@echo
 	@echo Building images...
 	rm -rf $(BUILD_DIR)/json_info_files/
-	$(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
-		$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
+	if [ -d "target/linux/feeds/$(BOARD)" ]; then \
+		$(NO_TRACE_MAKE) -C target/linux/feeds/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
+			$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \
+	else \
+		$(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
+			$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \
+	fi
 
 $(BIN_DIR)/profiles.json: FORCE
 	$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \




More information about the lede-commits mailing list