aboutsummaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-15 07:45:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-15 07:45:36 +0000
commit538ad2be3e2390fb324515d919245ad314835a31 (patch)
tree308333d58ab2d45d4b592e4a6ffd876b4f718911 /include/image.mk
parente5ae5cda1366b4ffe9ad6feeeb90f91017491be5 (diff)
downloadmaster-187ad058-538ad2be3e2390fb324515d919245ad314835a31.tar.gz
master-187ad058-538ad2be3e2390fb324515d919245ad314835a31.tar.bz2
master-187ad058-538ad2be3e2390fb324515d919245ad314835a31.zip
image.mk: add Build step pad-to
pad-to can be used in a pipe to pad the image to a specific chunk-size. Signed-off-by: Alexander Couzens <lynxis@fe80.eu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45980 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index 287c679cfd..814e7dc5d1 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -304,6 +304,11 @@ define Build/append-rootfs
dd if=$(word 2,$^) $(if $(1),bs=$(1) conv=sync) >> $@
endef
+define Build/pad-to
+ dd if=$@ of=$@.new bs=$(1) conv=sync
+ mv $@.new $@
+endef
+
define Build/pad-rootfs
$(call prepare_generic_squashfs,$@ $(1))
endef