Browse Source

Switch from gzip to lzma compression.

This signficantly increases time to generate Artifacts,
but also significantly reduces the Artifact sizes.

Example (gzip, lzma) on 2019-04-08 Raspbian conversion:
* Size: 354M -> 224M (-37%)
* Compression time: 1min -> 10min (10x)

Changelog: Use LZMA for smaller Artifact size (but slower generation).

Signed-off-by: Eystein Måløy Stenberg <eystein.maloy.stenberg@northern.tech>
1.2.x
Eystein Måløy Stenberg 6 years ago
parent
commit
430d083e4b
  1. 4
      device-image-shell/docker-entrypoint.sh
  2. 5
      mender-convert

4
device-image-shell/docker-entrypoint.sh

@ -33,6 +33,6 @@ fi
umount /root_system
echo "Creating Mender Artifact. This may take a few minutes..."
mender-artifact write rootfs-image -t $DEVICE_TYPE -n $ARTIFACT_NAME -f /root_images/$ROOTFS_OUTPUT_FILE_NAME -o /root_images/$ARTIFACT_NAME.mender
echo "Creating Mender Artifact. This may take 10-20 minutes (using LZMA)..."
mender-artifact --compression lzma write rootfs-image -t $DEVICE_TYPE -n $ARTIFACT_NAME -f /root_images/$ROOTFS_OUTPUT_FILE_NAME -o /root_images/$ARTIFACT_NAME.mender
sync

5
mender-convert

@ -615,9 +615,12 @@ do_mender_disk_image_to_artifact() {
rm -rf ${output_dir}/mnt
log "\tWriting Mender artifact to: ${mender_artifact}"
log "\tThis may take 10-20 minutes (using LZMA)..."
#Create Mender artifact
mender-artifact write rootfs-image \
mender-artifact \
--compression lzma \
write rootfs-image \
--file ${mender_rootfs_image} \
--output-path ${mender_artifact} \
--artifact-name ${artifact_name} \

Loading…
Cancel
Save