forked from M-Labs/nix-scripts
switch everything to nixpkgs 21.05
No problems found during testing and OpenOCD changes make HITL tricky while keeping 20.09.
This commit is contained in:
parent
f595103f17
commit
c9efc20aeb
|
@ -35,7 +35,7 @@ let
|
|||
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
|
||||
artiq = callPackage ./pkgs/artiq.nix { inherit pythonDeps binutils-or1k binutils-arm llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
|
||||
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
|
||||
openocd = callPackage ./pkgs/openocd.nix { autoreconfHook = pkgs.autoreconfHook269 or pkgs.autoreconfHook; };
|
||||
openocd = callPackage ./pkgs/openocd.nix { };
|
||||
};
|
||||
|
||||
condaNoarch = {
|
||||
|
|
|
@ -1,95 +1,22 @@
|
|||
{ stdenv, buildEnv, lib, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi, openocd }:
|
||||
{ stdenv, buildEnv, lib, fetchFromGitHub, openocd }:
|
||||
let
|
||||
bscan_spi_bitstreams = fetchFromGitHub {
|
||||
owner = "quartiq";
|
||||
repo = "bscan_spi_bitstreams";
|
||||
rev = "01d8f819f15baf9a8cc5d96945a51e4d267ff564";
|
||||
sha256 = "1zqv47kzgvbn4c8cr019a6wcja7gn5h1z4kvw5bhpc72fyhagal9";
|
||||
};
|
||||
|
||||
openocd-mlabs = stdenv.mkDerivation rec {
|
||||
pname = "openocd-mlabs";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "openocd";
|
||||
fetchSubmodules = true;
|
||||
rev = "c383a57adcff332b2c5cf8d55a84626285b42c2c";
|
||||
sha256 = "0xlj9cs72acx3zqagvr7f1c0v6lnqhl8fgrlhgmhmvk5n9knk492";
|
||||
};
|
||||
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ autoreconfHook libftdi libusb1 hidapi ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-jtag_vpi"
|
||||
"--enable-usb_blaster_libftdi"
|
||||
"--enable-amtjtagaccel"
|
||||
"--enable-gw16012"
|
||||
"--enable-presto_libftdi"
|
||||
"--enable-openjtag_ftdi"
|
||||
"--enable-oocd_trace"
|
||||
"--enable-buspirate"
|
||||
"--enable-sysfsgpio"
|
||||
"--enable-remote-bitbang"
|
||||
"--disable-werror"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-implicit-fallthrough"
|
||||
"-Wno-format-truncation"
|
||||
"-Wno-format-overflow"
|
||||
"-Wno-error=tautological-compare"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
rules="$out/share/openocd/contrib/60-openocd.rules"
|
||||
if [ ! -f "$rules" ]; then
|
||||
echo "$rules is missing, must update the Nix file."
|
||||
exit 1
|
||||
fi
|
||||
ln -s "$rules" "$out/etc/udev/rules.d/"
|
||||
|
||||
mkdir -p "$out/share/bscan-spi-bitstreams"
|
||||
cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
||||
longDescription = ''
|
||||
OpenOCD provides on-chip programming and debugging support with a layered
|
||||
architecture of JTAG interface and TAP support, debug target support
|
||||
(e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.). Several
|
||||
network interfaces are available for interactiving with OpenOCD: HTTP,
|
||||
telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
|
||||
"remote target" for source-level debugging of embedded systems using the
|
||||
GNU GDB program.
|
||||
bscan_spi_bitstreams-pkg = stdenv.mkDerivation {
|
||||
name = "bscan_spi_bitstreams";
|
||||
src = fetchFromGitHub {
|
||||
owner = "quartiq";
|
||||
repo = "bscan_spi_bitstreams";
|
||||
rev = "01d8f819f15baf9a8cc5d96945a51e4d267ff564";
|
||||
sha256 = "1zqv47kzgvbn4c8cr019a6wcja7gn5h1z4kvw5bhpc72fyhagal9";
|
||||
};
|
||||
phases = ["installPhase"];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/bscan-spi-bitstreams
|
||||
cp $src/*.bit $out/share/bscan-spi-bitstreams
|
||||
'';
|
||||
homepage = http://openocd.sourceforge.net/;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ sb0 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
bscan_spi_bitstreams-pkg = stdenv.mkDerivation {
|
||||
name = "bscan_spi_bitstreams";
|
||||
src = bscan_spi_bitstreams;
|
||||
phases = ["installPhase"];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/bscan-spi-bitstreams
|
||||
cp $src/*.bit $out/share/bscan-spi-bitstreams
|
||||
'';
|
||||
};
|
||||
|
||||
openocd-upstream = buildEnv {
|
||||
name = "openocd-bscanspi";
|
||||
paths = [ openocd bscan_spi_bitstreams-pkg ];
|
||||
};
|
||||
|
||||
in
|
||||
if lib.versionAtLeast openocd.version "0.11" then openocd-upstream else openocd-mlabs
|
||||
buildEnv {
|
||||
name = "openocd-bscanspi";
|
||||
paths = [ openocd bscan_spi_bitstreams-pkg ];
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ in
|
|||
export SZL=${szlEnv}
|
||||
pushd ${<artiq-zynq>}
|
||||
export NIX_SSHOPTS="-F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -i /opt/hydra_id_rsa"
|
||||
ssh $NIX_SSHOPTS rpi-4 "nix-store -r ${<nixpkgs>} --add-root openocd-pkgs --indirect && nix-env -e openocd && nix-env -iA openocd -f openocd-pkgs && rm openocd-pkgs"
|
||||
bash ${<artiq-zynq>}/remote_run.sh -h rpi-4 -o "$NIX_SSHOPTS" -d ${artiq-zynq.zc706-nist_qc2-jtag}
|
||||
popd
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-6 1", "emailresponsible": false }
|
||||
}
|
||||
|
@ -82,7 +82,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }
|
||||
|
@ -100,7 +100,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"a6p": { "type": "boolean", "value": "true" },
|
||||
"artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated:generated-nix", "emailresponsible": false }
|
||||
|
@ -119,7 +119,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-5 1", "emailresponsible": false }
|
||||
}
|
||||
|
@ -136,7 +136,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
||||
"a6p": { "type": "boolean", "value": "false" },
|
||||
|
@ -220,7 +220,7 @@
|
|||
"emailoverride": "",
|
||||
"keepnr": 10,
|
||||
"inputs": {
|
||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "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 },
|
||||
"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 },
|
||||
|
|
Loading…
Reference in New Issue