From: Michael Tremer Date: Tue, 9 Jul 2024 19:24:14 +0000 (+0000) Subject: flash-images: Create the base image as a sparse file X-Git-Tag: v2.29-core188~10^2~284 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61cb600a13aa318f4aed86e39e1bc2a9f24aee4b;p=ipfire-2.x.git flash-images: Create the base image as a sparse file This will be much faster as it creates less IO. Signed-off-by: Michael Tremer --- diff --git a/lfs/flash-images b/lfs/flash-images index fceff9e53c..d3d550c6b6 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -104,7 +104,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) rm -rf $(IMG) $(MNThdd) && mkdir -p $(MNThdd) # Allocate image on disk - dd if=/dev/zero of=$(IMG) bs=512 count=$$(( $(S_OFFSET) + $(S_BOOT) + $(S_EFI) + $(S_ROOT) )) + dd if=/dev/zero of=$(IMG) bs=512 count=0 seek=$$(( $(S_OFFSET) + $(S_BOOT) + $(S_EFI) + $(S_ROOT) )) losetup $(DEVICE) $(IMG) # Write Partition table