Merge branch 'nix-community:master' into master

This commit is contained in:
Merten Falk 2025-03-14 10:25:17 +01:00 committed by GitHub
commit cb526994b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 49 deletions

23
.github/workflows/update-flake-lock.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: update-flake-lock
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@a2bbe0274e3a0c4194390a1e445f734c597ebc37 # v24

36
flake.lock generated
View file

@ -58,11 +58,10 @@
"rpi-bluez-firmware-src": "rpi-bluez-firmware-src", "rpi-bluez-firmware-src": "rpi-bluez-firmware-src",
"rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src", "rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src",
"rpi-firmware-src": "rpi-firmware-src", "rpi-firmware-src": "rpi-firmware-src",
"rpi-linux-6_12_11-src": "rpi-linux-6_12_11-src", "rpi-linux-6_12_17-src": "rpi-linux-6_12_17-src",
"rpi-linux-6_6_67-src": "rpi-linux-6_6_67-src", "rpi-linux-6_6_78-src": "rpi-linux-6_6_78-src",
"rpi-linux-stable-src": "rpi-linux-stable-src", "rpi-linux-stable-src": "rpi-linux-stable-src",
"rpicam-apps-src": "rpicam-apps-src", "rpicam-apps-src": "rpicam-apps-src"
"u-boot-src": "u-boot-src"
} }
}, },
"rpi-bluez-firmware-src": { "rpi-bluez-firmware-src": {
@ -116,14 +115,14 @@
"type": "github" "type": "github"
} }
}, },
"rpi-linux-6_12_11-src": { "rpi-linux-6_12_17-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1738149451, "lastModified": 1740765145,
"narHash": "sha256-NGmZcaC2vlewTEV/p0z2+6PWnHB229dkGui45kI8HOE=", "narHash": "sha256-hoCsGc4+RC/2LmxDtswLBL5ZhWlw4vSiL4Vkl39r2MU=",
"owner": "raspberrypi", "owner": "raspberrypi",
"repo": "linux", "repo": "linux",
"rev": "fab655ee33e6d647da5996c5548cfd7d43447a53", "rev": "5985ce32e511f4e8279a841a1b06a8c7d972b386",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -133,14 +132,14 @@
"type": "github" "type": "github"
} }
}, },
"rpi-linux-6_6_67-src": { "rpi-linux-6_6_78-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1734790986, "lastModified": 1740503700,
"narHash": "sha256-q9swM2TmmuzbUuQnbLZk5PseKWD7/SNPwtth6bpGIqE=", "narHash": "sha256-Y8+ot4Yi3UKwlZK3ap15rZZ16VZDvmeFkD46+6Ku7bE=",
"owner": "raspberrypi", "owner": "raspberrypi",
"repo": "linux", "repo": "linux",
"rev": "811ff707533bcd67cdcd368bbd46223082009b12", "rev": "2e071057fded90e789c0101498e45a1778be93fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -183,19 +182,6 @@
"repo": "rpicam-apps", "repo": "rpicam-apps",
"type": "github" "type": "github"
} }
},
"u-boot-src": {
"flake": false,
"locked": {
"lastModified": 1719857238,
"narHash": "sha256-mJ2TBy0Y5ZtcGFgtU5RKr0UDUp5FWzojbFb+o/ebRJU=",
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
},
"original": {
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -3,19 +3,15 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
u-boot-src = {
flake = false;
url = "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2";
};
rpi-linux-stable-src = { rpi-linux-stable-src = {
flake = false; flake = false;
url = "github:raspberrypi/linux/stable_20241008"; url = "github:raspberrypi/linux/stable_20241008";
}; };
rpi-linux-6_6_67-src = { rpi-linux-6_6_78-src = {
flake = false; flake = false;
url = "github:raspberrypi/linux/rpi-6.6.y"; url = "github:raspberrypi/linux/rpi-6.6.y";
}; };
rpi-linux-6_12_11-src = { rpi-linux-6_12_17-src = {
flake = false; flake = false;
url = "github:raspberrypi/linux/rpi-6.12.y"; url = "github:raspberrypi/linux/rpi-6.12.y";
}; };

View file

@ -1,7 +1,6 @@
{ u-boot-src { rpi-linux-stable-src
, rpi-linux-stable-src , rpi-linux-6_6_78-src
, rpi-linux-6_6_67-src , rpi-linux-6_12_17-src
, rpi-linux-6_12_11-src
, rpi-firmware-src , rpi-firmware-src
, rpi-firmware-nonfree-src , rpi-firmware-nonfree-src
, rpi-bluez-firmware-src , rpi-bluez-firmware-src
@ -11,9 +10,9 @@ final: prev:
let let
versions = { versions = {
v6_6_51.src = rpi-linux-stable-src; v6_6_51.src = rpi-linux-stable-src;
v6_6_67.src = rpi-linux-6_6_67-src; v6_6_78.src = rpi-linux-6_6_78-src;
v6_12_11 = { v6_12_17 = {
src = rpi-linux-6_12_11-src; src = rpi-linux-6_12_17-src;
patches = [ patches = [
{ {
name = "remove-readme-target.patch"; name = "remove-readme-target.patch";
@ -63,6 +62,7 @@ let
features.efiBootStub = false; features.efiBootStub = false;
kernelPatches = kernelPatches =
if kernel ? "patches" then kernel.patches else [ ]; if kernel ? "patches" then kernel.patches else [ ];
ignoreConfigErrors = true;
}).overrideAttrs }).overrideAttrs
(oldAttrs: { (oldAttrs: {
postConfigure = '' postConfigure = ''
@ -83,14 +83,10 @@ in
compressFirmwareZstd = x: x; compressFirmwareZstd = x: x;
# provide generic rpi arm64 u-boot # provide generic rpi arm64 u-boot
uboot-rpi-arm64 = final.buildUBoot rec { uboot-rpi-arm64 = final.buildUBoot {
defconfig = "rpi_arm64_defconfig"; defconfig = "rpi_arm64_defconfig";
extraMeta.platforms = [ "aarch64-linux" ]; extraMeta.platforms = [ "aarch64-linux" ];
filesToInstall = [ "u-boot.bin" ]; filesToInstall = [ "u-boot.bin" ];
version = "2024.04";
patches = [ ];
makeFlags = [ ];
src = u-boot-src;
# In raspberry pi sbcs the firmware manipulates the device tree in # In raspberry pi sbcs the firmware manipulates the device tree in
# a variety of ways before handing it off to the linux kernel. [1] # a variety of ways before handing it off to the linux kernel. [1]
# Since we have installed u-boot in place of a linux kernel we may # Since we have installed u-boot in place of a linux kernel we may
@ -118,7 +114,7 @@ in
# rpi kernels and firmware are available at # rpi kernels and firmware are available at
# `pkgs.rpi-kernels.<VERSION>.<BOARD>'. # `pkgs.rpi-kernels.<VERSION>.<BOARD>'.
# #
# For example: `pkgs.rpi-kernels.v6_6_67.bcm2712' # For example: `pkgs.rpi-kernels.v6_6_78.bcm2712'
rpi-kernels = rpi-kernels ( rpi-kernels = rpi-kernels (
final.lib.cartesianProduct final.lib.cartesianProduct
{ board = boards; version = (builtins.attrNames versions); } { board = boards; version = (builtins.attrNames versions); }

View file

@ -77,6 +77,18 @@ in
package = mkPackageOption pkgs "uboot-rpi-arm64" { }; package = mkPackageOption pkgs "uboot-rpi-arm64" { };
}; };
serial-console = {
enable = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable a console on serial0.
Corresponds with raspi-config's setting
"Would you like a login shell to be accessible over serial?"
'';
};
};
}; };
}; };
@ -319,11 +331,14 @@ in
boot = { boot = {
kernelParams = kernelParams =
if cfg.uboot.enable then [ ] if cfg.uboot.enable then [ ]
else [ else builtins.concatLists [
"console=tty1" [ "console=tty1" ]
# https://github.com/raspberrypi/firmware/issues/1539#issuecomment-784498108 (if cfg.serial-console.enable then [
"console=serial0,115200n8" # https://github.com/raspberrypi/firmware/issues/1539#issuecomment-784498108
"init=/sbin/init" "console=serial0,115200n8"
] else [ ]
)
[ "init=/sbin/init" ]
]; ];
initrd = { initrd = {
availableKernelModules = [ availableKernelModules = [