[OpenWrt-Devel] [PATCH 2/5] image.mk: add Build step pad-to

Alexander Couzens lynxis at fe80.eu
Sun Jun 7 08:27:15 EDT 2015


pad-to can be used in a pipe to pad the image to a specific chunk-size.
Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 include/image.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/image.mk b/include/image.mk
index 287c679..814e7dc 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
-- 
2.4.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list