-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moss: refactor build script add ability to configure backends #3
Conversation
3df1ab0
to
06c0496
Compare
@jleightcap I tried it, but since the overrides are commented out, it only seems to build the default zynq7, no matter what backent I try to build. |
We ended a working session trying to understand why |
Co-authored-by: Jason Odoom <jasonodoom@gmail.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com> Co-authored-by: Dominic Mills <dominic.millz27@gmail.com> Co-authored-by: Albert Chae <albertchae@users.noreply.github.com> Co-authored-by: Jack Leightcap <jack@leightcap.com> Signed-off-by: Jack Leightcap <jack@leightcap.com>
Co-authored-by: Jason Odoom <jasonodoom@gmail.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com> Co-authored-by: Dominic Mills <dominic.millz27@gmail.com> Co-authored-by: Albert Chae <albertchae@users.noreply.github.com> Co-authored-by: Jack Leightcap <jack@leightcap.com> Signed-off-by: Jack Leightcap <jack@leightcap.com>
Co-authored-by: Jason Odoom <jasonodoom@gmail.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com> Co-authored-by: Dominic Mills <dominic.millz27@gmail.com> Co-authored-by: Albert Chae <albertchae@users.noreply.github.com> Co-authored-by: Jack Leightcap <jack@leightcap.com> Signed-off-by: Jack Leightcap <jack@leightcap.com>
06c0496
to
5e94912
Compare
We got the backend selection working in 5e94912 using Waiting for the DB to build to verify the outputs, but the |
buildInputs = [ prjxray nextpnr-xilinx pypy3 coreutils findutils gnused gnugrep ]; | ||
|
||
builder = ./chipdb-builder.sh; | ||
nextpnr-xilinx-chipdb = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invocations:
$ nix build .#nextpnr-xilinx-chipdb.kintex7
# builds with only one backend, etc.
@jleightcap That works, many thanks! |
@jleightcap That leaves the question, how can I query the path to the chipdb output for a specific backend? |
Slightly more elegant, maybe, is: $ nix eval --raw ".#nextpn-xilinx-chipdb.spartan7.outPath" Like you said, this includes the implicit architecture prefix of the host ( Unless you mean how to query the output path prior to building the package? As far as I know that hash embedded in the path is derived from the output and so can't be computed without fully evaluating the package. Let me know if that makes sense! |
@jleightcap That is perfect, thanks! |
(In response to ngi-nix/ngipkgs#7 (comment))
We started by refactoring the
builder = ...
attribute of thenextpnr-xilinx-chipdb
derivation. This builder script had the neccessary build logic for interacting with the prjxray-db, but had some glue logic for interacting with the external dependencies.We refactored this to be inline shell script in the derivation definition, porting over the build logic.
We left a note about future work splitting out the installPhase.
We took a look at your comment,
Our thought was to have a 'base' derivation for
nextpnr-xilinx-chipdb
, then configure thebackend
based on overrides. Ideally, the building process looks likeLet us know if that's along the lines you were thinking @hansfbaier!