From aa30c7b539eacc991daf87285b94811d721f778e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 25 Aug 2019 09:27:12 +0800 Subject: [PATCH] add ARM binutils to the development environment (Zynq) --- artiq-fast/default.nix | 3 ++- artiq-fast/pkgs/{binutils-or1k.nix => binutils.nix} | 5 +++-- artiq-fast/shell-dev.nix | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) rename artiq-fast/pkgs/{binutils-or1k.nix => binutils.nix} (95%) diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index 7f6192e..742318d 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -19,7 +19,8 @@ let }) {} boards; mainPackages = rec { inherit (pythonDeps) asyncserial levenshtein pythonparser quamash pyqtgraph-qt5 misoc migen microscope jesd204b migen-axi lit outputcheck; - binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {}; + binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; }; + binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "arm-linux-gnueabihf"; }; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {}; rustc = callPackage ./pkgs/rust ((stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { diff --git a/artiq-fast/pkgs/binutils-or1k.nix b/artiq-fast/pkgs/binutils.nix similarity index 95% rename from artiq-fast/pkgs/binutils-or1k.nix rename to artiq-fast/pkgs/binutils.nix index f9fa99a..cc06df4 100644 --- a/artiq-fast/pkgs/binutils-or1k.nix +++ b/artiq-fast/pkgs/binutils.nix @@ -1,10 +1,11 @@ { stdenv, buildPackages , fetchurl, zlib +, platform, target }: stdenv.mkDerivation rec { basename = "binutils"; - platform = "or1k"; + inherit platform; version = "2.30"; name = "${basename}_${platform}-${version}"; src = fetchurl { @@ -12,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg"; }; configureFlags = - [ "--enable-shared" "--enable-deterministic-archives" "--target=or1k-linux"]; + [ "--enable-shared" "--enable-deterministic-archives" "--target=${target}"]; outputs = [ "out" "info" "man" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ zlib ]; diff --git a/artiq-fast/shell-dev.nix b/artiq-fast/shell-dev.nix index 228a14c..5e0b515 100644 --- a/artiq-fast/shell-dev.nix +++ b/artiq-fast/shell-dev.nix @@ -12,6 +12,7 @@ in pkgs.cargo artiqpkgs.rustc artiqpkgs.binutils-or1k + artiqpkgs.binutils-arm artiqpkgs.llvm-or1k artiqpkgs.openocd ];