mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 20:32:54 +00:00
Currently, musl toolchain installation on arm64 is just downloading from a website. It's unsafe in case the website corrupts. So build musl toolchain from source if it can't be downloaded. Fixes: #1481 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
25 lines
476 B
Bash
Executable File
25 lines
476 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) 2020 Ant Group
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set -e
|
|
|
|
install_aarch64_musl() {
|
|
local arch=$(uname -m)
|
|
if [ "${arch}" == "aarch64" ]; then
|
|
local musl_tar="${arch}-linux-musl-native.tgz"
|
|
local musl_dir="${arch}-linux-musl-native"
|
|
pushd /tmp
|
|
if curl -sLO --fail https://musl.cc/${musl_tar}; then
|
|
tar -zxf ${musl_tar}
|
|
mkdir -p /usr/local/musl/
|
|
cp -r ${musl_dir}/* /usr/local/musl/
|
|
fi
|
|
popd
|
|
fi
|
|
}
|
|
|
|
install_aarch64_musl
|