ar71xx: build relocate stub for generic and legacy images
authorStijn Tintel <stijn@linux-ipv6.be>
Fri, 21 Oct 2016 14:50:39 +0000 (17:50 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 26 Oct 2016 22:50:42 +0000 (01:50 +0300)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
target/linux/ar71xx/image/Makefile
target/linux/ar71xx/image/legacy.mk

index 56e07d82f3338d2fe2b05a495a2297818372b80e..26e955840a11c12860b9162d30b94f19f4a07a9e 100644 (file)
@@ -79,8 +79,11 @@ define Build/loader-okli
 endef
 
 define Build/relocate-kernel
+       rm -rf $(KDIR)/relocate
+       $(CP) ../../generic/image/relocate $(KDIR)
+       $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
        ( \
-               dd if=$(KDIR)/relocate.bin bs=32 conv=sync && \
+               dd if=$(KDIR)/relocate/loader.bin bs=32 conv=sync && \
                perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
                cat "$@" \
        ) > "$@.new"
index ec28fcbe776803b74c4b15affc2d631c1511b67d..08305da3ea50e5813b8057d432dcfe6d57f48509 100644 (file)
@@ -1097,12 +1097,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
        $(call Image/BuildLoader,generic,elf,,,-initramfs)
 endif
        $(call Image/BuildLoader,generic,elf)
-
-       # Note: not only used for legacy images
-       rm -rf $(KDIR)/relocate
-       $(CP) ../../generic/image/relocate $(KDIR)
-       $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
-       $(CP) $(KDIR)/relocate/loader.bin $(KDIR)/relocate.bin
 endef
 
 define Image/Prepare/Profile