uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
33
pkgs/development/compilers/yosys/plugins/bluespec.nix
Normal file
33
pkgs/development/compilers/yosys/plugins/bluespec.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, lib, fetchFromGitHub, pkg-config
|
||||
, yosys, readline, zlib, bluespec
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "yosys-bluespec";
|
||||
version = "2021.09.08";
|
||||
plugin = "bluespec";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thoughtpolice";
|
||||
repo = "yosys-bluespec";
|
||||
rev = "f6f4127a4e96e18080fd5362b6769fa3e24c76b1";
|
||||
sha256 = "sha256-3cNFP/k4JsgLyUQHWU10Htl2Rh0staAcA3R4piD6hDE=";
|
||||
};
|
||||
|
||||
buildInputs = [ yosys readline zlib bluespec ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
doCheck = true;
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)/share/yosys/plugins"
|
||||
"STATIC_BSC_PATH=${bluespec}/bin/bsc"
|
||||
"STATIC_BSC_LIBDIR=${bluespec}/lib"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bluespec plugin for Yosys";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
32
pkgs/development/compilers/yosys/plugins/ghdl.nix
Normal file
32
pkgs/development/compilers/yosys/plugins/ghdl.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, lib, fetchFromGitHub, pkg-config
|
||||
, yosys, readline, zlib, ghdl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "yosys-ghdl";
|
||||
version = "2021.01.25";
|
||||
plugin = "ghdl";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ghdl";
|
||||
repo = "ghdl-yosys-plugin";
|
||||
rev = "cba859cacf8c6631146dbdaa0f297c060b5a68cd";
|
||||
sha256 = "01d9wb7sqkmkf2y9bnn3pmhy08khzs5m1d06whxsiwgwnjzfk9mx";
|
||||
};
|
||||
|
||||
buildInputs = [ yosys readline zlib ghdl ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
doCheck = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/yosys/plugins
|
||||
cp ghdl.so $out/share/yosys/plugins/ghdl.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GHDL plugin for Yosys";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/yql-qlf-plugin/Makefile b/ql-qlf-plugin/Makefile
|
||||
index 2819055c9fe..0e391581012 100644
|
||||
--- a/ql-qlf-plugin/Makefile
|
||||
+++ b/ql-qlf-plugin/Makefile
|
||||
@@ -55,10 +55,6 @@ VERILOG_MODULES = $(COMMON)/cells_sim.v \
|
||||
$(PP3_DIR)/mult_sim.v \
|
||||
$(PP3_DIR)/qlal3_sim.v \
|
||||
|
||||
-retrieve-pmgen:=$(shell mkdir -p pmgen && wget -nc -O pmgen/pmgen.py https://raw.githubusercontent.com/SymbiFlow/yosys/master%2Bwip/passes/pmgen/pmgen.py)
|
||||
-
|
||||
-pre-build:=$(shell python3 pmgen/pmgen.py -o pmgen/ql-dsp-pm.h -p ql_dsp ql_dsp.pmg)
|
||||
-
|
||||
install_modules: $(VERILOG_MODULES)
|
||||
$(foreach f,$^,install -D $(f) $(DATA_DIR)/quicklogic/$(f);)
|
||||
|
||||
106
pkgs/development/compilers/yosys/plugins/symbiflow.nix
Normal file
106
pkgs/development/compilers/yosys/plugins/symbiflow.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{ fetchFromGitHub
|
||||
, gtest
|
||||
, lib
|
||||
, python3
|
||||
, readline
|
||||
, stdenv
|
||||
, which
|
||||
, yosys
|
||||
, zlib
|
||||
, yosys-symbiflow
|
||||
}: let
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SymbiFlow";
|
||||
repo = "yosys-symbiflow-plugins";
|
||||
rev = "35c6c33811a8de7c80dff6a7bcf7aa6ec9b21233";
|
||||
hash = "sha256-g5dX9+R+gWt8e7Bhbbg60O9qa+Vi6Ar0M1sHhYlAre8=";
|
||||
};
|
||||
|
||||
version = "2022.01.06";
|
||||
|
||||
# Supported symbiflow plugins.
|
||||
#
|
||||
# The following are disabled:
|
||||
#
|
||||
# "ql-qlf" builds but fails to load the plugin, so is not currently supported.
|
||||
#
|
||||
# "UHDM" doesn't currently build, as the work to package UHDM and surelog has
|
||||
# not (yet) been undertaken.
|
||||
plugins = [
|
||||
"design_introspection"
|
||||
"fasm"
|
||||
"integrateinv"
|
||||
"params"
|
||||
"ql-iob"
|
||||
# "ql-qlf"
|
||||
"sdc"
|
||||
"xdc"
|
||||
# "UHDM"
|
||||
];
|
||||
|
||||
static_gtest = gtest.dev.overrideAttrs (old: {
|
||||
dontDisableStatic = true;
|
||||
disableHardening = [ "pie" ];
|
||||
cmakeFlags = old.cmakeFlags ++ ["-DBUILD_SHARED_LIBS=OFF"];
|
||||
});
|
||||
|
||||
in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec {
|
||||
pname = "yosys-symbiflow-${plugin}-plugin";
|
||||
inherit src version plugin;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ which python3 ];
|
||||
buildInputs = [ yosys readline zlib ] ;
|
||||
|
||||
# xdc has an incorrect path to a test which has yet to be patched
|
||||
doCheck = plugin != "xdc";
|
||||
checkInputs = [ static_gtest ];
|
||||
|
||||
# ql-qlf tries to fetch a yosys script from github
|
||||
# Run the script in preBuild instead.
|
||||
patches = lib.optional ( plugin == "ql-qlf" ) ./symbiflow-pmgen.patch;
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p ql-qlf-plugin/pmgen
|
||||
''
|
||||
+ lib.optionalString ( plugin == "ql-qlf" ) ''
|
||||
python3 ${yosys.src}/passes/pmgen/pmgen.py -o ql-qlf-plugin/pmgen/ql-dsp-pm.h -p ql_dsp ql-qlf-plugin/ql_dsp.pmg
|
||||
'';
|
||||
|
||||
# Providing a symlink avoids the need for patching the test makefile
|
||||
postUnpack = ''
|
||||
mkdir -p source/third_party/googletest/googletest/build/
|
||||
ln -s ${static_gtest}/lib source/third_party/googletest/googletest/build/lib
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PLUGIN_LIST=${plugin}"
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"PLUGINS_DIR=\${out}/share/yosys/plugins/"
|
||||
"DATA_DIR=\${out}/share/yosys/"
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
"PLUGINS_DIR=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
"DATA_DIR=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
( "NIX_YOSYS_PLUGIN_DIRS=\${NIX_BUILD_TOP}/source/${plugin}-plugin"
|
||||
# sdc and xdc plugins use design introspection for their tests
|
||||
+ (lib.optionalString ( plugin == "sdc" || plugin == "xdc" )
|
||||
":${yosys-symbiflow.design_introspection}/share/yosys/plugins/")
|
||||
)
|
||||
];
|
||||
|
||||
installFlags = buildFlags;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Symbiflow ${plugin} plugin for Yosys";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ollieB thoughtpolice ];
|
||||
};
|
||||
}))
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue