Changed rootfs cache compression method from multithreaded tar.gz to multithreaded lbzip2 which breaks compression / decompression time in half on my build machine.
This commit is contained in:
parent
3f133d8dba
commit
d2ccfe5bfd
@ -114,12 +114,12 @@ debootstrap_ng()
|
||||
create_rootfs_cache()
|
||||
{
|
||||
local packages_hash=$(get_package_list_hash)
|
||||
local cache_fname=$CACHEDIR/rootfs/${RELEASE}-ng-$ARCH.$packages_hash.tgz
|
||||
local display_name=${RELEASE}-ng-$ARCH.${packages_hash:0:3}...${packages_hash:29}.tgz
|
||||
local cache_fname=$CACHEDIR/rootfs/${RELEASE}-ng-$ARCH.$packages_hash.tar.bz2
|
||||
local display_name=${RELEASE}-ng-$ARCH.${packages_hash:0:3}...${packages_hash:29}.tar.bz2
|
||||
if [[ -f $cache_fname ]]; then
|
||||
local date_diff=$(( ($(date +%s) - $(stat -c %Y $cache_fname)) / 86400 ))
|
||||
display_alert "Extracting $display_name" "$date_diff days old" "info"
|
||||
pv -p -b -r -c -N "$display_name" "$cache_fname" | pigz -dc | tar xp --xattrs -C $CACHEDIR/$SDCARD/
|
||||
pv -p -b -r -c -N "$display_name" "$cache_fname" | lbzip2 -dc | tar xp --xattrs -C $CACHEDIR/$SDCARD/
|
||||
else
|
||||
display_alert "Creating new rootfs for" "$RELEASE" "info"
|
||||
|
||||
@ -241,7 +241,7 @@ create_rootfs_cache()
|
||||
umount_chroot "$CACHEDIR/$SDCARD"
|
||||
|
||||
tar cp --xattrs --directory=$CACHEDIR/$SDCARD/ --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \
|
||||
--exclude='./sys/*' . | pv -p -b -r -s $(du -sb $CACHEDIR/$SDCARD/ | cut -f1) -N "$display_name" | pigz --fast > $cache_fname
|
||||
--exclude='./sys/*' . | pv -p -b -r -s $(du -sb $CACHEDIR/$SDCARD/ | cut -f1) -N "$display_name" | lbzip2 -c > $cache_fname
|
||||
fi
|
||||
mount_chroot "$CACHEDIR/$SDCARD"
|
||||
} #############################################################################
|
||||
|
||||
@ -474,7 +474,7 @@ prepare_host()
|
||||
gawk gcc-arm-linux-gnueabihf gcc-arm-linux-gnueabi qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libusb-1.0-0-dev ntpdate \
|
||||
parted pkg-config libncurses5-dev whiptail debian-keyring debian-archive-keyring f2fs-tools libfile-fcntllock-perl rsync libssl-dev \
|
||||
nfs-kernel-server btrfs-tools gcc-aarch64-linux-gnu ncurses-term p7zip-full dos2unix dosfstools libc6-dev-armhf-cross libc6-dev-armel-cross \
|
||||
libc6-dev-arm64-cross curl gcc-arm-none-eabi libnewlib-arm-none-eabi patchutils python"
|
||||
libc6-dev-arm64-cross curl gcc-arm-none-eabi libnewlib-arm-none-eabi patchutils python lbzip2"
|
||||
|
||||
local codename=$(lsb_release -sc)
|
||||
display_alert "Build host OS release" "${codename:-(unknown)}" "info"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user