summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-08 18:24:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:29 +0000
commite1a558a434957fc233eec6349ceb53b4e09bb18c (patch)
treee07e6ec5b3cbb4f6c2b20edd2f943fe854dc0d24
parent3341f3fbee818a0bd62620b8bc34230b03c0689c (diff)
downloadpoky-e1a558a434957fc233eec6349ceb53b4e09bb18c.tar.gz
populate_sdk: Switch from bzip2 to xz
xz gives *much* faster decompression times for the SDK which in itself is a good reason to use it. It also gives better compression. One downside is its slower but we care about the end user case first, build performance secondary. It also assumes the SDK user has a tar capable of understanding a xz compressed file but that should be common enough now. (From OE-Core rev: 193086137b899a0a4e774ffc337ed0da9947fd4f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/populate_sdk_base.bbclass8
-rw-r--r--meta/files/toolchain-shar-extract.sh2
2 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 23dc1156bd..7ca1df67a2 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -40,7 +40,7 @@ TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
40TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" 40TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
41 41
42SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}" 42SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
43SDK_DEPENDS = "virtual/fakeroot-native pbzip2-native" 43SDK_DEPENDS = "virtual/fakeroot-native xz-native"
44 44
45# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it 45# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
46# could be set to the MACHINE_ARCH 46# could be set to the MACHINE_ARCH
@@ -177,7 +177,7 @@ fakeroot tar_sdk() {
177 # Package it up 177 # Package it up
178 mkdir -p ${SDK_DEPLOY} 178 mkdir -p ${SDK_DEPLOY}
179 cd ${SDK_OUTPUT}/${SDKPATH} 179 cd ${SDK_OUTPUT}/${SDKPATH}
180 tar ${SDKTAROPTS} -cf - . | pbzip2 > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 180 tar ${SDKTAROPTS} -cf - . | xz > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
181} 181}
182 182
183fakeroot create_shar() { 183fakeroot create_shar() {
@@ -216,10 +216,10 @@ EOF
216 chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh 216 chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
217 217
218 # append the SDK tarball 218 # append the SDK tarball
219 cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh 219 cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
220 220
221 # delete the old tarball, we don't need it anymore 221 # delete the old tarball, we don't need it anymore
222 rm ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 222 rm ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
223} 223}
224 224
225populate_sdk_log_check() { 225populate_sdk_log_check() {
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index de8c66934e..b1ef4b7668 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -168,7 +168,7 @@ fi
168payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) 168payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
169 169
170printf "Extracting SDK..." 170printf "Extracting SDK..."
171tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir --checkpoint=.2500 171tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500
172echo "done" 172echo "done"
173 173
174printf "Setting it up..." 174printf "Setting it up..."