aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-06-06 00:34:25 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-06-06 22:25:53 +0200
commit108a6f6792bc50fa5b1627c207ae71ba555b55f8 (patch)
treee9063cc4d163a02b85edf5cce47d770ff88675ec /target/linux
parent9968dcedb420c19b7639e7f626f1d47f70734d9b (diff)
downloadupstream-108a6f6792bc50fa5b1627c207ae71ba555b55f8.tar.gz
upstream-108a6f6792bc50fa5b1627c207ae71ba555b55f8.tar.bz2
upstream-108a6f6792bc50fa5b1627c207ae71ba555b55f8.zip
ar71xx: make loader-okli build step more generic
Add support for different loader types. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/image/common-tp-link.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ar71xx/image/common-tp-link.mk b/target/linux/ar71xx/image/common-tp-link.mk
index c448c97209..b50dae9f4f 100644
--- a/target/linux/ar71xx/image/common-tp-link.mk
+++ b/target/linux/ar71xx/image/common-tp-link.mk
@@ -4,8 +4,9 @@ define Build/copy-file
cat "$(1)" > "$@"
endef
+# Arguments: <output name> <kernel offset>
define Build/loader-okli
- dd if=$(KDIR)/loader-$(1).gz bs=7680 conv=sync of="$@.new"
+ dd if=$(KDIR)/loader-$(word 1,$(1)).$(LOADER_TYPE) bs=$(word 2,$(1)) conv=sync of="$@.new"
cat "$@" >> "$@.new"
mv "$@.new" "$@"
endef
@@ -60,7 +61,7 @@ define Device/tplink-nolzma
LOADER_FLASH_OFFS := 0x22000
COMPILE := loader-$(1).gz
COMPILE/loader-$(1).gz := loader-okli-compile
- KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
+ KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 7680
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
endef