Compress release images with xz for smaller image files.

Raspberrypy imager has support for it. Linux CLI users no how to deal with it.
This commit is contained in:
j1nx 2021-01-30 09:18:23 +01:00
parent b07b1c55f8
commit 41fc58ccfa
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,8 @@ $(TARGETS): %: $(RELEASE_DIR) %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) 2>&1 | tee logs/buildroot_$@_output.txt
cp -f $(BUILDROOT)/output/images/sdcard.img $(RELEASE_DIR)/OpenVoiceOS_$@.img
rm $(RELEASE_DIR)/OpenVoiceOS_$@.img.xz
xz -3 -T0 $(RELEASE_DIR)/OpenVoiceOS_$@.img
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)