ar71xx: build relocate stub for generic and legacy images
[openwrt/openwrt.git] / target / linux / ar71xx / image / Makefile
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"