diff --git a/.ci/lib.sh b/.ci/lib.sh index d8a1b2d880..1802c19536 100644 --- a/.ci/lib.sh +++ b/.ci/lib.sh @@ -30,7 +30,7 @@ install_yq() { local yq_pkg="github.com/mikefarah/yq" [ -x "${yq_path}" ] && return - case "$(arch)" in + case "$(uname -m)" in "aarch64") goarch=arm64 ;; @@ -48,7 +48,7 @@ install_yq() { ;; "*") - echo "Arch $(arch) not supported" + echo "Arch $(uname -m) not supported" exit ;; esac diff --git a/ccloudvm/kata-docker-xenial.yaml b/ccloudvm/kata-docker-xenial.yaml index 5ad2b81d62..c7326e3687 100644 --- a/ccloudvm/kata-docker-xenial.yaml +++ b/ccloudvm/kata-docker-xenial.yaml @@ -30,7 +30,7 @@ write_files: runcmd: - {{beginTask . "Install kata"}} - - ARCH=$(arch) + - ARCH=$(uname -m) - sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/xUbuntu_$(lsb_release -rs)/ /' > /etc/apt/sources.list.d/kata-containers.list" - {{proxyVars .}} curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - - sudo -E apt-get update diff --git a/kernel/build-kernel.sh b/kernel/build-kernel.sh index 4284e4f639..ab986a05db 100755 --- a/kernel/build-kernel.sh +++ b/kernel/build-kernel.sh @@ -206,7 +206,7 @@ build_kernel() { local kernel_path=${1:-} [ -n "${kernel_path}" ] || die "kernel_path not provided" [ -d "${kernel_path}" ] || die "path to kernel does not exist, use ${script_name} setup" - [ -n "${arch_target}" ] || arch_target="$(arch)" + [ -n "${arch_target}" ] || arch_target="$(uname -m)" arch_target=$(arch_to_kernel "${arch_target}") pushd "${kernel_path}" >>/dev/null make -j $(nproc) ARCH="${arch_target}" diff --git a/kernel/kata_config_version b/kernel/kata_config_version index bb95160cb6..a787364590 100644 --- a/kernel/kata_config_version +++ b/kernel/kata_config_version @@ -1 +1 @@ -33 +34 diff --git a/release/kata-deploy-binaries.sh b/release/kata-deploy-binaries.sh index 2817d0335d..374d72e601 100755 --- a/release/kata-deploy-binaries.sh +++ b/release/kata-deploy-binaries.sh @@ -176,7 +176,7 @@ main() { [ -n "${kata_version}" ] || usage 1 info "Requested version: ${kata_version}" - destdir="${workdir}/kata-static-${kata_version}-$(arch)" + destdir="${workdir}/kata-static-${kata_version}-$(uname -m)" info "DESTDIR ${destdir}" mkdir -p "${destdir}" install_image diff --git a/scripts/configure-hypervisor.sh b/scripts/configure-hypervisor.sh index 8af399243e..d5acc2f17f 100755 --- a/scripts/configure-hypervisor.sh +++ b/scripts/configure-hypervisor.sh @@ -16,7 +16,7 @@ script_name=${0##*/} -arch=$(arch) +arch=$(uname -m) # Array of configure options. # diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7fabdea950..3fc93164ed 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -50,12 +50,12 @@ parts: make \ PREFIX=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr \ SKIP_GO_VERSION_CHECK=1 \ - QEMUCMD=qemu-system-$(arch) + QEMUCMD=qemu-system-$(uname -m) make install \ PREFIX=/usr \ DESTDIR=${SNAPCRAFT_PART_INSTALL} \ SKIP_GO_VERSION_CHECK=1 \ - QEMUCMD=qemu-system-$(arch) + QEMUCMD=qemu-system-$(uname -m) # A snap is read-only squashfs, unfourtunately it's not possible to use the rootfs image with DAX # since rw access is required therefore initrd image must be used instead. @@ -193,7 +193,7 @@ parts: versions_url=https://raw.githubusercontent.com/kata-containers/runtime/${SNAPCRAFT_PROJECT_VERSION}/versions.yaml version="$(curl -sSL ${versions_url} | yq r - assets.kernel.version | tr -d v)" x_version="$(echo $version | sed -e 's|.[[:digit:]]*$||').x" - case "$(arch)" in + case "$(uname -m)" in "x86_64") config="x86_64_kata_kvm_${x_version}" ;; @@ -211,7 +211,7 @@ parts: ;; *) - echo "ERROR: Unsupported architecture $(arch)" + echo "ERROR: Unsupported architecture $(uname -m)" exit 1 ;; esac @@ -279,7 +279,7 @@ parts: versions_url=https://raw.githubusercontent.com/kata-containers/runtime/${SNAPCRAFT_PROJECT_VERSION}/versions.yaml # arch-specific definition - case "$(arch)" in + case "$(uname -m)" in "aarch64") branch="$(curl -sSL ${versions_url} | yq r - assets.hypervisor.qemu.architecture.aarch64.branch)" url="$(curl -sSL ${versions_url} | yq r - assets.hypervisor.qemu.url)"