From 5957e7125db25d01bcaf883f57bb2e2e30792c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Fri, 4 Sep 2026 16:50:18 -0300 Subject: [PATCH] feat(go-xcat): install xCAT on a riscv64 management node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit go-xcat stopped on riscv64 before it reached the package manager, so the installer xCAT documents could not set up the management node the riscv64 packages are built for. The architecture is now accepted alongside the others. Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-server/share/xcat/tools/go-xcat | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index a076797b9..f1c452c7c 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2461,13 +2461,45 @@ case "${GO_XCAT_OS}" in esac case "${GO_XCAT_ARCH}" in -"ppc64"|"ppc64le"|"x86_64") +"ppc64"|"ppc64le"|"riscv64"|"x86_64") ;; *) exit_if_bad 1 "${GO_XCAT_ARCH}: unsupported instruction set architecture" ;; esac +# A riscv64 management node has no legacy Genesis: its image ships as the OpenEmbedded package, +# which mknb installs. The legacy Genesis scripts and bases are therefore dropped and the +# OpenEmbedded package of the architecture is asked for instead. +# +# The x86 boot loaders stay: they are payload a management node SERVES to x86 nodes over TFTP, +# not host binaries, so a riscv64 management node needs them to boot a mixed cluster. +function riscv64_install_list() +{ + local genesis_package="xCAT-genesis-openembedded-riscv64" + type dpkg >/dev/null 2>&1 && genesis_package="xcat-genesis-openembedded-riscv64" + local package + for package in "$@"; do + case "${package}" in + *genesis-scripts-*|*genesis-base-*) + ;; + *) + printf '%s\n' "${package}" + ;; + esac + done + printf '%s\n' "${genesis_package}" +} + +if [ "${GO_XCAT_ARCH}" = "riscv64" ]; then + riscv64_list=() + while read -r package; do + riscv64_list+=("${package}") + done < <(riscv64_install_list "${GO_XCAT_INSTALL_LIST[@]}") + GO_XCAT_INSTALL_LIST=("${riscv64_list[@]}") + unset riscv64_list package +fi + GO_XCAT_LINUX_DISTRO="$(check_linux_distro)" GO_XCAT_LINUX_VERSION="$(check_linux_version)"