dey-image-qt: compress .ext4 images by default
Since these images are highly compressable, this greatly reduces the amount of space taken up by build artifacts. Modify the code used to generate the .sdcard and .installer.zip files so that they contain the decompressed .ext4 image. https://onedigi.atlassian.net/browse/DEL-7582 Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
0c9a497de9
commit
bbdf745661
|
|
@ -291,11 +291,17 @@ IMAGE_CMD_sdcard() {
|
|||
SDIMG_BOOT="$(readlink -e ${SDIMG_BOOTLOADER})"
|
||||
fi
|
||||
|
||||
# Decompress rootfs image
|
||||
gzip -d -k ${SDIMG_ROOTFS}.gz
|
||||
|
||||
# Burn bootloader, boot and rootfs partitions
|
||||
dd if=${SDIMG_BOOT} of=${SDIMG} conv=notrunc,fsync seek=${BOOTLOADER_SEEK} bs=1K
|
||||
dd if=${SDIMG_BOOTFS} of=${SDIMG} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
|
||||
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc,fsync seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024 + ${BOOT_SPACE_ALIGNED} \* 1024)
|
||||
|
||||
# Delete the decompressed rootfs image
|
||||
rm -f ${SDIMG_ROOTFS}
|
||||
}
|
||||
|
||||
# The sdcard image requires the boot and rootfs images to be built before
|
||||
IMAGE_TYPEDEP_sdcard = "${SDIMG_BOOTFS_TYPE} ${SDIMG_ROOTFS_TYPE}"
|
||||
IMAGE_TYPEDEP_sdcard = "${SDIMG_BOOTFS_TYPE} ${SDIMG_ROOTFS_TYPE}.gz"
|
||||
|
|
|
|||
|
|
@ -47,4 +47,4 @@ XBEE_TTY ?= "ttymxc4"
|
|||
BOOT_SCRIPTS = "boot.scr:boot.scr"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -47,4 +47,4 @@ XBEE_TTY ?= "ttymxc4"
|
|||
BOOT_SCRIPTS = "boot.scr:boot.scr"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -44,4 +44,4 @@ XBEE_TTY ?= "ttymxc3"
|
|||
BOOT_SCRIPTS = "boot.scr:boot.scr"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ XBEE_TTY ?= "ttymxc3"
|
|||
BOOT_SCRIPTS = "boot.scr:boot.scr"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ XBEE_TTY ?= "ttyLP0"
|
|||
BOOT_SCRIPTS = "boot.scr:boot.scr"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ BOOT_SCRIPTS = "boot.scr:boot.scr"
|
|||
UBOOT_HAS_FASTBOOT = "true"
|
||||
|
||||
# Flash image types
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4 sdcard tar.bz2 recovery.vfat"
|
||||
IMAGE_FSTYPES ?= "boot.vfat ext4.gz sdcard tar.bz2 recovery.vfat"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ generate_installer_zip () {
|
|||
if readlink -e "${DEPLOY_DIR_IMAGE}/install_linux_fw_uuu.sh"; then
|
||||
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/install_linux_fw_uuu.sh"
|
||||
fi
|
||||
# Decompress the ext4.gz image, if any
|
||||
if readlink -e "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4.gz" >/dev/null; then
|
||||
gzip -d -k -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4.gz
|
||||
fi
|
||||
for ext in ${FSTYPES_WHITELIST}; do
|
||||
if readlink -e "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}" >/dev/null; then
|
||||
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}"
|
||||
|
|
@ -50,6 +54,11 @@ _EOF_
|
|||
zip -j ${IMGDEPLOYDIR}/${IMAGE_NAME}.installer.zip ${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/README.txt
|
||||
rm -f ${IMGDEPLOYDIR}/README.txt
|
||||
|
||||
# Delete the decompressed ext4 image, if any
|
||||
if readlink -e "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4" >/dev/null; then
|
||||
rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4
|
||||
fi
|
||||
|
||||
# Create the symlink
|
||||
if [ -n "${IMAGE_LINK_NAME}" ] && [ -e "${IMGDEPLOYDIR}/${IMAGE_NAME}.installer.zip" ]; then
|
||||
ln -sf ${IMAGE_NAME}.installer.zip ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.installer.zip
|
||||
|
|
|
|||
Loading…
Reference in New Issue