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.

+13 -12
+13 -12
pkgs/os-specific/linux/firmware/raspberrypi/default.nix
··· 1 - {stdenv, fetchurl }: 1 + { stdenv, fetchFromGitHub }: 2 2 3 - let 3 + stdenv.mkDerivation rec { 4 + name = "raspberrypi-firmware-${version}"; 5 + version = "1.20160620"; 4 6 5 - rev = "1.20160315"; 6 - 7 - in stdenv.mkDerivation { 8 - name = "raspberrypi-firmware-${rev}"; 9 - 10 - src = fetchurl { 11 - url = "https://github.com/raspberrypi/firmware/archive/${rev}.tar.gz"; 12 - sha256 = "0a7ycv01s0kk84szsh51hy2mjjil1dzdk0g7k83h50d5nya090fl"; 7 + src = fetchFromGitHub { 8 + owner = "raspberrypi"; 9 + repo = "firmware"; 10 + rev = version; 11 + sha256 = "06g691px0abndp5zvz2ba1g675rcqb64n055h5ahgnlck5cdpawg"; 13 12 }; 14 13 15 14 installPhase = '' ··· 19 18 cp opt/vc/LICENCE $out/share/raspberrypi 20 19 21 20 for f in $out/bin/*; do 22 - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" 23 - patchelf --set-rpath "$out/lib" "$f" 21 + if isELF "$f"; then 22 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" 23 + patchelf --set-rpath "$out/lib" "$f" 24 + fi 24 25 done 25 26 ''; 26 27