Skip to content

Commit bb05e8f

Browse files
committed
Add support for riscv
This is initial support for being able to build against a riscv64 architecture target. xref: coreos/fedora-coreos-tracker#1931
1 parent adb3476 commit bb05e8f

File tree

4 files changed

+782
-2
lines changed

4 files changed

+782
-2
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ set -x
3030
srcdir=$(pwd)
3131

3232
configure_yum_repos() {
33+
[ "${arch}" == "riscv64" ] && return # No continuous repo for riscv64 yet
3334
local version_id
3435
version_id=$(. /etc/os-release && echo ${VERSION_ID})
3536
# Add continuous tag for latest build tools and mark as required so we
@@ -102,6 +103,7 @@ install_rpms() {
102103
# and it is very useful to have in the same place/flow as where we do builds/tests related
103104
# to CoreOS.
104105
install_ocp_tools() {
106+
[ "${arch}" == "riscv64" ] && return # No ocp tools for riscv64
105107
# If $OCP_VERSION is defined we'll grab that specific version.
106108
# Otherwise we'll get the latest.
107109
local url="https://mirror.openshift.com/pub/openshift-v4/${arch}/clients/ocp/latest${OCP_VERSION:+-$OCP_VERSION}/openshift-client-linux.tar.gz"

mantle/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [[ $# -eq 0 ]]; then
1010
set -- cmd/* schema
1111
fi
1212

13-
declare -A BASEARCH_TO_GOARCH=([s390x]=s390x [x86_64]=amd64 [aarch64]=arm64 [ppc64le]=ppc64le)
13+
declare -A BASEARCH_TO_GOARCH=([x86_64]=amd64 [aarch64]=arm64 [ppc64le]=ppc64le [riscv64]=riscv64 [s390x]=s390x)
1414
ARCH=$(arch)
1515
KOLET_ARCHES="${KOLET_ARCHES:-${ARCH}}"
1616

src/cmd-osbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ main() {
337337
fi
338338

339339
case "$basearch" in
340-
"x86_64"|"aarch64"|"s390x"|"ppc64le") ;;
340+
"x86_64"|"aarch64"|"s390x"|"ppc64le"|"riscv64") ;;
341341
*) fatal "$basearch is not supported for this command" ;;
342342
esac
343343

0 commit comments

Comments
 (0)