Add Xilinx xocl derivation
Need to move to raccoon to access "config" attribute.
This commit is contained in:
parent
df8b5b2d67
commit
4ab38212b3
@ -34,6 +34,16 @@
|
|||||||
|
|
||||||
services.openssh.settings.X11Forwarding = true;
|
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;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
users.motd = ''
|
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" ];
|
||||||
|
}
|
@ -21,7 +21,6 @@
|
|||||||
, libsystemtap
|
, libsystemtap
|
||||||
, libxcrypt
|
, libxcrypt
|
||||||
, udev
|
, udev
|
||||||
#, glibc
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
@ -38,12 +37,10 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
patches = [
|
patches = [
|
||||||
./aiebu.patch
|
./xilinx-xrt-aiebu.patch
|
||||||
./xilinx-xrt-icd.patch
|
./xilinx-xrt-icd.patch
|
||||||
];
|
];
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
#"--trace-expand"
|
|
||||||
#"--debug-find-pkg=OpenCL"
|
|
||||||
"-DXRT_INSTALL_PREFIX=${placeholder "out"}"
|
"-DXRT_INSTALL_PREFIX=${placeholder "out"}"
|
||||||
"-DXRT_INSTALL_DIR=${placeholder "out"}"
|
"-DXRT_INSTALL_DIR=${placeholder "out"}"
|
||||||
"-DXRT_NATIVE_BUILD=yes"
|
"-DXRT_NATIVE_BUILD=yes"
|
||||||
@ -62,23 +59,10 @@ stdenv.mkDerivation rec {
|
|||||||
mv "$fn.tmp" "$fn"
|
mv "$fn.tmp" "$fn"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
# preBuild = ''
|
|
||||||
# set -x
|
|
||||||
# cat CMakeCache.txt
|
|
||||||
# echo --------------------------------------
|
|
||||||
# grep -R '/var/empty' .
|
|
||||||
# echo --------------------------------------
|
|
||||||
# set +x
|
|
||||||
# exit 1
|
|
||||||
# '';
|
|
||||||
buildFlags = [
|
|
||||||
#"VERBOSE=1"
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [ cmake pkg-config git ];
|
nativeBuildInputs = [ cmake pkg-config git ];
|
||||||
buildInputs = [ libdrm.dev opencl-headers ocl-icd boost.dev ncurses
|
buildInputs = [ libdrm.dev opencl-headers ocl-icd boost.dev ncurses
|
||||||
openssl.dev rapidjson protobuf python3 libelf libuuid.dev curl.dev libsystemtap
|
openssl.dev rapidjson protobuf python3 libelf libuuid.dev curl.dev
|
||||||
libxcrypt udev.out udev.dev
|
libsystemtap libxcrypt udev.out udev.dev
|
||||||
#glibc.static
|
|
||||||
];
|
];
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
}
|
}
|
@ -42,5 +42,4 @@ final: prev:
|
|||||||
});
|
});
|
||||||
|
|
||||||
prometheus-slurm-exporter = prev.callPackage ./slurm-exporter.nix { };
|
prometheus-slurm-exporter = prev.callPackage ./slurm-exporter.nix { };
|
||||||
xilinx-xrt = prev.callPackage ./xilinx-xrt.nix { };
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user