mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
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 <michael.tremer@ipfire.org>
This commit is contained in:
@@ -104,7 +104,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
|||||||
rm -rf $(IMG) $(MNThdd) && mkdir -p $(MNThdd)
|
rm -rf $(IMG) $(MNThdd) && mkdir -p $(MNThdd)
|
||||||
|
|
||||||
# Allocate image on disk
|
# 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)
|
losetup $(DEVICE) $(IMG)
|
||||||
|
|
||||||
# Write Partition table
|
# Write Partition table
|
||||||
|
|||||||
Reference in New Issue
Block a user