[openwrt/openwrt] imagebuilder: fix broken image generation with external targets

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 5 13:08:55 PDT 2022


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/3008f1f441a41e162311cee1ccadfdaaec1581c1

commit 3008f1f441a41e162311cee1ccadfdaaec1581c1
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Thu Mar 24 06:52:37 2022 +0100

    imagebuilder: fix broken image generation with external targets
    
    When using external targets there is a symlink being created for the
    target under target/linux which then becomes dangling under Image
    Builder. Fix it by dereferencing the possible symlink.
    
    Tested on IB with external target, ipq40xx and mvebu.
    
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
    (cherry picked from commit 621f39d1f438bf95dbae667c575926fa16a6d797)
    (cherry picked from commit ec9af870f3278f75549836b469baefa260e2ed41)
---
 target/imagebuilder/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 8607a2d709..3bbadc7204 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -78,7 +78,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
 	$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
 endif
 
-	$(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
+	$(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
 	if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
 		$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
 	fi




More information about the lede-commits mailing list