1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

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.
This commit is contained in:
Tuomas Tynkkynen 2016-06-19 22:47:30 +03:00
parent 18572e2359
commit d8cd615720

View file

@ -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
'';