diff --git a/flake.lock b/flake.lock index 81f91aa..c913fce 100644 --- a/flake.lock +++ b/flake.lock @@ -3,44 +3,44 @@ "libcamera-src": { "flake": false, "locked": { - "lastModified": 1725630279, - "narHash": "sha256-KH30jmHfxXq4j2CL7kv18DYECJRp9ECuWNPnqPZajPA=", + "lastModified": 1739434802, + "narHash": "sha256-89uo3ajxozSpM4AGVIVb5GJ70giAQeyw0duIj5PRBgo=", "owner": "raspberrypi", "repo": "libcamera", - "rev": "69a894c4adad524d3063dd027f5c4774485cf9db", + "rev": "29156679717bec7cc4784aeba3548807f2c27fca", "type": "github" }, "original": { "owner": "raspberrypi", + "ref": "v0.4.0+rpt20250213", "repo": "libcamera", - "rev": "69a894c4adad524d3063dd027f5c4774485cf9db", "type": "github" } }, "libpisp-src": { "flake": false, "locked": { - "lastModified": 1724944683, - "narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=", + "lastModified": 1740559338, + "narHash": "sha256-tHfFcNSmXLcUHhqiGRh2YZT8xioUq0zMOMZl9rjG8ys=", "owner": "raspberrypi", "repo": "libpisp", - "rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3", + "rev": "50426319aa1a9ba4672f91977429365ad4e335a2", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "v1.0.7", + "ref": "v1.2.0", "repo": "libpisp", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1736061677, - "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", + "lastModified": 1742512142, + "narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", + "rev": "7105ae3957700a9646cc4b766f5815b23ed0c682", "type": "github" }, "original": { @@ -56,22 +56,22 @@ "libpisp-src": "libpisp-src", "nixpkgs": "nixpkgs", "rpi-bluez-firmware-src": "rpi-bluez-firmware-src", + "rpi-firmware-6_14_y-src": "rpi-firmware-6_14_y-src", + "rpi-firmware-6_6_y-src": "rpi-firmware-6_6_y-src", "rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src", - "rpi-firmware-src": "rpi-firmware-src", - "rpi-linux-6_12_17-src": "rpi-linux-6_12_17-src", - "rpi-linux-6_6_78-src": "rpi-linux-6_6_78-src", - "rpi-linux-stable-src": "rpi-linux-stable-src", + "rpi-linux-6_14_y-src": "rpi-linux-6_14_y-src", + "rpi-linux-6_6_y-src": "rpi-linux-6_6_y-src", "rpicam-apps-src": "rpicam-apps-src" } }, "rpi-bluez-firmware-src": { "flake": false, "locked": { - "lastModified": 1708969706, - "narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=", + "lastModified": 1741017538, + "narHash": "sha256-t+D4VUfEIov83KV4wiKp6TqXTHXGkxg/mANi4GW7QHs=", "owner": "RPi-Distro", "repo": "bluez-firmware", - "rev": "78d6a07730e2d20c035899521ab67726dc028e1c", + "rev": "2bbfb8438e824f5f61dae3f6ebb367a6129a4d63", "type": "github" }, "original": { @@ -81,87 +81,87 @@ "type": "github" } }, - "rpi-firmware-nonfree-src": { + "rpi-firmware-6_14_y-src": { "flake": false, "locked": { - "lastModified": 1723266537, - "narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=", - "owner": "RPi-Distro", - "repo": "firmware-nonfree", - "rev": "4b356e134e8333d073bd3802d767a825adec3807", + "lastModified": 1742409477, + "narHash": "sha256-9rUNDViCyG+MMfxa0Oe2/5vjZBFKFNnyz8tvNPeU2gs=", + "owner": "raspberrypi", + "repo": "firmware", + "rev": "80f23d4be56a481938b0239d565f46c94b1f2dd4", "type": "github" }, "original": { - "owner": "RPi-Distro", - "ref": "bookworm", - "repo": "firmware-nonfree", + "owner": "raspberrypi", + "ref": "master", + "repo": "firmware", "type": "github" } }, - "rpi-firmware-src": { + "rpi-firmware-6_6_y-src": { "flake": false, "locked": { - "lastModified": 1728405098, - "narHash": "sha256-4gnK0KbqFnjBmWia9Jt2gveVWftmHrprpwBqYVqE/k0=", + "lastModified": 1741190071, + "narHash": "sha256-J2Na7yGKvRDWKC+1gFEQMuaam+4vt+RsV9FjarDgvMs=", "owner": "raspberrypi", "repo": "firmware", - "rev": "7bbb5f80d20a2335066a8781459c9f33e5eebc64", + "rev": "f9ff9c8f22a148a555a2c090af9649ad84709dc4", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "1.20241008", + "ref": "stable", "repo": "firmware", "type": "github" } }, - "rpi-linux-6_12_17-src": { + "rpi-firmware-nonfree-src": { "flake": false, "locked": { - "lastModified": 1740765145, - "narHash": "sha256-hoCsGc4+RC/2LmxDtswLBL5ZhWlw4vSiL4Vkl39r2MU=", - "owner": "raspberrypi", - "repo": "linux", - "rev": "5985ce32e511f4e8279a841a1b06a8c7d972b386", + "lastModified": 1741707399, + "narHash": "sha256-n2u6dnFGVUDfUBXR+xL+k6A78JThMJc2rDjvWblReEY=", + "owner": "RPi-Distro", + "repo": "firmware-nonfree", + "rev": "3900afffcd85198e3afab396fbf1d0abe5f76173", "type": "github" }, "original": { - "owner": "raspberrypi", - "ref": "rpi-6.12.y", - "repo": "linux", + "owner": "RPi-Distro", + "ref": "bookworm", + "repo": "firmware-nonfree", "type": "github" } }, - "rpi-linux-6_6_78-src": { + "rpi-linux-6_14_y-src": { "flake": false, "locked": { - "lastModified": 1740503700, - "narHash": "sha256-Y8+ot4Yi3UKwlZK3ap15rZZ16VZDvmeFkD46+6Ku7bE=", + "lastModified": 1742577593, + "narHash": "sha256-GN6Y5D1vuLZG8hgAHAuQXezfECmDH8EJp/hvr+hjETo=", "owner": "raspberrypi", "repo": "linux", - "rev": "2e071057fded90e789c0101498e45a1778be93fe", + "rev": "75fe69c4af1d89fd5826df3c69438c6ddcbbb306", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "rpi-6.6.y", + "ref": "rpi-6.14.y", "repo": "linux", "type": "github" } }, - "rpi-linux-stable-src": { + "rpi-linux-6_6_y-src": { "flake": false, "locked": { - "lastModified": 1728403745, - "narHash": "sha256-phCxkuO+jUGZkfzSrBq6yErQeO2Td+inIGHxctXbD5U=", + "lastModified": 1742319356, + "narHash": "sha256-gTBchqL+oBACQ6582IN68d1/tn8ZOT4uGBOxO/5bMkY=", "owner": "raspberrypi", "repo": "linux", - "rev": "5aeecea9f4a45248bcf564dec924965e066a7bfd", + "rev": "9da8d6df2051478f0ba16d73c65995955c19cb3a", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "stable_20241008", + "ref": "rpi-6.6.y", "repo": "linux", "type": "github" } @@ -169,16 +169,16 @@ "rpicam-apps-src": { "flake": false, "locked": { - "lastModified": 1727515047, - "narHash": "sha256-qCYGrcibOeGztxf+sd44lD6VAOGoUNwRqZDdAmcTa/U=", + "lastModified": 1737988296, + "narHash": "sha256-pTSHmRmGV203HjrH6MWNDEz2xLitCsILKsOYD9PgjwU=", "owner": "raspberrypi", "repo": "rpicam-apps", - "rev": "a8ccf9f3cd9df49875dfb834a2b490d41d226031", + "rev": "025ca84648c9b9d74711477bf94b05bec349f53d", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "v1.5.2", + "ref": "v1.6.0", "repo": "rpicam-apps", "type": "github" } diff --git a/flake.nix b/flake.nix index fe3fc24..5b8693e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,21 +3,21 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; - rpi-linux-stable-src = { + rpi-linux-6_6_y-src = { flake = false; - url = "github:raspberrypi/linux/stable_20241008"; + url = "github:raspberrypi/linux/rpi-6.6.y"; }; - rpi-linux-6_6_78-src = { + rpi-linux-6_14_y-src = { flake = false; - url = "github:raspberrypi/linux/rpi-6.6.y"; + url = "github:raspberrypi/linux/rpi-6.14.y"; }; - rpi-linux-6_12_17-src = { + rpi-firmware-6_6_y-src = { flake = false; - url = "github:raspberrypi/linux/rpi-6.12.y"; + url = "github:raspberrypi/firmware/stable"; }; - rpi-firmware-src = { + rpi-firmware-6_14_y-src = { flake = false; - url = "github:raspberrypi/firmware/1.20241008"; + url = "github:raspberrypi/firmware/master"; }; rpi-firmware-nonfree-src = { flake = false; @@ -29,15 +29,15 @@ }; rpicam-apps-src = { flake = false; - url = "github:raspberrypi/rpicam-apps/v1.5.2"; + url = "github:raspberrypi/rpicam-apps/v1.6.0"; }; libcamera-src = { flake = false; - url = "github:raspberrypi/libcamera/69a894c4adad524d3063dd027f5c4774485cf9db"; # v0.3.1+rpt20240906 + url = "github:raspberrypi/libcamera/v0.4.0+rpt20250213"; }; libpisp-src = { flake = false; - url = "github:raspberrypi/libpisp/v1.0.7"; + url = "github:raspberrypi/libpisp/v1.2.0"; }; }; @@ -47,15 +47,18 @@ system = "aarch64-linux"; overlays = with self.overlays; [ core libcamera ]; }; + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + lib = srcs.nixpkgs.lib; + inputs = lib.recursiveUpdate (builtins.removeAttrs srcs [ "self" ]) { inherit lock; }; in { overlays = { - core = import ./overlays (builtins.removeAttrs srcs [ "self" ]); - libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]); + core = import ./overlays inputs; + libcamera = import ./overlays/libcamera.nix inputs; }; nixosModules = { raspberry-pi = import ./rpi { - inherit pinned; + inherit pinned inputs; core-overlay = self.overlays.core; libcamera-overlay = self.overlays.libcamera; }; @@ -82,7 +85,6 @@ in { example-sd-image = self.nixosConfigurations.rpi-example.config.system.build.sdImage; - firmware = pinned.raspberrypifw; libcamera = pinned.libcamera; wireless-firmware = pinned.raspberrypiWirelessFirmware; uboot-rpi-arm64 = pinned.uboot-rpi-arm64; diff --git a/overlays/default.nix b/overlays/default.nix index b859342..c45fe21 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,7 +1,8 @@ -{ rpi-linux-stable-src -, rpi-linux-6_6_78-src -, rpi-linux-6_12_17-src -, rpi-firmware-src +{ lock +, rpi-linux-6_6_y-src +, rpi-linux-6_14_y-src +, rpi-firmware-6_6_y-src +, rpi-firmware-6_14_y-src , rpi-firmware-nonfree-src , rpi-bluez-firmware-src , ... @@ -9,20 +10,15 @@ final: prev: let versions = { - v6_6_51.src = rpi-linux-stable-src; - v6_6_78.src = rpi-linux-6_6_78-src; - v6_12_17 = { - src = rpi-linux-6_12_17-src; - patches = [ - { - name = "remove-readme-target.patch"; - patch = final.fetchpatch { - url = "https://github.com/raspberrypi/linux/commit/3c0fd51d184f1748b83d28e1113265425c19bcb5.patch"; - hash = "sha256-v7uZOmPCUp2i7NGVgjqnQYe6dEBD+aATuP/oRs9jfuk="; - }; - } - ]; + v6_6_78 = { + src = rpi-linux-6_6_y-src; + firmware = rpi-firmware-6_6_y-src; + }; + v6_14_0-rc7 = { + src = rpi-linux-6_14_y-src; + firmware = rpi-firmware-6_14_y-src; }; + }; boards = [ "bcm2711" "bcm2712" ]; @@ -33,44 +29,48 @@ let version-slug = builtins.replaceStrings [ "v" "_" ] [ "" "." ] version; in { - "${version}"."${board}" = (final.buildLinux { - modDirVersion = version-slug; - version = version-slug; - pname = "linux-rpi"; - src = kernel.src; - defconfig = "${board}_defconfig"; - structuredExtraConfig = with final.lib.kernel; { - # The perl script to generate kernel options sets unspecified - # parameters to `m` if possible [1]. This results in the - # unspecified config option KUNIT [2] getting set to `m` which - # causes DRM_VC4_KUNIT_TEST [3] to get set to `y`. - # - # This vc4 unit test fails on boot due to a null pointer - # exception with the existing config. I'm not sure why, but in - # any case, the DRM_VC4_KUNIT_TEST config option itself states - # that it is only useful for kernel developers working on the - # vc4 driver. So, I feel no need to deviate from the standard - # rpi kernel and attempt to successfully enable this test and - # other unit tests because the nixos perl script has this - # sloppy "default to m" behavior. So, I set KUNIT to `n`. - # - # [1] https://github.com/NixOS/nixpkgs/blob/85bcb95aa83be667e562e781e9d186c57a07d757/pkgs/os-specific/linux/kernel/generate-config.pl#L1-L10 - # [2] https://github.com/raspberrypi/linux/blob/1.20230405/lib/kunit/Kconfig#L5-L14 - # [3] https://github.com/raspberrypi/linux/blob/bb63dc31e48948bc2649357758c7a152210109c4/drivers/gpu/drm/vc4/Kconfig#L38-L52 - KUNIT = no; - }; - features.efiBootStub = false; - kernelPatches = - if kernel ? "patches" then kernel.patches else [ ]; - ignoreConfigErrors = true; - }).overrideAttrs - (oldAttrs: { - postConfigure = '' - # The v7 defconfig has this set to '-v7' which screws up our modDirVersion. - sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' - sed -i $buildRoot/include/config/auto.conf -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' - ''; - }); + "${version}"."${board}" = { + kernel = (final.buildLinux { + modDirVersion = version-slug; + version = version-slug; + pname = "linux-rpi"; + src = kernel.src; + defconfig = "${board}_defconfig"; + structuredExtraConfig = with final.lib.kernel; { + # The perl script to generate kernel options sets unspecified + # parameters to `m` if possible [1]. This results in the + # unspecified config option KUNIT [2] getting set to `m` which + # causes DRM_VC4_KUNIT_TEST [3] to get set to `y`. + # + # This vc4 unit test fails on boot due to a null pointer + # exception with the existing config. I'm not sure why, but in + # any case, the DRM_VC4_KUNIT_TEST config option itself states + # that it is only useful for kernel developers working on the + # vc4 driver. So, I feel no need to deviate from the standard + # rpi kernel and attempt to successfully enable this test and + # other unit tests because the nixos perl script has this + # sloppy "default to m" behavior. So, I set KUNIT to `n`. + # + # [1] https://github.com/NixOS/nixpkgs/blob/85bcb95aa83be667e562e781e9d186c57a07d757/pkgs/os-specific/linux/kernel/generate-config.pl#L1-L10 + # [2] https://github.com/raspberrypi/linux/blob/1.20230405/lib/kunit/Kconfig#L5-L14 + # [3] https://github.com/raspberrypi/linux/blob/bb63dc31e48948bc2649357758c7a152210109c4/drivers/gpu/drm/vc4/Kconfig#L38-L52 + KUNIT = no; + HID_LENOVO = no; + }; + features.efiBootStub = false; + kernelPatches = + if kernel ? "patches" then kernel.patches else [ ]; + }).overrideAttrs + (oldAttrs: { + postConfigure = '' + # The v7 defconfig has this set to '-v7' which screws up our modDirVersion. + sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' + sed -i $buildRoot/include/config/auto.conf -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' + ''; + }); + firmware = prev.raspberrypifw.overrideAttrs (oldfw: { src = kernel.firmware; }); + + }; }; rpi-kernels = builtins.foldl' (b: a: final.lib.recursiveUpdate b (rpi-kernel a)) @@ -108,13 +108,12 @@ in } ) { }; - raspberrypifw = prev.raspberrypifw.overrideAttrs (oldfw: { src = rpi-firmware-src; }); } // { # rpi kernels and firmware are available at # `pkgs.rpi-kernels..'. # - # For example: `pkgs.rpi-kernels.v6_6_78.bcm2712' + # Check all available versions/boards with: nix flake show rpi-kernels = rpi-kernels ( final.lib.cartesianProduct { board = boards; version = (builtins.attrNames versions); } diff --git a/overlays/libcamera.nix b/overlays/libcamera.nix index 878fb28..9ed4bab 100644 --- a/overlays/libcamera.nix +++ b/overlays/libcamera.nix @@ -1,6 +1,7 @@ { rpicam-apps-src , libcamera-src , libpisp-src +, lock , ... }: final: prev: { @@ -10,7 +11,7 @@ final: prev: { libpisp = final.stdenv.mkDerivation { name = "libpisp"; - version = "1.0.7"; + version = lock.nodes.libpisp-src.original.ref; src = libpisp-src; nativeBuildInputs = with final; [ pkg-config meson ninja ]; buildInputs = with final; [ nlohmann_json boost ]; @@ -18,10 +19,15 @@ final: prev: { # https://github.com/NixOS/nixpkgs/issues/86131 BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include"; BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib"; + # Copy image filters into lib + postInstall = '' + mkdir -p $out/lib/libpisp/backend + cp src/libpisp/backend/*.json $out/lib/libpisp/backend + ''; }; libcamera = prev.libcamera.overrideAttrs (old: { - version = "0.3.1"; + version = lock.nodes.libcamera-src.original.ref; src = libcamera-src; buildInputs = old.buildInputs ++ (with final; [ libpisp @@ -50,8 +56,12 @@ final: prev: { "-Dlc-compliance=disabled" "-Dcam=disabled" "-Dqcam=disabled" - "-Ddocumentation=enabled" + "-Ddocumentation=disabled" "-Dpycamera=enabled" ]; + + # Issue introduced recently + # https://github.com/raspberrypi/libcamera/issues/226 + CXXFLAGS = "-Wno-sign-compare -Wno-stringop-truncation"; }); } diff --git a/overlays/rpicam-apps.nix b/overlays/rpicam-apps.nix index 13e3d2d..a4720d4 100644 --- a/overlays/rpicam-apps.nix +++ b/overlays/rpicam-apps.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { src = rpicam-apps-src; - nativeBuildInputs = with pkgs; [ meson pkg-config ]; + nativeBuildInputs = with pkgs; [ meson pkg-config makeWrapper ]; buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ffmpeg libdrm ninja ]; mesonFlags = [ "-Denable_qt=disabled" @@ -21,6 +21,17 @@ stdenv.mkDerivation { BOOST_INCLUDEDIR = "${lib.getDev pkgs.boost}/include"; BOOST_LIBRARYDIR = "${lib.getLib pkgs.boost}/lib"; + postFixup = let + wrap = "wrapProgram $out/bin/rpicam"; + ipa-var = "--set LIBCAMERA_IPA_PROXY_PATH ${pkgs.libcamera}/libexec/libcamera"; + in '' + ${wrap}-hello ${ipa-var} + ${wrap}-raw ${ipa-var} + ${wrap}-vid ${ipa-var} + ${wrap}-jpeg ${ipa-var} + ${wrap}-still ${ipa-var} + ''; + meta = with lib; { description = "Userland tools interfacing with Raspberry Pi cameras"; homepage = "https://github.com/raspberrypi/libcamera-apps"; diff --git a/rpi/default.nix b/rpi/default.nix index ff0a62b..e3a3917 100644 --- a/rpi/default.nix +++ b/rpi/default.nix @@ -1,4 +1,4 @@ -{ pinned, core-overlay, libcamera-overlay }: +{ pinned, core-overlay, libcamera-overlay, ... }: { lib, pkgs, config, ... }: let @@ -7,6 +7,10 @@ let board = cfg.board; kernel = config.system.build.kernel; initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; + + kernel-with-firmware = pkgs.rpi-kernels."${version}"."${board}"; + kernel-pkg = kernel-with-firmware.kernel; + firmware-pkg = kernel-with-firmware.firmware; in { imports = [ ./config.nix ./i2c.nix ]; @@ -14,7 +18,7 @@ in options = with lib; { raspberry-pi-nix = { kernel-version = mkOption { - default = "v6_6_51"; + default = builtins.elemAt (attrNames pkgs.rpi-kernels) 0; type = types.str; description = "Kernel version to build."; }; @@ -121,7 +125,7 @@ in TMPFILE="$TARGET_FIRMWARE_DIR/tmp" KERNEL="${kernel}/${config.system.boot.loader.kernelFile}" SHOULD_UBOOT=${if cfg.uboot.enable then "1" else "0"} - SRC_FIRMWARE_DIR="${pkgs.raspberrypifw}/share/raspberrypi/boot" + SRC_FIRMWARE_DIR="${firmware-pkg}/share/raspberrypi/boot" STARTFILES=("$SRC_FIRMWARE_DIR"/start*.elf) DTBS=("$SRC_FIRMWARE_DIR"/*.dtb) BOOTCODE="$SRC_FIRMWARE_DIR/bootcode.bin" @@ -195,7 +199,7 @@ in mv -T "$TMPFILE" "$TARGET_OVERLAYS_DIR/$(basename "$SRC")" done echo "${ - builtins.toString pkgs.raspberrypifw + builtins.toString firmware-pkg }" > "$STATE_DIRECTORY/firmware-version" rm "$STATE_DIRECTORY/firmware-migration-in-progress" } @@ -227,7 +231,7 @@ in fi if [[ -f "$STATE_DIRECTORY/firmware-migration-in-progress" || ! -f "$STATE_DIRECTORY/firmware-version" || $(< "$STATE_DIRECTORY/firmware-version") != ${ - builtins.toString pkgs.raspberrypifw + builtins.toString firmware-pkg } ]]; then migrate_firmware fi @@ -349,7 +353,7 @@ in "reset-raspberrypi" # required for vl805 firmware to load ]; }; - kernelPackages = pkgs.linuxPackagesFor pkgs.rpi-kernels."${version}"."${board}"; + kernelPackages = pkgs.linuxPackagesFor kernel-pkg; loader = { grub.enable = lib.mkDefault false; initScript.enable = !cfg.uboot.enable; diff --git a/sd-image/default.nix b/sd-image/default.nix index b845de3..d906fc4 100644 --- a/sd-image/default.nix +++ b/sd-image/default.nix @@ -32,6 +32,7 @@ board = cfg.board; kernel = "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}"; initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; + firmware = pkgs.rpi-kernels."${version}"."${board}".firmware; populate-kernel = if cfg.uboot.enable then '' @@ -46,7 +47,7 @@ { populateFirmwareCommands = '' ${populate-kernel} - cp -r ${pkgs.raspberrypifw}/share/raspberrypi/boot/{start*.elf,*.dtb,bootcode.bin,fixup*.dat,overlays} firmware + cp -r ${firmware}/share/raspberrypi/boot/{start*.elf,*.dtb,bootcode.bin,fixup*.dat,overlays} firmware cp ${config.hardware.raspberry-pi.config-output} firmware/config.txt ''; populateRootCommands =