aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/image-commands.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 0f292d15ee3..7d9f93fed74 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -389,10 +389,17 @@ define Build/kernel-bin
endef
define Build/linksys-image
- $(TOPDIR)/scripts/linksys-image.sh \
+ let \
+ size="$$(stat -c%s $@)" \
+ pad="$(call exp_units,$(PAGESIZE))" \
+ offset="256" \
+ pad="(pad - ((size + offset) % pad)) % pad"; \
+ dd if=/dev/zero bs=$$pad count=1 | tr '\000' '\377' >> $@
+ printf ".LINKSYS.01000409%-15s%08X%-8s%-16s" \
"$(call param_get_default,type,$(1),$(DEVICE_NAME))" \
- $@ $@.new
- mv $@.new $@
+ "$$(cksum $@ | cut -d ' ' -f1)" \
+ "0" "K0000000F0246434" >> $@
+ dd if=/dev/zero bs=192 count=1 >> $@
endef
define Build/lzma