From d8cd615720524bf7600ff31e4ba3779264c084e9 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 19 Jun 2016 22:47:30 +0300 Subject: [PATCH] raspberrypifw: 1.20160315 -> 1.20160620 - Use fetchFromGitHub - Some files in bin/ are now shell scripts, so skip patchelf on any non-ELF files. With this U-Boot can be successfully launched on a RPi 3. --- .../linux/firmware/raspberrypi/default.nix | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix index 0c61aee9713e..4787eb57afd3 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix @@ -1,15 +1,14 @@ -{stdenv, fetchurl }: +{ stdenv, fetchFromGitHub }: -let +stdenv.mkDerivation rec { + name = "raspberrypi-firmware-${version}"; + version = "1.20160620"; - rev = "1.20160315"; - -in stdenv.mkDerivation { - name = "raspberrypi-firmware-${rev}"; - - src = fetchurl { - url = "https://github.com/raspberrypi/firmware/archive/${rev}.tar.gz"; - sha256 = "0a7ycv01s0kk84szsh51hy2mjjil1dzdk0g7k83h50d5nya090fl"; + src = fetchFromGitHub { + owner = "raspberrypi"; + repo = "firmware"; + rev = version; + sha256 = "06g691px0abndp5zvz2ba1g675rcqb64n055h5ahgnlck5cdpawg"; }; installPhase = '' @@ -19,8 +18,10 @@ in stdenv.mkDerivation { cp opt/vc/LICENCE $out/share/raspberrypi for f in $out/bin/*; do - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" - patchelf --set-rpath "$out/lib" "$f" + if isELF "$f"; then + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" + patchelf --set-rpath "$out/lib" "$f" + fi done '';