zynq: stable and beta channels

This commit is contained in:
Sebastien Bourdeauducq 2021-07-07 18:08:30 +08:00
parent 162238b1f7
commit 92d2b24e7c
3 changed files with 60 additions and 9 deletions

View File

@ -1,12 +1,9 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
zynq-rs-latest = import <zynq-rs>;
artiq-zynq = import <artiq-zynq>; artiq-zynq = import <artiq-zynq>;
artiq-fast = import <artiq-fast> { inherit pkgs; }; artiq-fast = import <artiq-fast> { inherit pkgs; };
in in
( (
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs-latest
) // (
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq
) // { ) // {
gateware-sim = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation { gateware-sim = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
@ -32,7 +29,12 @@ in
]; ];
phases = [ "buildPhase" ]; 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 Power cycling board...
(echo b; sleep 5; echo B; sleep 5) | nc -N -w6 192.168.1.31 3131 (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 USER=hydra
export OPENOCD_ZYNQ=${artiq-zynq.zynq-rs}/openocd export OPENOCD_ZYNQ=${artiq-zynq.zynq-rs}/openocd
export SZL=${(import artiq-zynq.zynq-rs).szl} export SZL=${szlEnv}
pushd ${<artiq-zynq>} pushd ${<artiq-zynq>}
bash ${<artiq-zynq>}/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} bash ${<artiq-zynq>}/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 popd

View File

@ -165,12 +165,12 @@
} }
}, },
"zynq": { "zynq-rs": {
"enabled": 1, "enabled": 1,
"hidden": false, "hidden": false,
"description": "ARTIQ on Zynq", "description": "Bare-metal Rust on Zynq-7000",
"nixexprinput": "nixScripts", "nixexprinput": "nixScripts",
"nixexprpath": "zynq.nix", "nixexprpath": "zynq-rs.nix",
"checkinterval": 300, "checkinterval": 300,
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
@ -179,10 +179,52 @@
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false }, "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 }, "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 }, "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 }, "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_name": { "value": "artiq-zynq", "type": "string" },
"gitea_repo_owner": { "value": "M-Labs", "type": "string" }, "gitea_repo_owner": { "value": "M-Labs", "type": "string" },
"gitea_status_repo": { "value": "artiq-zynq", "type": "string" } "gitea_status_repo": { "value": "artiq-zynq", "type": "string" }

7
zynq-rs.nix Normal file
View File

@ -0,0 +1,7 @@
let
pkgs = import <nixpkgs> {};
zynq-rs = import <zynq-rs>;
in
(
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs
)