Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Raspberry Pi packages #156005

Merged
merged 10 commits into from
Feb 24, 2022
6 changes: 6 additions & 0 deletions nixos/modules/installer/sd-card/sd-image-aarch64.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
[pi3]
kernel=u-boot-rpi3.bin

[pi02]
kernel=u-boot-rpi3.bin

[pi4]
kernel=u-boot-rpi4.bin
enable_gic=1
Expand All @@ -33,6 +36,9 @@
# what the pi3 firmware does by default.
disable_overscan=1

# Supported in newer board revisions
arm_boost=1

[all]
# Boot in 64-bit mode.
arm_64bit=1
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/libraries/libraspberrypi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

stdenv.mkDerivation rec {
pname = "libraspberrypi";
version = "unstable-2021-06-23";
version = "unstable-2021-10-25";

src = fetchFromGitHub {
owner = "raspberrypi";
repo = "userland";
rev = "97bc8180ad682b004ea224d1db7b8e108eda4397";
sha256 = "0cnjc7w8ynayj90vlpl13xzm9izd8m5b4cvrq52si9vc6wlm4in5";
rev = "0093675e4aa6e152a3ffc318b51a124e96eb287b";
sha256 = "qpooQy9k2UZ94KaqlFwurV+tt0GrBSRffGdlvMcn1XU=";
};

patches = [
Expand Down
16 changes: 16 additions & 0 deletions pkgs/misc/uboot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,28 @@ in {
defconfig = "rpi_3_32b_defconfig";
extraMeta.platforms = ["armv7l-linux"];
filesToInstall = ["u-boot.bin"];
extraPatches = [
# Remove when updating to 2022.01
# https://patchwork.ozlabs.org/project/uboot/list/?series=273129&archive=both&state=*
(fetchpatch {
url = "https://patchwork.ozlabs.org/series/273129/mbox/";
sha256 = "sha256-/Gu7RNvBNYCGqdFRzQ11qPDDxgGVpwKYYw1CpumIGfU=";
})
];
};

ubootRaspberryPi3_64bit = buildUBoot {
defconfig = "rpi_3_defconfig";
extraMeta.platforms = ["aarch64-linux"];
filesToInstall = ["u-boot.bin"];
extraPatches = [
# Remove when updating to 2022.01
# https://patchwork.ozlabs.org/project/uboot/list/?series=273129&archive=both&state=*
(fetchpatch {
url = "https://patchwork.ozlabs.org/series/273129/mbox/";
sha256 = "sha256-/Gu7RNvBNYCGqdFRzQ11qPDDxgGVpwKYYw1CpumIGfU=";
})
];
};

ubootRaspberryPi4_32bit = buildUBoot {
Expand Down
11 changes: 6 additions & 5 deletions pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

stdenv.mkDerivation {
pname = "raspberrypi-wireless-firmware";
version = "2021-06-28";
version = "2021-11-02";

srcs = [
(fetchFromGitHub {
Expand All @@ -16,8 +16,8 @@ stdenv.mkDerivation {
name = "firmware-nonfree";
owner = "RPi-Distro";
repo = "firmware-nonfree";
rev = "00de3194a96397c913786945ac0af1fd6fbec45b";
sha256 = "1xnr364dkiq6gmr21lcrj23hwc0g9y5qad8dm2maij647bgzp07r";
rev = "54ffdd6e2ea6055d46656b78e148fe7def3ec9d8";
sha256 = "4WTrs/tUyOugufRrrh0qsEmhPclQD64ypYysxsnOyS8=";
})
];

Expand All @@ -32,7 +32,8 @@ stdenv.mkDerivation {
mkdir -p "$out/lib/firmware/brcm"

# Wifi firmware
for filename in firmware-nonfree/brcm/brcmfmac434??-sdio.*; do
shopt -s extglob
for filename in firmware-nonfree/brcm/brcmfmac434??{,s}-sdio.*; do
cp "$filename" "$out/lib/firmware/brcm"
done

Expand All @@ -43,7 +44,7 @@ stdenv.mkDerivation {

outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "0a54gyrq6jfxxvimaa4yjfiyfwf7wv58v0a32l74yrzyarr3ldby";
outputHash = "l+7VOq7CV5QA8/FWjMBGDcxq8Qe7NFf6E2Y42htZEgE=";

meta = with lib; {
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ let
in
stdenv.mkDerivation {
pname = "raspberrypi-armstubs";
version = "2021-07-05";
version = "2021-11-01";

src = fetchFromGitHub {
owner = "raspberrypi";
repo = "tools";
rev = "2e59fc67d465510179155973d2b959e50a440e47";
sha256 = "1ysdl4qldy6ldf8cm1igxjisi14xl3s2pi6cnqzpxb38sgihb1vy";
rev = "13474ee775d0c5ec8a7da4fb0a9fa84187abfc87";
sha256 = "s/RPMIpQSznoQfchAP9gpO7I2uuTsOV0Ep4vVz7i2o4=";
};

NIX_CFLAGS_COMPILE = [
Expand Down
18 changes: 9 additions & 9 deletions pkgs/os-specific/linux/firmware/raspberrypi/default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{ lib, stdenvNoCC, fetchFromGitHub }:
{ lib, stdenvNoCC, fetchurl, unzip }:

stdenvNoCC.mkDerivation rec {
# NOTE: this should be updated with linux_rpi
pname = "raspberrypi-firmware";
version = "1.20210805";
version = "1.20220118";

src = fetchFromGitHub {
owner = "raspberrypi";
repo = "firmware";
rev = version;
sha256 = "1nndhjv4il42yw3pq8ni3r4nlp1m0r229fadrf4f9v51mgcg11i1";
src = fetchurl {
url = "https://github.com/raspberrypi/firmware/archive/${version}.zip";
sha256 = "sha256-98rbwKIuB7vb4MWbFCr7TYsvJB0HzPdH8Tw0+bktK/M=";
};

nativeBuildInputs = [ unzip ];

installPhase = ''
mkdir -p $out/share/raspberrypi/boot
cp -R boot/* $out/share/raspberrypi/boot
mkdir -p $out/share/raspberrypi/
mv boot "$out/share/raspberrypi/"
'';

dontConfigure = true;
Expand Down
10 changes: 6 additions & 4 deletions pkgs/os-specific/linux/kernel/linux-rpi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

let
# NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
modDirVersion = "5.10.52";
tag = "1.20210805";
modDirVersion = "5.10.92";
tag = "1.20220118";
rev = "650082a559a570d6c9d2739ecc62843d6f951059";
in
lib.overrideDerivation (buildLinux (args // {
version = "${modDirVersion}-${tag}";
Expand All @@ -12,8 +13,8 @@ lib.overrideDerivation (buildLinux (args // {
src = fetchFromGitHub {
owner = "raspberrypi";
repo = "linux";
rev = tag;
sha256 = "1j71xblflslfi4c3zx2srw6fahnhp3bjx4yjfqrp39kzaa41ij0b";
inherit rev;
sha256 = "sha256-OSDx9dzqm8JnLUvdiv1aKqhRz80uWqfjXLd7m6ycXME=";
};

defconfig = {
Expand Down Expand Up @@ -75,6 +76,7 @@ lib.overrideDerivation (buildLinux (args // {
'' + lib.optionalString (lib.elem stdenv.hostPlatform.system ["armv7l-linux"]) ''
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
'' + lib.optionalString (lib.elem stdenv.hostPlatform.system ["armv7l-linux" "aarch64-linux"]) ''
copyDTB bcm2710-rpi-zero-2.dtb bcm2837-rpi-zero-2.dtb
copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
copyDTB bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-a-plus.dtb
copyDTB bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-b-plus.dtb
Expand Down
13 changes: 9 additions & 4 deletions pkgs/os-specific/linux/raspberrypi-eeprom/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
}:
stdenvNoCC.mkDerivation rec {
pname = "raspberrypi-eeprom";
version = "2021.04.29-138a1";
version = "2021.12.02";
# From 3fdf703f3f7bbe57eacceada3b558031229a34b0 Mon Sep 17 00:00:00 2001
# From: Peter Harper <[email protected]>
# Date: Mon, 13 Dec 2021 11:56:11 +0000
# Subject: [PATCH] 2021-12-02: Promote the 2021-12-02 beta release to LATEST/STABLE
commit = "3fdf703f3f7bbe57eacceada3b558031229a34b0";

src = fetchFromGitHub {
owner = "raspberrypi";
repo = "rpi-eeprom";
rev = "v${version}";
sha256 = "sha256-nzAMPa4gqCAcROFa7z34IoMA3aoMHX9fYCsPFde9dac=";
rev = commit;
sha256 = "sha256-JTL2ziOkT0tnOrOS08ttNtxj3qegsacP73xZBVur7xM=";
};

buildInputs = [ python3 ];
Expand All @@ -26,7 +31,7 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin $out/share/rpi-eeprom

cp rpi-eeprom-config rpi-eeprom-update $out/bin
cp rpi-eeprom-config rpi-eeprom-update rpi-eeprom-digest $out/bin
cp -r firmware/{beta,critical,old,stable} $out/share/rpi-eeprom
cp -P firmware/default firmware/latest $out/share/rpi-eeprom
'';
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ mapAliases ({
linuxPackages_5_4 = linuxKernel.packages.linux_5_4;
linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14;
linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;
linuxPackages_rpi02w = linuxKernel.packages.linux_rpi3;
linuxPackages_rpi1 = linuxKernel.packages.linux_rpi1;
linuxPackages_rpi2 = linuxKernel.packages.linux_rpi2;
linuxPackages_rpi3 = linuxKernel.packages.linux_rpi3;
Expand All @@ -641,6 +642,7 @@ mapAliases ({
linux_5_4 = linuxKernel.kernels.linux_5_4;
linux_mptcp_95 = linuxKernel.kernels.linux_mptcp_95;
linux_rpi0 = linuxKernel.kernels.linux_rpi1;
linux_rpi02w = linuxKernel.kernels.linux_rpi3;
linux_rpi1 = linuxKernel.kernels.linux_rpi1;
linux_rpi2 = linuxKernel.kernels.linux_rpi2;
linux_rpi3 = linuxKernel.kernels.linux_rpi3;
Expand Down