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-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32f25b4422ef584c3a36ad3f7d89b7dc292b8a92;p=people%2Fms%2Fipfire-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 fceff9e53..d3d550c6b 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