-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jack Leightcap <jack@leightcap.com>
- Loading branch information
1 parent
2664f2e
commit 87249da
Showing
34 changed files
with
771 additions
and
272 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/openpower/simulator/program.py b/src/openpower/simulator/program.py | ||
index bf86d131..273e1f04 100644 | ||
--- a/src/openpower/simulator/program.py | ||
+++ b/src/openpower/simulator/program.py | ||
@@ -86,7 +86,7 @@ class Program: | ||
|
||
def _assemble(self): | ||
with tempfile.NamedTemporaryFile(suffix=".o") as outfile: | ||
- args = [cmds['as'], | ||
+ args = [cmds['powerpc64le-linux-gnu-as'], | ||
'-mpower9', | ||
'-mregnames', | ||
self.obj_fmt, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/src/openpower/simulator/envcmds.py b/src/openpower/simulator/envcmds.py | ||
index d24430ff..67ff4b73 100644 | ||
--- a/src/openpower/simulator/envcmds.py | ||
+++ b/src/openpower/simulator/envcmds.py | ||
@@ -10,6 +10,6 @@ for cmd in ['objcopy', 'as', 'ld', 'gcc', 'ar', 'gdb']: | ||
default = cmd | ||
else: | ||
default = "powerpc64-linux-gnu-%s" % cmd | ||
- cmds[cmd] = os.environ.get(cmd.upper(), default) | ||
+ cmds[cmd] = default | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{pkgs, ...}: | ||
with pkgs.python3Packages; | ||
buildPythonPackage rec { | ||
pname = "libresoc-nmutil"; | ||
version = "0.0.1"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-DPnzjdGDhAN+wYoSo6iaAK44Je/RKgTe4p/+SHIIaM0="; | ||
}; | ||
|
||
propagatedBuildInputs = [pyvcd]; | ||
|
||
nativeCheckInputs = [nose]; | ||
|
||
# FIXME(jl): nmigen/amaranth tests | ||
doCheck = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
python39Packages, | ||
fetchgit, | ||
}: | ||
python39Packages.pyelftools.overrideAttrs (_: rec { | ||
name = "libresoc-pyelftools"; | ||
version = "v0.30"; | ||
src = fetchgit { | ||
url = "https://git.libre-soc.org/git/pyelftools.git"; | ||
rev = version; | ||
sha256 = "sha256-A9etnN7G24/Gu8YlV/YDpxZV+TG2eVXGx2ZjVnA9ZD4="; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
python39Packages, | ||
fetchPypi, | ||
}: | ||
with python39Packages; | ||
buildPythonPackage rec { | ||
pname = "mdis"; | ||
version = "0.5.1"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "sha256-gvXtP8NO5XPDAs0XMbGknG79FscN/7lxqmF1kg3nhxg="; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
lib, | ||
python39Packages, | ||
fetchFromGitLab, | ||
nmigen, | ||
}: | ||
with python39Packages; | ||
buildPythonPackage rec { | ||
pname = "nmigen-soc"; | ||
version = "unstable-2024-03-31"; | ||
# python setup.py --version | ||
realVersion = "0.1.dev243+g${lib.substring 0 7 src.rev}"; | ||
|
||
# NOTE(jleightcap): while libre-soc project does have local forks of nmigen* projects, | ||
# HEADs of repos are incompatible. | ||
# dev-env-setup implies that these forks are unused in build process, so using upstream. | ||
src = fetchFromGitLab { | ||
owner = "nmigen"; | ||
repo = "nmigen-soc"; | ||
hash = "sha256-RI481chXiD9kP/6vNLzYGOfcbwHH0Cvhk+CgloCY9JU="; | ||
rev = "fd2aaa336283cff2e46f489bf3897780cd217b8b"; # HEAD @ version date | ||
}; | ||
|
||
nativeBuildInputs = [setuptools-scm]; | ||
propagatedBuildInputs = [nmigen setuptools]; | ||
|
||
preBuild = '' | ||
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}" | ||
''; | ||
|
||
nativeCheckInputs = [pytestCheckHook]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
lib, | ||
fetchFromGitLab, | ||
git, | ||
python39Packages, | ||
symbiyosys, | ||
yices, | ||
yosys, | ||
}: | ||
with python39Packages; | ||
buildPythonPackage rec { | ||
pname = "nmigen"; | ||
version = "unstable-2024-03-31"; | ||
realVersion = "0.3.dev243+g${lib.substring 0 7 src.rev}"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "nmigen"; | ||
repo = "nmigen"; | ||
hash = "sha256-tpcA+FFHhm4gF37Z+rB/uZopSRtAtNxU8j5IXnSGeCg="; | ||
rev = "29dec30f628356828aa2aa2b91ce205a570d664e"; # HEAD @ version date | ||
}; | ||
|
||
preBuild = '' | ||
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}" | ||
''; | ||
|
||
nativeBuildInputs = [git setuptools-scm]; | ||
|
||
propagatedBuildInputs = | ||
[ | ||
jinja2 | ||
pyvcd | ||
yosys | ||
] | ||
++ lib.optional (pythonOlder "3.9") importlib-resources | ||
++ lib.optional (pythonOlder "3.8") importlib-metadata; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
symbiyosys | ||
yices | ||
yosys | ||
]; | ||
|
||
# nmigen wraps C/C++ compiler with setuptools.distutils.ccompiler | ||
# requires manual patching for compatibiility with this version of setuptools | ||
# https://github.com/NixOS/nixpkgs/pull/199974 | ||
doCheck = false; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.