forked from M-Labs/artiq-zynq
added support for satellite variants in nix-build
This commit is contained in:
parent
db9b744825
commit
f80f2ac99d
@ -20,7 +20,7 @@ let
|
||||
name = "firmware";
|
||||
|
||||
src = ./src;
|
||||
cargoSha256 = "1rsg2cdkwjhjmdhr7ddwlpgw5rl2sq43h4y38p3dj6qr54bhxpck";
|
||||
cargoSha256 = "sha256-H67cMdQZDnKpr91lEbmGuw4269ekvlEe6XjltLPR9rk=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.gnumake
|
||||
@ -33,7 +33,7 @@ let
|
||||
export XARGO_RUST_SRC="${rustPlatform.rust.rustc}/lib/rustlib/src/rust/library"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_9.clang-unwrapped.lib}/lib/clang/9.0.1/include"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}"
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}" ${if variant == "satellite" then "satman" else "runtime"}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -1,6 +1,6 @@
|
||||
TARGET := zc706
|
||||
GWARGS := -V simple
|
||||
SATMAN_GWARGS := -m ../build/mem.rs -V satellite
|
||||
SATMAN_GWARGS := -V satellite
|
||||
|
||||
all: runtime
|
||||
|
||||
@ -11,7 +11,7 @@ runtime: ../build/runtime.bin
|
||||
|
||||
../build/pl.rs ../build/rustc-cfg: gateware/*
|
||||
mkdir -p ../build
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(GWARGS)
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg -m ../build/mem.rs $(GWARGS)
|
||||
|
||||
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg
|
||||
cd runtime && \
|
||||
@ -25,7 +25,7 @@ runtime: ../build/runtime.bin
|
||||
|
||||
satman_cfg:
|
||||
mkdir -p ../build
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(SATMAN_GWARGS)
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg -m ../build/mem.rs $(SATMAN_GWARGS)
|
||||
|
||||
satmanout: satman_cfg
|
||||
cd satman && \
|
||||
|
Loading…
Reference in New Issue
Block a user