From 32f25b4422ef584c3a36ad3f7d89b7dc292b8a92 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 9 Jul 2024 19:24:14 +0000 Subject: [PATCH] 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 --- lfs/flash-images | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5