Skip to content

Commit

Permalink
Use xz compression for squashfs
Browse files Browse the repository at this point in the history
Changing compression from default (gzip) to xz will reduce rootfs size
from 247.90 Mbytes down to 208.57 Mbytes. The squashfs compression time
increases by about 3 times (from 11 seconds to 33 on my PC), however
this is a one-time image build operation.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
  • Loading branch information
giggsoff committed Jun 29, 2022
1 parent b2471c5 commit 9e5b826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mkrootfs-squash/make-rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IMGFILE=/rootfs.img
ROOTFS_PART_SIZE_KB=$(( ( ($ROOTFS_PART_SIZE + 1024) / 1024 * 1024) / 1024 ))
ROOTFS_PART_SECTORS=$(( $ROOTFS_PART_SIZE_KB * 2 ))

mksquashfs /tmp/rootfs/ $IMGFILE -noappend
mksquashfs /tmp/rootfs/ $IMGFILE -noappend -comp xz -no-recovery
)

$EXPORT_CMD

0 comments on commit 9e5b826

Please sign in to comment.