Browse Source

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 <[email protected]>

SVN-Revision: 45980
Felix Fietkau 10 năm trước cách đây
mục cha
commit
61a0b05dbf
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      include/image.mk

+ 5 - 0
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=$@ [email protected] bs=$(1) conv=sync
+	mv [email protected] $@
+endef
+
 define Build/pad-rootfs
 	$(call prepare_generic_squashfs,$@ $(1))
 endef