forked from M-Labs/artiq-zynq
better solution for fw type based on variant
This commit is contained in:
parent
e38c4a14ca
commit
3840ebaf74
13
default.nix
13
default.nix
@ -14,6 +14,7 @@ let
|
|||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
board = target;
|
board = target;
|
||||||
};
|
};
|
||||||
|
fwtype = if variant == "satellite" then "satman" else "runtime";
|
||||||
|
|
||||||
firmware = rustPlatform.buildRustPackage rec {
|
firmware = rustPlatform.buildRustPackage rec {
|
||||||
# note: due to fetchCargoTarball, cargoSha256 depends on package name
|
# note: due to fetchCargoTarball, cargoSha256 depends on package name
|
||||||
@ -39,11 +40,10 @@ let
|
|||||||
# there's probably a better way to go around it
|
# there's probably a better way to go around it
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out $out/nix-support
|
mkdir -p $out $out/nix-support
|
||||||
export FWTYPE=${if variant == "satellite" then "satman" else "runtime"}
|
cp ../build/${fwtype}.bin $out/${fwtype}.bin
|
||||||
cp ../build/$FWTYPE.bin $out/$FWTYPE.bin
|
cp ../build/firmware/armv7-none-eabihf/release/${fwtype} $out/${fwtype}.elf
|
||||||
cp ../build/firmware/armv7-none-eabihf/release/$FWTYPE $out/$FWTYPE.elf
|
echo file binary-dist $out/${fwtype}.bin >> $out/nix-support/hydra-build-products
|
||||||
echo file binary-dist $out/$FWTYPE.bin >> $out/nix-support/hydra-build-products
|
echo file binary-dist $out/${fwtype}.elf >> $out/nix-support/hydra-build-products
|
||||||
echo file binary-dist $out/$FWTYPE.elf >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
@ -68,8 +68,7 @@ let
|
|||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
ln -s ${szl}/szl.elf $out
|
ln -s ${szl}/szl.elf $out
|
||||||
ln -s ${firmware}/runtime.bin $out
|
ln -s ${firmware}/${fwtype}.bin $out
|
||||||
ln -s ${firmware}/satman.bin $out
|
|
||||||
ln -s ${gateware}/top.bit $out
|
ln -s ${gateware}/top.bit $out
|
||||||
'';
|
'';
|
||||||
sd = pkgs.runCommand "${target}-${variant}-sd"
|
sd = pkgs.runCommand "${target}-${variant}-sd"
|
||||||
|
Loading…
Reference in New Issue
Block a user