diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2018-05-24 23:03:42 -0400 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-07-12 17:02:32 +0300 |
commit | 7c763118b4ff79fe74085309a0ae0c6b53fb7c93 (patch) | |
tree | 034395c5ee52ff6cc1436c979f5a82147c72928e | |
parent | d7bfd04301de8fb893c4ee85bcd9b0ece46836a4 (diff) |
raspberrypiWirelessFirmware: init
-rw-r--r-- | nixos/modules/hardware/all-firmware.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix | 49 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 53 insertions, 1 deletions
diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index b61acf1815d9..e978ec6b40ad 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -38,7 +38,8 @@ in { firmwareLinuxNonfree intel2200BGFirmware rtl8192su-firmware - ] ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ + ] ++ optional (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) raspberrypiWirelessFirmware + ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware ]; }) diff --git a/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix new file mode 100644 index 000000000000..0918279cc9a9 --- /dev/null +++ b/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "raspberrypi-wireless-firmware-${version}"; + version = "2018-05-30"; + + srcs = [ + (fetchurl { + url = "https://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware/bluez-firmware_1.2-3+rpt5.debian.tar.xz"; + sha256 = "06zpyrz6frkgjy26hr3998klnhjdqxwashgjgvj9rgbcqy70nkxg"; + }) + (fetchurl { + url = "https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20161130-3+rpt3_all.deb"; + sha256 = "10l74ac28baprnsiylf2vy4pkxgb3crixid90ngs6si9smm7rn6z"; + }) + ]; + + sourceRoot = "."; + dontBuild = true; + # Firmware blobs do not need fixing and should not be modified + dontFixup = true; + + # Unpack the debian package + unpackCmd = '' + if ! [[ "$curSrc" =~ \.deb$ ]]; then return 1; fi + ar -xf "$curSrc" + tar -xf data.tar.xz + ''; + + installPhase = '' + mkdir -p "$out/lib/firmware/brcm" + + # Wifi firmware + for filename in lib/firmware/brcm/brcmfmac434??-sdio.*; do + cp "$filename" "$out/lib/firmware/brcm" + done + + # Bluetooth firmware + cp broadcom/*.hcd "$out/lib/firmware/brcm" + ''; + + meta = with stdenv.lib; { + description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3 and Zero W"; + homepage = https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/; + license = licenses.unfreeRedistributableFirmware; + platforms = platforms.linux; + maintainers = with maintainers; [ lopsided98 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7423073e738a..ba3d88ed92d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14301,6 +14301,8 @@ with pkgs; radeontop = callPackage ../os-specific/linux/radeontop { }; raspberrypifw = callPackage ../os-specific/linux/firmware/raspberrypi {}; + raspberrypiWirelessFirmware = callPackage ../os-specific/linux/firmware/raspberrypi-wireless { }; + raspberrypi-tools = callPackage ../os-specific/linux/firmware/raspberrypi/tools.nix {}; regionset = callPackage ../os-specific/linux/regionset { }; |