mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #156005 from zhaofengli/pi02
Update Raspberry Pi packages
This commit is contained in:
commit
0adf99aee4
9 changed files with 60 additions and 28 deletions
|
@ -24,6 +24,9 @@
|
||||||
[pi3]
|
[pi3]
|
||||||
kernel=u-boot-rpi3.bin
|
kernel=u-boot-rpi3.bin
|
||||||
|
|
||||||
|
[pi02]
|
||||||
|
kernel=u-boot-rpi3.bin
|
||||||
|
|
||||||
[pi4]
|
[pi4]
|
||||||
kernel=u-boot-rpi4.bin
|
kernel=u-boot-rpi4.bin
|
||||||
enable_gic=1
|
enable_gic=1
|
||||||
|
@ -33,6 +36,9 @@
|
||||||
# what the pi3 firmware does by default.
|
# what the pi3 firmware does by default.
|
||||||
disable_overscan=1
|
disable_overscan=1
|
||||||
|
|
||||||
|
# Supported in newer board revisions
|
||||||
|
arm_boost=1
|
||||||
|
|
||||||
[all]
|
[all]
|
||||||
# Boot in 64-bit mode.
|
# Boot in 64-bit mode.
|
||||||
arm_64bit=1
|
arm_64bit=1
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libraspberrypi";
|
pname = "libraspberrypi";
|
||||||
version = "unstable-2021-06-23";
|
version = "unstable-2021-10-25";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "raspberrypi";
|
owner = "raspberrypi";
|
||||||
repo = "userland";
|
repo = "userland";
|
||||||
rev = "97bc8180ad682b004ea224d1db7b8e108eda4397";
|
rev = "0093675e4aa6e152a3ffc318b51a124e96eb287b";
|
||||||
sha256 = "0cnjc7w8ynayj90vlpl13xzm9izd8m5b4cvrq52si9vc6wlm4in5";
|
sha256 = "qpooQy9k2UZ94KaqlFwurV+tt0GrBSRffGdlvMcn1XU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -395,12 +395,28 @@ in {
|
||||||
defconfig = "rpi_3_32b_defconfig";
|
defconfig = "rpi_3_32b_defconfig";
|
||||||
extraMeta.platforms = ["armv7l-linux"];
|
extraMeta.platforms = ["armv7l-linux"];
|
||||||
filesToInstall = ["u-boot.bin"];
|
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 {
|
ubootRaspberryPi3_64bit = buildUBoot {
|
||||||
defconfig = "rpi_3_defconfig";
|
defconfig = "rpi_3_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
filesToInstall = ["u-boot.bin"];
|
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 {
|
ubootRaspberryPi4_32bit = buildUBoot {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "raspberrypi-wireless-firmware";
|
pname = "raspberrypi-wireless-firmware";
|
||||||
version = "2021-06-28";
|
version = "2021-11-02";
|
||||||
|
|
||||||
srcs = [
|
srcs = [
|
||||||
(fetchFromGitHub {
|
(fetchFromGitHub {
|
||||||
|
@ -16,8 +16,8 @@ stdenv.mkDerivation {
|
||||||
name = "firmware-nonfree";
|
name = "firmware-nonfree";
|
||||||
owner = "RPi-Distro";
|
owner = "RPi-Distro";
|
||||||
repo = "firmware-nonfree";
|
repo = "firmware-nonfree";
|
||||||
rev = "00de3194a96397c913786945ac0af1fd6fbec45b";
|
rev = "54ffdd6e2ea6055d46656b78e148fe7def3ec9d8";
|
||||||
sha256 = "1xnr364dkiq6gmr21lcrj23hwc0g9y5qad8dm2maij647bgzp07r";
|
sha256 = "4WTrs/tUyOugufRrrh0qsEmhPclQD64ypYysxsnOyS8=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@ stdenv.mkDerivation {
|
||||||
mkdir -p "$out/lib/firmware/brcm"
|
mkdir -p "$out/lib/firmware/brcm"
|
||||||
|
|
||||||
# Wifi firmware
|
# 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"
|
cp "$filename" "$out/lib/firmware/brcm"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -43,7 +44,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHash = "0a54gyrq6jfxxvimaa4yjfiyfwf7wv58v0a32l74yrzyarr3ldby";
|
outputHash = "l+7VOq7CV5QA8/FWjMBGDcxq8Qe7NFf6E2Y42htZEgE=";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
||||||
|
|
|
@ -5,13 +5,13 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "raspberrypi-armstubs";
|
pname = "raspberrypi-armstubs";
|
||||||
version = "2021-07-05";
|
version = "2021-11-01";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "raspberrypi";
|
owner = "raspberrypi";
|
||||||
repo = "tools";
|
repo = "tools";
|
||||||
rev = "2e59fc67d465510179155973d2b959e50a440e47";
|
rev = "13474ee775d0c5ec8a7da4fb0a9fa84187abfc87";
|
||||||
sha256 = "1ysdl4qldy6ldf8cm1igxjisi14xl3s2pi6cnqzpxb38sgihb1vy";
|
sha256 = "s/RPMIpQSznoQfchAP9gpO7I2uuTsOV0Ep4vVz7i2o4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = [
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
{ lib, stdenvNoCC, fetchurl, unzip }:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
# NOTE: this should be updated with linux_rpi
|
# NOTE: this should be updated with linux_rpi
|
||||||
pname = "raspberrypi-firmware";
|
pname = "raspberrypi-firmware";
|
||||||
version = "1.20210805";
|
version = "1.20220118";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchurl {
|
||||||
owner = "raspberrypi";
|
url = "https://github.com/raspberrypi/firmware/archive/${version}.zip";
|
||||||
repo = "firmware";
|
sha256 = "sha256-98rbwKIuB7vb4MWbFCr7TYsvJB0HzPdH8Tw0+bktK/M=";
|
||||||
rev = version;
|
|
||||||
sha256 = "1nndhjv4il42yw3pq8ni3r4nlp1m0r229fadrf4f9v51mgcg11i1";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ unzip ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/raspberrypi/boot
|
mkdir -p $out/share/raspberrypi/
|
||||||
cp -R boot/* $out/share/raspberrypi/boot
|
mv boot "$out/share/raspberrypi/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
# NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
|
# NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
|
||||||
modDirVersion = "5.10.52";
|
modDirVersion = "5.10.92";
|
||||||
tag = "1.20210805";
|
tag = "1.20220118";
|
||||||
|
rev = "650082a559a570d6c9d2739ecc62843d6f951059";
|
||||||
in
|
in
|
||||||
lib.overrideDerivation (buildLinux (args // {
|
lib.overrideDerivation (buildLinux (args // {
|
||||||
version = "${modDirVersion}-${tag}";
|
version = "${modDirVersion}-${tag}";
|
||||||
|
@ -12,8 +13,8 @@ lib.overrideDerivation (buildLinux (args // {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "raspberrypi";
|
owner = "raspberrypi";
|
||||||
repo = "linux";
|
repo = "linux";
|
||||||
rev = tag;
|
inherit rev;
|
||||||
sha256 = "1j71xblflslfi4c3zx2srw6fahnhp3bjx4yjfqrp39kzaa41ij0b";
|
sha256 = "sha256-OSDx9dzqm8JnLUvdiv1aKqhRz80uWqfjXLd7m6ycXME=";
|
||||||
};
|
};
|
||||||
|
|
||||||
defconfig = {
|
defconfig = {
|
||||||
|
@ -75,6 +76,7 @@ lib.overrideDerivation (buildLinux (args // {
|
||||||
'' + lib.optionalString (lib.elem stdenv.hostPlatform.system ["armv7l-linux"]) ''
|
'' + lib.optionalString (lib.elem stdenv.hostPlatform.system ["armv7l-linux"]) ''
|
||||||
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
|
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
|
||||||
'' + lib.optionalString (lib.elem stdenv.hostPlatform.system ["armv7l-linux" "aarch64-linux"]) ''
|
'' + 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.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-a-plus.dtb
|
||||||
copyDTB bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-b-plus.dtb
|
copyDTB bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-b-plus.dtb
|
||||||
|
|
|
@ -3,13 +3,18 @@
|
||||||
}:
|
}:
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "raspberrypi-eeprom";
|
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 {
|
src = fetchFromGitHub {
|
||||||
owner = "raspberrypi";
|
owner = "raspberrypi";
|
||||||
repo = "rpi-eeprom";
|
repo = "rpi-eeprom";
|
||||||
rev = "v${version}";
|
rev = commit;
|
||||||
sha256 = "sha256-nzAMPa4gqCAcROFa7z34IoMA3aoMHX9fYCsPFde9dac=";
|
sha256 = "sha256-JTL2ziOkT0tnOrOS08ttNtxj3qegsacP73xZBVur7xM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python3 ];
|
buildInputs = [ python3 ];
|
||||||
|
@ -26,7 +31,7 @@ stdenvNoCC.mkDerivation rec {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/rpi-eeprom
|
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 -r firmware/{beta,critical,old,stable} $out/share/rpi-eeprom
|
||||||
cp -P firmware/default firmware/latest $out/share/rpi-eeprom
|
cp -P firmware/default firmware/latest $out/share/rpi-eeprom
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -633,6 +633,7 @@ mapAliases ({
|
||||||
linuxPackages_5_4 = linuxKernel.packages.linux_5_4;
|
linuxPackages_5_4 = linuxKernel.packages.linux_5_4;
|
||||||
linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14;
|
linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14;
|
||||||
linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;
|
linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;
|
||||||
|
linuxPackages_rpi02w = linuxKernel.packages.linux_rpi3;
|
||||||
linuxPackages_rpi1 = linuxKernel.packages.linux_rpi1;
|
linuxPackages_rpi1 = linuxKernel.packages.linux_rpi1;
|
||||||
linuxPackages_rpi2 = linuxKernel.packages.linux_rpi2;
|
linuxPackages_rpi2 = linuxKernel.packages.linux_rpi2;
|
||||||
linuxPackages_rpi3 = linuxKernel.packages.linux_rpi3;
|
linuxPackages_rpi3 = linuxKernel.packages.linux_rpi3;
|
||||||
|
@ -649,6 +650,7 @@ mapAliases ({
|
||||||
linux_5_4 = linuxKernel.kernels.linux_5_4;
|
linux_5_4 = linuxKernel.kernels.linux_5_4;
|
||||||
linux_mptcp_95 = linuxKernel.kernels.linux_mptcp_95;
|
linux_mptcp_95 = linuxKernel.kernels.linux_mptcp_95;
|
||||||
linux_rpi0 = linuxKernel.kernels.linux_rpi1;
|
linux_rpi0 = linuxKernel.kernels.linux_rpi1;
|
||||||
|
linux_rpi02w = linuxKernel.kernels.linux_rpi3;
|
||||||
linux_rpi1 = linuxKernel.kernels.linux_rpi1;
|
linux_rpi1 = linuxKernel.kernels.linux_rpi1;
|
||||||
linux_rpi2 = linuxKernel.kernels.linux_rpi2;
|
linux_rpi2 = linuxKernel.kernels.linux_rpi2;
|
||||||
linux_rpi3 = linuxKernel.kernels.linux_rpi3;
|
linux_rpi3 = linuxKernel.kernels.linux_rpi3;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue