Compare commits
6 Commits
9a9161fc55
...
a9c1cb26ea
| Author | SHA1 | Date | |
|---|---|---|---|
| a9c1cb26ea | |||
| 4ab38212b3 | |||
| df8b5b2d67 | |||
| c5400955c7 | |||
| 165a60b0d2 | |||
| bd4dabf03a |
@ -8,13 +8,6 @@ in
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Connect to intranet git hosts via proxy
|
||||
programs.ssh.extraConfig = ''
|
||||
Host bscpm02.bsc.es bscpm03.bsc.es gitlab-internal.bsc.es alya.gitlab.bsc.es
|
||||
User git
|
||||
ProxyCommand nc -X connect -x hut:23080 %h %p
|
||||
'';
|
||||
|
||||
programs.ssh.knownHosts = hostsKeys // {
|
||||
"gitlab-internal.bsc.es".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF9arsAOSRB06hdy71oTvJHG2Mg8zfebADxpvc37lZo3";
|
||||
"bscpm03.bsc.es".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM2NuSUPsEhqz1j5b4Gqd+MWFnRqyqY57+xMvBUqHYUS";
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
rarias = {
|
||||
uid = 1880;
|
||||
isNormalUser = true;
|
||||
linger = true;
|
||||
home = "/home/Computational/rarias";
|
||||
description = "Rodrigo Arias";
|
||||
group = "Computational";
|
||||
|
||||
@ -2,8 +2,9 @@
|
||||
# Provides the base system for a xeon node.
|
||||
imports = [
|
||||
./base.nix
|
||||
./xeon/fs.nix
|
||||
./xeon/console.nix
|
||||
./xeon/fs.nix
|
||||
./xeon/net.nix
|
||||
./xeon/ssh.nix
|
||||
];
|
||||
}
|
||||
|
||||
8
m/common/xeon/ssh.nix
Normal file
8
m/common/xeon/ssh.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
# Connect to intranet git hosts via proxy
|
||||
programs.ssh.extraConfig = ''
|
||||
Host bscpm02.bsc.es bscpm03.bsc.es gitlab-internal.bsc.es alya.gitlab.bsc.es
|
||||
User git
|
||||
ProxyCommand nc -X connect -x hut:23080 %h %p
|
||||
'';
|
||||
}
|
||||
@ -32,6 +32,20 @@
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
services.openssh.settings.X11Forwarding = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
xilinx-xrt = prev.callPackage ./xilinx-xrt.nix { };
|
||||
xilinx-xocl = prev.callPackage ./xilinx-xocl.nix {
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
boot.extraModulePackages = [ pkgs.xilinx-xocl ];
|
||||
boot.kernelModules = [ "xclmgmt" "xocl" ];
|
||||
|
||||
users.motd = ''
|
||||
⠀⠀⠀⠀⠀⠀⠀⣀⣀⣄⣠⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⢰⠇⡀⠀⠙⠻⡿⣦⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀
|
||||
|
||||
27
m/raccoon/xilinx-xocl-depmod.patch
Normal file
27
m/raccoon/xilinx-xocl-depmod.patch
Normal file
@ -0,0 +1,27 @@
|
||||
--- a/driver/xocl/mgmtpf/Makefile 2025-02-20 15:59:28.379826176 +0100
|
||||
+++ b/driver/xocl/mgmtpf/Makefile 2025-02-20 15:59:42.366892140 +0100
|
||||
@@ -119,10 +119,6 @@ all:
|
||||
|
||||
install: all
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install
|
||||
- depmod -a
|
||||
- install -m 644 99-xclmgmt.rules /etc/udev/rules.d
|
||||
- -rmmod -s xclmgmt || true
|
||||
- -modprobe xclmgmt
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.o.d *.o.cmd *~ core .depend .*.cmd *.ko *.ko.unsigned \
|
||||
--- a/driver/xocl/userpf/Makefile 2025-02-20 16:03:20.751922522 +0100
|
||||
+++ b/driver/xocl/userpf/Makefile 2025-02-20 16:03:35.377991553 +0100
|
||||
@@ -138,11 +138,6 @@ all:
|
||||
|
||||
install: all
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install
|
||||
- depmod -a
|
||||
- install -m 644 99-xocl.rules /etc/udev/rules.d
|
||||
- -rmmod -s xocl || true
|
||||
- -rmmod -s xdma || true
|
||||
- -modprobe xocl
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.o.d *~ core .depend .*.cmd *.ko *.ko.unsigned *.mod.c \
|
||||
28
m/raccoon/xilinx-xocl.nix
Normal file
28
m/raccoon/xilinx-xocl.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, kernel
|
||||
, xilinx-xrt
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xilinx-xocl";
|
||||
version = "2.19.0";
|
||||
src = "${xilinx-xrt}/src/xrt-${version}";
|
||||
dontStrip = true;
|
||||
preBuild = ''
|
||||
cd driver/xocl
|
||||
'';
|
||||
patches = [
|
||||
./xilinx-xocl-depmod.patch
|
||||
];
|
||||
buildFlags = [ "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
||||
installFlags = [
|
||||
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||
];
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
||||
25
m/raccoon/xilinx-xrt-aiebu.patch
Normal file
25
m/raccoon/xilinx-xrt-aiebu.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- a/src/runtime_src/core/common/aiebu/src/cpp/aiebu/utils/asm/CMakeLists.txt
|
||||
+++ b/src/runtime_src/core/common/aiebu/src/cpp/aiebu/utils/asm/CMakeLists.txt
|
||||
@@ -23,8 +23,6 @@ add_executable(aiebu-asm $<TARGET_OBJECTS:aiebu_asm_objects>)
|
||||
target_link_libraries(aiebu-asm PRIVATE aiebu_static)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
- target_link_options(aiebu-asm PRIVATE "-static")
|
||||
- set_target_properties(aiebu-asm PROPERTIES INSTALL_RPATH "" BUILD_RPATH "")
|
||||
|
||||
# Create a dynamically linked executable. aiebu-asm-dyn, on Linux for running
|
||||
# valgrind, etc. This binary is not released for deployment but only used for
|
||||
@@ -35,13 +33,6 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
target_link_libraries(aiebu-asm-dyn PRIVATE aiebu_static)
|
||||
endif()
|
||||
|
||||
-# This custom target fails if aiebu-asm has any dynamic dependencies
|
||||
-add_custom_target(check_dynamic_deps ALL
|
||||
- COMMAND ${CMAKE_COMMAND} -E echo "Checking for dynamic dependencies ..."
|
||||
- COMMAND ${CMAKE_COMMAND} -P "${AIEBU_SOURCE_DIR}/cmake/depends.cmake" $<TARGET_FILE:aiebu-asm> aiebu-asm_depends.txt
|
||||
- DEPENDS aiebu-asm
|
||||
- )
|
||||
-
|
||||
install(TARGETS aiebu-asm
|
||||
RUNTIME DESTINATION ${AIEBU_INSTALL_BIN_DIR}
|
||||
CONFIGURATIONS Debug Release COMPONENT Runtime
|
||||
13
m/raccoon/xilinx-xrt-icd.patch
Normal file
13
m/raccoon/xilinx-xrt-icd.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/CMake/icd.cmake b/src/CMake/icd.cmake
|
||||
index 255a2e3d8..460a6d4c7 100644
|
||||
--- a/src/CMake/icd.cmake
|
||||
+++ b/src/CMake/icd.cmake
|
||||
@@ -10,7 +10,7 @@ configure_file (
|
||||
${ICD_FILE_NAME}
|
||||
)
|
||||
|
||||
-set(OCL_ICD_INSTALL_PREFIX "/etc/OpenCL/vendors")
|
||||
+set(OCL_ICD_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors")
|
||||
|
||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME}
|
||||
DESTINATION ${OCL_ICD_INSTALL_PREFIX}
|
||||
68
m/raccoon/xilinx-xrt.nix
Normal file
68
m/raccoon/xilinx-xrt.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, enableDebug ? false
|
||||
, lib
|
||||
, cmake
|
||||
, pkg-config
|
||||
, libdrm
|
||||
, libelf
|
||||
, opencl-headers
|
||||
, ocl-icd
|
||||
, git
|
||||
, boost
|
||||
, ncurses
|
||||
, openssl
|
||||
, rapidjson
|
||||
, protobuf
|
||||
, python3
|
||||
, libuuid
|
||||
, curl
|
||||
, libsystemtap
|
||||
, libxcrypt
|
||||
, udev
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "xilinx-xrt";
|
||||
version = "dc81a9cc";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Xilinx";
|
||||
repo = "XRT";
|
||||
rev = "dc81a9cc852bf44e71aa3edde7c8f7d54f355eab";
|
||||
hash = "sha256-SG1gIO8Bvgs5XQ7HswjWNavPH+m8xHXqauztuJa6aEo=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
dontStrip = true;
|
||||
patches = [
|
||||
./xilinx-xrt-aiebu.patch
|
||||
./xilinx-xrt-icd.patch
|
||||
];
|
||||
cmakeFlags = [
|
||||
"-DXRT_INSTALL_PREFIX=${placeholder "out"}"
|
||||
"-DXRT_INSTALL_DIR=${placeholder "out"}"
|
||||
"-DXRT_NATIVE_BUILD=yes"
|
||||
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
||||
];
|
||||
# A directory named "build" already exists
|
||||
cmakeBuildDir = "the-build";
|
||||
|
||||
# Replace all occurences of /usr to $out, although some are not correct. By
|
||||
# default they are replaced by /var/empty
|
||||
dontFixCmake = true;
|
||||
preConfigure = ''
|
||||
find "." -type f \( -name "*.cmake" -o -name "*.cmake.in" -o -name CMakeLists.txt \) -print |
|
||||
while read fn; do
|
||||
sed -e 's^/usr\([ /]\|$\)^'$out'\1^g' -e 's^/opt\([ /]\|$\)^'$out'\1^g' < "$fn" > "$fn.tmp"
|
||||
mv "$fn.tmp" "$fn"
|
||||
done
|
||||
'';
|
||||
nativeBuildInputs = [ cmake pkg-config git ];
|
||||
buildInputs = [ libdrm.dev opencl-headers ocl-icd boost.dev ncurses
|
||||
openssl.dev rapidjson protobuf python3 libelf libuuid.dev curl.dev
|
||||
libsystemtap libxcrypt udev.out udev.dev
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user