aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/Makefile
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-10-11 20:32:25 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-10-11 20:39:16 +0200
commit0d1fb7224196d1e4c829687550b343546829d760 (patch)
treeb9bf71d0d66d230778a6ff14214b78fb39a4fdb6 /target/linux/ar71xx/image/Makefile
parentfce0b5d8938ae900057766679139e6eb8b0f8c54 (diff)
downloadupstream-0d1fb7224196d1e4c829687550b343546829d760.tar.gz
upstream-0d1fb7224196d1e4c829687550b343546829d760.tar.bz2
upstream-0d1fb7224196d1e4c829687550b343546829d760.zip
ar71xx: add relocation loader
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r--target/linux/ar71xx/image/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index bce5cd3774..56e07d82f3 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -78,6 +78,15 @@ define Build/loader-okli
mv "$@.new" "$@"
endef
+define Build/relocate-kernel
+ ( \
+ dd if=$(KDIR)/relocate.bin bs=32 conv=sync && \
+ perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
+ cat "$@" \
+ ) > "$@.new"
+ mv "$@.new" "$@"
+endef
+
define Build/copy-file
cat "$(1)" > "$@"
endef