diff options
author | Ming Liu <liu.ming50@gmail.com> | 2024-10-27 11:43:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-28 11:58:22 +0000 |
commit | d296b21d56e22da7fa1115247718af0e2c80c98d (patch) | |
tree | 1bb4560719ab2b4e232a2fed4e34a2955031fb3a /meta/files | |
parent | afc74c1e17d7c4cf99283c130d14f0e73368c792 (diff) | |
download | poky-d296b21d56e22da7fa1115247718af0e2c80c98d.tar.gz |
meta: support tar.zst SDK_ARCHIVE_TYPE
zst is much faster than the default xz, test result on my Precision
5680 machine:
Installing a tar.xz SDK takes 37 seconds while tar.zst only takes 17
seconds.
Let's introduce support for tar.zst.
Also add a sanity check for supported archive types.
(From OE-Core rev: 1d22562a89e91f19b818b8f9bc214be941303980)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 8368a81196..a5c5d0444e 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh | |||
@@ -255,6 +255,12 @@ if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then | |||
255 | else | 255 | else |
256 | rm sdk.zip && exit 1 | 256 | rm sdk.zip && exit 1 |
257 | fi | 257 | fi |
258 | elif [ @SDK_ARCHIVE_TYPE@ = "tar.zst" ]; then | ||
259 | if [ -z "$(command -v zstd)" ]; then | ||
260 | echo "Aborted, zstd is required to extract the SDK archive, please make sure it's installed on your system!" | ||
261 | exit 1 | ||
262 | fi | ||
263 | tail -n +$payload_offset "$0"| zstd -T0 -dc | $SUDO_EXEC tar mx -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 | ||
258 | else | 264 | else |
259 | if [ -z "$(command -v xz)" ]; then | 265 | if [ -z "$(command -v xz)" ]; then |
260 | echo "Aborted, xz is required to extract the SDK archive, please make sure it's installed on your system!" | 266 | echo "Aborted, xz is required to extract the SDK archive, please make sure it's installed on your system!" |