2024-01-17 18:22:30 +01:00
|
|
|
final: prev:
|
|
|
|
|
|
|
|
# Changes to packages from nixpkgs
|
|
|
|
|
|
|
|
{
|
2024-09-25 10:18:14 +02:00
|
|
|
clangEpi = final.callPackage ./pkgs/llvm-epi/default.nix { openmp = null; };
|
|
|
|
clangEpiUnwrapped = final.callPackage ./pkgs/llvm-epi/clang.nix { };
|
|
|
|
stdenvClangEpi = final.stdenv.override { cc = final.buildPackages.clangEpi; allowedRequisites = null; };
|
|
|
|
|
2024-09-25 10:20:55 +02:00
|
|
|
rvb = final.callPackage ./pkgs/rvb/default.nix { };
|
|
|
|
rvb-clang = final.callPackage ./pkgs/rvb/default.nix { stdenv = final.stdenvClangEpi; };
|
2024-09-25 13:08:40 +02:00
|
|
|
stream = final.callPackage ./pkgs/stream/default.nix { };
|
2024-09-25 10:20:55 +02:00
|
|
|
|
2024-05-28 18:12:14 +02:00
|
|
|
blis = ((prev.blis.override {
|
|
|
|
blas64 = true;
|
|
|
|
withArchitecture = "generic";
|
|
|
|
}).overrideAttrs (old: {
|
|
|
|
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
|
|
|
|
prev.buildPackages.gfortran
|
|
|
|
];
|
|
|
|
})).overrideDerivation (old : {
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-cblas"
|
|
|
|
"--blas-int-size=64"
|
|
|
|
"--enable-threading=openmp"
|
|
|
|
#"--build=x86_64-unknown-linux-gnu"
|
|
|
|
#"--host=riscv64-unknown-linux-gnu"
|
|
|
|
"generic"
|
|
|
|
];
|
|
|
|
});
|
2024-01-18 15:59:51 +01:00
|
|
|
|
2024-09-06 08:11:24 +02:00
|
|
|
riscv-tools = prev.pkgsStatic.stdenv.mkDerivation {
|
|
|
|
name = "riscv-tools";
|
|
|
|
src = ./tools;
|
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
2024-09-03 13:06:33 +02:00
|
|
|
};
|
|
|
|
|
2024-07-08 13:32:29 +02:00
|
|
|
bitstreams = builtins.fetchGit {
|
|
|
|
url = "git@bscpm03.bsc.es:rarias/bitstreams.git";
|
2024-09-19 11:01:48 +02:00
|
|
|
rev = "2f899627a226890c6f9820aa44e34c2ecea03faf";
|
2024-07-08 13:32:29 +02:00
|
|
|
};
|
2024-08-22 17:12:42 +02:00
|
|
|
|
|
|
|
# Baremetal tests for standalone FPGA
|
|
|
|
sa-fpga-tests = prev.pkgsStatic.stdenv.mkDerivation {
|
|
|
|
name = "sa-fpga-tests";
|
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = "git@gitlab-internal.bsc.es:hwdesign/rtl/core-tile/sa-fpga.git";
|
2024-10-02 07:33:57 +02:00
|
|
|
rev = "720be4f1f5dd0ef963135992578be2ab55fb5537";
|
|
|
|
ref = "main";
|
2024-08-22 17:12:42 +02:00
|
|
|
};
|
|
|
|
dontConfigure = true;
|
|
|
|
patches = [
|
2024-09-06 08:22:14 +02:00
|
|
|
#./patches/sa-fpga-crt.patch
|
|
|
|
#./patches/sa-fpga-text-address.patch
|
|
|
|
./patches/sa-fpga-uart.patch
|
|
|
|
./patches/sa-fpga-plic-registers.patch
|
2024-10-02 07:33:57 +02:00
|
|
|
./patches/sa-fpga-add-plic-claim-test.patch
|
2024-08-22 17:12:42 +02:00
|
|
|
];
|
|
|
|
buildPhase = ''
|
|
|
|
cd fpga_core_bridge/simulator/tests/c_tests/
|
|
|
|
make RISCV_PREFIX=riscv64-unknown-linux-musl-
|
|
|
|
|
|
|
|
# Generate binary images to be loaded in memory
|
|
|
|
for f in *.riscv; do
|
|
|
|
# Don't copy 0x40000000 section
|
|
|
|
$OBJCOPY -R .tohost -O binary $f $f.bin
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
ls -lah
|
|
|
|
make install install_dir=$out
|
|
|
|
cp -a *.bin $out
|
|
|
|
'';
|
|
|
|
dontFixup = true;
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
};
|
|
|
|
|
2024-08-23 16:06:21 +02:00
|
|
|
rbootrom = prev.pkgsStatic.stdenv.mkDerivation {
|
2024-08-26 17:14:53 +02:00
|
|
|
name = "rbootrom";
|
2024-08-23 16:06:21 +02:00
|
|
|
src = ./bootrom;
|
|
|
|
dontConfigure = true;
|
|
|
|
buildPhase = ''
|
|
|
|
make
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp rbootrom.bin rbootrom.elf $out/
|
|
|
|
'';
|
|
|
|
dontFixup = true;
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
};
|
2024-01-17 18:22:30 +01:00
|
|
|
}
|