Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically redirect RISC-V users to riscv.eessi.io in init script + initial RISC-V support for archdetect #583

Merged
merged 5 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions init/arch_specs/eessi_arch_riscv.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Software path in EESSI | Vendor ID | List of defining CPU features
1 change: 1 addition & 0 deletions init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ cpupath(){
"x86_64") local spec_file="eessi_arch_x86.spec";;
"aarch64") local spec_file="eessi_arch_arm.spec";;
"ppc64le") local spec_file="eessi_arch_ppc.spec";;
"riscv64") local spec_file="eessi_arch_riscv.spec";;
*) log "ERROR" "cpupath: Unsupported CPU architecture $machine_type"
esac
# spec files are located in a subfolder with this script
Expand Down
16 changes: 14 additions & 2 deletions init/eessi_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@
# license: GPLv2
#

export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}"
# use different defaults for RISC-V, as we want to redirect to the riscv.eessi.io repo
if [[ $(uname -m) == "riscv64" ]]; then
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=20240402}"
if [[ ! -v EESSI_SILENT ]]; then
echo "RISC-V architecture detected, but there is no RISC-V support yet in the production repository."
echo "Automatically switching to version ${EESSI_VERSION} of the RISC-V development repository ${EESSI_CVMFS_REPO}."
echo "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/."
echo ""
fi
else
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}"
fi
# use archdetect by default, unless otherwise specified
export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}"
export EESSI_USE_ARCHSPEC="${EESSI_USE_ARCHSPEC:=0}"
2 changes: 1 addition & 1 deletion init/minimal_eessi_env
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
export EESSI_OS_TYPE='macos'
fi

# aarch64 (Arm 64-bit), ppc64le (POWER 64-bit), x86_64 (x86 64-bit)
# aarch64 (Arm 64-bit), riscv64 (RISC-V 64-bit), x86_64 (x86 64-bit)
export EESSI_CPU_FAMILY=$(uname -m)

# set $EPREFIX since that is basically a standard in Gentoo Prefix
Expand Down
2 changes: 1 addition & 1 deletion install_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ copy_files_by_list ${TOPDIR}/init ${INSTALL_PREFIX}/init "${init_files[@]}"

# Copy for the init/arch_specs directory
arch_specs_files=(
eessi_arch_arm.spec eessi_arch_ppc.spec eessi_arch_x86.spec
eessi_arch_arm.spec eessi_arch_ppc.spec eessi_arch_riscv.spec eessi_arch_x86.spec
)
copy_files_by_list ${TOPDIR}/init/arch_specs ${INSTALL_PREFIX}/init/arch_specs "${arch_specs_files[@]}"

Expand Down