mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-12-11 11:31:04 +01:00
organize kernels and firmware
This commit is contained in:
parent
28498601bb
commit
9cac87a79c
8 changed files with 212 additions and 127 deletions
56
overlay/raspberrypi-wireless-firmware/5.10.36.nix
Normal file
56
overlay/raspberrypi-wireless-firmware/5.10.36.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "raspberrypi-wireless-firmware";
|
||||
version = "2021-06-28";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
name = "bluez-firmware";
|
||||
owner = "RPi-Distro";
|
||||
repo = "bluez-firmware";
|
||||
rev = "e7fd166981ab4bb9a36c2d1500205a078a35714d";
|
||||
sha256 = "1dkg8mzn7n4afi50ibrda2s33nw2qj52jjjdv9w560q601gms47b";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
name = "firmware-nonfree";
|
||||
owner = "RPi-Distro";
|
||||
repo = "firmware-nonfree";
|
||||
rev = "00de3194a96397c913786945ac0af1fd6fbec45b";
|
||||
sha256 = "1xnr364dkiq6gmr21lcrj23hwc0g9y5qad8dm2maij647bgzp07r";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
dontBuild = true;
|
||||
# Firmware blobs do not need fixing and should not be modified
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/lib/firmware/brcm"
|
||||
|
||||
# Wifi firmware
|
||||
for filename in firmware-nonfree/brcm/brcmfmac434??-sdio.*; do
|
||||
cp "$filename" "$out/lib/firmware/brcm"
|
||||
done
|
||||
|
||||
# Bluetooth firmware
|
||||
cp bluez-firmware/broadcom/*.hcd "$out/lib/firmware/brcm"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0a54gyrq6jfxxvimaa4yjfiyfwf7wv58v0a32l74yrzyarr3ldby";
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
||||
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ lopsided98 ];
|
||||
};
|
||||
}
|
||||
56
overlay/raspberrypi-wireless-firmware/5.10.87.nix
Normal file
56
overlay/raspberrypi-wireless-firmware/5.10.87.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "raspberrypi-wireless-firmware";
|
||||
version = "2023-01-19";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
name = "bluez-firmware";
|
||||
owner = "RPi-Distro";
|
||||
repo = "bluez-firmware";
|
||||
rev = "9556b08ace2a1735127894642cc8ea6529c04c90";
|
||||
sha256 = "gKGK0XzNrws5REkKg/JP6SZx3KsJduu53SfH3Dichkc=";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
name = "firmware-nonfree";
|
||||
owner = "RPi-Distro";
|
||||
repo = "firmware-nonfree";
|
||||
rev = "8e349de20c8cb5d895b3568777ec53cbb333398f";
|
||||
sha256 = "45/FnaaZTEG6jLmbaXohpNpS6BEZu3DBDHqquq8ukXc=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
dontBuild = true;
|
||||
# Firmware blobs do not need fixing and should not be modified
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/lib/firmware/brcm"
|
||||
|
||||
# Wifi firmware
|
||||
cp -rv "$NIX_BUILD_TOP/firmware-nonfree/debian/config/brcm80211/." "$out/lib/firmware/"
|
||||
|
||||
# Bluetooth firmware
|
||||
cp -rv "$NIX_BUILD_TOP/bluez-firmware/broadcom/." "$out/lib/firmware/brcm"
|
||||
|
||||
# CM4 symlink must be added since it's missing from upstream
|
||||
pushd $out/lib/firmware/brcm &>/dev/null
|
||||
ln -s "./brcmfmac43455-sdio.txt" "$out/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt"
|
||||
popd &>/dev/null
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
||||
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ lopsided98 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue