[source] ar71xx: build relocate stub for generic and legacy images

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 27 00:18:42 PDT 2016


stintel pushed a commit to source.git, branch master:
https://git.lede-project.org/6b0d279ca58bf6173b57c7e9b759be4552eab74a

commit 6b0d279ca58bf6173b57c7e9b759be4552eab74a
Author: Stijn Tintel <stijn at linux-ipv6.be>
AuthorDate: Fri Oct 21 17:50:39 2016 +0300

    ar71xx: build relocate stub for generic and legacy images
    
    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
    Acked-by: John Crispin <john at phrozen.org>
---
 target/linux/ar71xx/image/Makefile  | 5 ++++-
 target/linux/ar71xx/image/legacy.mk | 6 ------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 56e07d8..26e9558 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -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"
diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk
index ec28fcb..08305da 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -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



More information about the lede-commits mailing list