image: remove padding parameter from append-kernel/append-rootfs
[openwrt/staging/rmilecki.git] / include / image-commands.mk
index 6cb5bff4ab79008b5f5a7f547ea2fd0246fc7d45..6386e55b7958b36945385e84a519f0cb1a59c764 100644 (file)
@@ -103,11 +103,11 @@ define Build/patch-cmdline
 endef
 
 define Build/append-kernel
-       dd if=$(IMAGE_KERNEL) $(if $(1),bs=$(1) conv=sync) >> $@
+       dd if=$(IMAGE_KERNEL) >> $@
 endef
 
 define Build/append-rootfs
-       dd if=$(IMAGE_ROOTFS) $(if $(1),bs=$(1) conv=sync) >> $@
+       dd if=$(IMAGE_ROOTFS) >> $@
 endef
 
 define Build/append-ubi
@@ -130,8 +130,13 @@ define Build/pad-to
        mv $@.new $@
 endef
 
+define Build/pad-extra
+       dd if=/dev/zero bs=$(1) count=1 >> $@
+endef
+
 define Build/pad-rootfs
-       $(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) 4 8 16 64 128 256
+       $(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
+               $(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
 endef
 
 define Build/pad-offset