imagebuilder: check if BOARD is located in the feeds sub directory
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 25 Jan 2024 09:25:06 +0000 (10:25 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 29 Mar 2024 19:00:27 +0000 (20:00 +0100)
Fixes the regression so that targets that were installed via a feed can
also be build again with the Image Builder.

Fixes: 84ec8c4 ("imagebuilder: copy from buildroot only target/linux")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
target/imagebuilder/Makefile

index c3b6c9c10c586f1d560421e30d5e4288c1d670ea..799ac3be550c2e85215d71e6150c38cfe66e5eb3 100644 (file)
@@ -80,7 +80,13 @@ 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
+       # check if board is installed from a feeds subdirectory
+       if [ -d $(TOPDIR)/target/linux/feeds/$(BOARD) ]; then \
+               mkdir -p $(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