raspberry-pi."4": add assertion and update some source comments

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2023-05-12 17:57:39 +02:00
parent 1ffd9949ee
commit 40a9f0ed77
No known key found for this signature in database
GPG key ID: 074048E893713170
3 changed files with 13 additions and 4 deletions

View file

@ -16,8 +16,9 @@ in
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# This overlay was originally taken from: # This overlay was originally taken from:
# https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts
# The only modification made was to change the compatible field to bcm2711 # The only modification made was to change the compatible field to bcm2711
# this is the same as for the 5.15.y kernel
{ {
name = "rpi-backlight-overlay"; name = "rpi-backlight-overlay";
dtsText = '' dtsText = ''

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs, config, ... }:
{ {
imports = [ imports = [
@ -34,6 +34,14 @@
hardware.deviceTree.filter = "bcm2711-rpi-*.dtb"; hardware.deviceTree.filter = "bcm2711-rpi-*.dtb";
assertions = [
{
assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1");
message = "This version of raspberry pi 4 dts overlays requires a newer kernel version (>=6.1). Please upgrade nixpkgs for this system.";
}
];
# Required for the Wireless firmware # Required for the Wireless firmware
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
} }

View file

@ -31,7 +31,7 @@ in
hardware.deviceTree = { hardware.deviceTree = {
overlays = [ overlays = [
# Equivalent to: # Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/cma-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/cma-overlay.dts
{ {
name = "rpi4-cma-overlay"; name = "rpi4-cma-overlay";
dtsText = '' dtsText = ''
@ -52,7 +52,7 @@ in
''; '';
} }
# Equivalent to: # Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
{ {
name = "rpi4-vc4-fkms-v3d-overlay"; name = "rpi4-vc4-fkms-v3d-overlay";
dtsText = '' dtsText = ''