diff --git a/zynq.nix b/artiq-zynq.nix similarity index 82% rename from zynq.nix rename to artiq-zynq.nix index 65c83d3..b156191 100644 --- a/zynq.nix +++ b/artiq-zynq.nix @@ -1,12 +1,9 @@ let pkgs = import {}; - zynq-rs-latest = import ; artiq-zynq = import ; artiq-fast = import { inherit pkgs; }; in ( - builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs-latest - ) // ( builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq ) // { gateware-sim = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation { @@ -32,7 +29,12 @@ in ]; phases = [ "buildPhase" ]; - buildPhase = + let + zynq-rs = import artiq-zynq.zynq-rs; + # New zynq-rs versions with Kasli-SoC support have the multiboard "szl" package. + # Older versions need the SZL environment variable set to the SZL ELF to be loaded. + szlEnv = if zynq-rs ? "szl" then "${zynq-rs.szl}" else "${zynq-rs.zc706-szl}/szl.elf"; + in buildPhase = '' echo Power cycling board... (echo b; sleep 5; echo B; sleep 5) | nc -N -w6 192.168.1.31 3131 @@ -40,7 +42,7 @@ in export USER=hydra export OPENOCD_ZYNQ=${artiq-zynq.zynq-rs}/openocd - export SZL=${(import artiq-zynq.zynq-rs).szl} + export SZL=${szlEnv} pushd ${} bash ${}/remote_run.sh -h rpi-4 -o "-F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -i /opt/hydra_id_rsa" -d ${artiq-zynq.zc706-nist_qc2-jtag} popd diff --git a/hydra/artiq.json b/hydra/artiq.json index 84ff84b..73c1aa3 100644 --- a/hydra/artiq.json +++ b/hydra/artiq.json @@ -165,12 +165,12 @@ } }, - "zynq": { + "zynq-rs": { "enabled": 1, "hidden": false, - "description": "ARTIQ on Zynq", + "description": "Bare-metal Rust on Zynq-7000", "nixexprinput": "nixScripts", - "nixexprpath": "zynq.nix", + "nixexprpath": "zynq-rs.nix", "checkinterval": 300, "schedulingshares": 1, "enableemail": false, @@ -179,10 +179,52 @@ "inputs": { "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, - "artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }, "zynq-rs": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zynq-rs.git", "emailresponsible": false }, + + "gitea_repo_name": { "value": "zynq-rs", "type": "string" }, + "gitea_repo_owner": { "value": "M-Labs", "type": "string" }, + "gitea_status_repo": { "value": "zynq-rs", "type": "string" } + } + }, + "zynq-beta": { + "enabled": 1, + "hidden": false, + "description": "ARTIQ on Zynq-7000 (beta version)", + "nixexprinput": "nixScripts", + "nixexprpath": "artiq-zynq.nix", + "checkinterval": 300, + "schedulingshares": 1, + "enableemail": false, + "emailoverride": "", + "keepnr": 10, + "inputs": { + "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false }, + "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, + "artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false }, "artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false }, + "gitea_repo_name": { "value": "artiq-zynq", "type": "string" }, + "gitea_repo_owner": { "value": "M-Labs", "type": "string" }, + "gitea_status_repo": { "value": "artiq-zynq", "type": "string" } + } + }, + "zynq": { + "enabled": 1, + "hidden": false, + "description": "ARTIQ on Zynq-7000", + "nixexprinput": "nixScripts", + "nixexprpath": "artiq-zynq.nix", + "checkinterval": 300, + "schedulingshares": 1, + "enableemail": false, + "emailoverride": "", + "keepnr": 10, + "inputs": { + "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, + "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, + "artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }, + "artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git release-6", "emailresponsible": false }, + "gitea_repo_name": { "value": "artiq-zynq", "type": "string" }, "gitea_repo_owner": { "value": "M-Labs", "type": "string" }, "gitea_status_repo": { "value": "artiq-zynq", "type": "string" } diff --git a/zynq-rs.nix b/zynq-rs.nix new file mode 100644 index 0000000..47ac60f --- /dev/null +++ b/zynq-rs.nix @@ -0,0 +1,7 @@ +let + pkgs = import {}; + zynq-rs = import ; +in + ( + builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs + )