mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-09 22:46:43 +00:00
feat(go-xcat): install xCAT on a riscv64 management node
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>
This commit is contained in:
@@ -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)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user