about summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-07-04 15:17:46 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-07-04 15:17:46 +0300
commit4085f4de5f5b0798fe27d0622c932254c2573b5a (patch)
tree1fdeab27ee5dd5fca47ce929a101e8078e7788f6 /pkgs/os-specific/linux
parent79ed40cd698a9f61cfbc0322f70177784edb2df2 (diff)
parent55aecd308eff773c7ee6ce754ed75fcf69bde133 (diff)
downloadnixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.gz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.bz2
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.lz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.xz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.zst
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.zip
Merge branch 'pr-newest-uboot' into master
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/firmware/raspberrypi/default.nix25
-rw-r--r--pkgs/os-specific/linux/kernel/linux-rpi.nix50
-rw-r--r--pkgs/os-specific/linux/rtl8723bs/default.nix2
3 files changed, 52 insertions, 25 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
   '';
 
diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix
index 777662718af6..a069e7606ccc 100644
--- a/pkgs/os-specific/linux/kernel/linux-rpi.nix
+++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix
@@ -1,21 +1,47 @@
-{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
+{ stdenv, fetchFromGitHub, perl, buildLinux, ... } @ args:
 
 let
+  modDirVersion = "4.4.13";
+  tag = "1.20160620-1";
+in
+stdenv.lib.overrideDerivation (import ./generic.nix (args // rec {
+  version = "${modDirVersion}-${tag}";
+  inherit modDirVersion;
 
-  rev = "f4b20d47d7df7927967fcd524324b145cfc9e2f9";
-
-in import ./generic.nix (args // rec {
-  version = "4.1.y-${rev}";
-
-  modDirVersion = "4.1.20-v7";
-
-  src = fetchurl {
-    url = "https://api.github.com/repos/raspberrypi/linux/tarball/${rev}";
-    name = "linux-raspberrypi-${version}.tar.gz";
-    sha256 = "0x17hlbi7lpmmnp24dnkync5gzj57j84j0nlrcv1lv9fahjkqsm2";
+  src = fetchFromGitHub {
+    owner = "raspberrypi";
+    repo = "linux";
+    rev = "raspberrypi-kernel_${tag}";
+    sha256 = "0bydlzmd9mar07j6dihhzn1xm6vpn92y33vf1qsdkl3hjil6brfc";
   };
 
   features.iwlwifi = true;
 
   extraMeta.hydraPlatforms = [];
+})) (oldAttrs: {
+  postConfigure = ''
+    # The v7 defconfig has this set to '-v7' which screws up our modDirVersion.
+    sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/'
+  '';
+
+  postFixup = ''
+    # Make copies of the DTBs so that U-Boot finds them, as it is looking for the upstream names.
+    # This is ugly as heck.
+    copyDTB() {
+      if [ -f "$out/dtbs/$1" ]; then
+        cp -v "$out/dtbs/$1" "$out/dtbs/$2"
+      fi
+    }
+
+    # I am not sure if all of these are correct...
+    copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
+    copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
+    copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
+    copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
+    copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
+    copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
+    copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
+    copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
+    copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
+  '';
 })
diff --git a/pkgs/os-specific/linux/rtl8723bs/default.nix b/pkgs/os-specific/linux/rtl8723bs/default.nix
index e8cc1f40067e..046445345903 100644
--- a/pkgs/os-specific/linux/rtl8723bs/default.nix
+++ b/pkgs/os-specific/linux/rtl8723bs/default.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
     description = "Realtek SDIO Wi-Fi driver";
     homepage = "https://github.com/hadess/rtl8723bs";
     license = stdenv.lib.licenses.gpl2;
-    platforms = [ "x86_64-linux" "i686-linux" "armv7l-linux" ];
+    platforms = stdenv.lib.platforms.linux;
     broken = ! versionAtLeast kernel.version "3.19";
     maintainers = with maintainers; [ elitak ];
   };