Skip to content

Commit

Permalink
Add systemd patches for bpi-r3
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Aug 17, 2023
1 parent a9fa1e9 commit 17b22b5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nixos-modules/hardware/bpi-r3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
config = lib.mkIf config.hardware.bpi-r3.enable {
boot.kernelPackages = pkgs.linuxPackages_latest;

# linux kernel 6.3+ requires using extra flags for memfd_create that only
# exist starting in systemd-stable v254
nixpkgs.overlays = lib.optional
(!lib.versionAtLeast pkgs.systemd.version "254")
(_: prev: {
systemd = prev.systemd.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ (with prev; [
(fetchpatch {
url = "https://github.com/systemd/systemd-stable/commit/8cb0a001d8193721af98a448d5b3615ac5e263f1.diff";
hash = "sha256-E1rsAhhmBQMc1w3dI7GD/dmffTFTWYHtiM/DQjzuVgc=";
})
(fetchpatch {
url = "https://github.com/systemd/systemd-stable/commit/ad62530ebb397982a73266a07ac6f182e47922de.diff";
hash = "sha256-6oLb7W78uYHmSp/hfesjunaaxSigfrgpcekVJ1Ho4N8=";
})
(fetchpatch {
url = "https://github.com/systemd/systemd-stable/commit/c29715a8f77d96cd731b4a3083b3a852b3b61eb8.diff";
hash = "sha256-2I1afgVHdi4c+k8zUL1TI1gxRM8YPVEMNoy4twnaUSk=";
})
]);
});
});

boot.kernelParams = [ "console=ttyS0,115200" ];

# u-boot looks for $fdtfile on the ESP at /dtb
Expand Down

0 comments on commit 17b22b5

Please sign in to comment.