Merge pull request #156005 from zhaofengli/pi02

Update Raspberry Pi packages
This commit is contained in:
Samuel Dionne-Riel 2022-02-24 15:05:23 -05:00 committed by GitHub
commit 0adf99aee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 60 additions and 28 deletions

View File

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

View File

@ -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 = [

View File

@ -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 {

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation {
pname = "raspberrypi-wireless-firmware";
version = "2021-06-28";
version = "2021-11-02";
srcs = [
(fetchFromGitHub {
@ -16,8 +16,8 @@ stdenv.mkDerivation {
name = "firmware-nonfree";
owner = "RPi-Distro";
repo = "firmware-nonfree";
rev = "00de3194a96397c913786945ac0af1fd6fbec45b";
sha256 = "1xnr364dkiq6gmr21lcrj23hwc0g9y5qad8dm2maij647bgzp07r";
rev = "54ffdd6e2ea6055d46656b78e148fe7def3ec9d8";
sha256 = "4WTrs/tUyOugufRrrh0qsEmhPclQD64ypYysxsnOyS8=";
})
];
@ -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
@ -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";

View File

@ -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 = [

View File

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

View File

@ -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}";
@ -12,8 +13,8 @@ lib.overrideDerivation (buildLinux (args // {
src = fetchFromGitHub {
owner = "raspberrypi";
repo = "linux";
rev = tag;
sha256 = "1j71xblflslfi4c3zx2srw6fahnhp3bjx4yjfqrp39kzaa41ij0b";
inherit rev;
sha256 = "sha256-OSDx9dzqm8JnLUvdiv1aKqhRz80uWqfjXLd7m6ycXME=";
};
defconfig = {
@ -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

View File

@ -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 <peter.harper@raspberrypi.com>
# 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 ];
@ -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
'';

View File

@ -633,6 +633,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;
@ -649,6 +650,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;