From c4fa85b9df1b719cc09fa1338f4a6aa61dc7384c Mon Sep 17 00:00:00 2001 From: leo60228 Date: Thu, 25 Apr 2024 21:57:25 -0400 Subject: [PATCH] raspberry-pi/5: init --- README.md | 1 + raspberry-pi/5/default.nix | 15 +++++++++++++++ raspberry-pi/5/overlay.nix | 6 ++++++ tests/run.py | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 raspberry-pi/5/default.nix create mode 100644 raspberry-pi/5/overlay.nix diff --git a/README.md b/README.md index 5ac2a82..6698010 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,7 @@ See code for all available configurations. | [Purism Librem 5r4](purism/librem/5r4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Raspberry Pi 5](raspberry-pi/5) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [StarFive VisionFive 2](starfive/visionfive/v2) | `` | diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix new file mode 100644 index 0000000..8aea944 --- /dev/null +++ b/raspberry-pi/5/default.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + boot = { + kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_rpi5); + initrd.availableKernelModules = [ + "usbhid" + "usb_storage" + ]; + }; +} diff --git a/raspberry-pi/5/overlay.nix b/raspberry-pi/5/overlay.nix new file mode 100644 index 0000000..8fd1a89 --- /dev/null +++ b/raspberry-pi/5/overlay.nix @@ -0,0 +1,6 @@ +final: _prev: { + linux_rpi5 = final.linux_rpi4.override { + rpiVersion = 5; + argsOverride.defconfig = "bcm2712_defconfig"; + }; +} diff --git a/tests/run.py b/tests/run.py index 8ad6025..07a86c0 100755 --- a/tests/run.py +++ b/tests/run.py @@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None: continue system = "x86_64-linux" - if "raspberry-pi/4" == profile: + if "raspberry-pi/4" == profile or "raspberry-pi/5" == profile: system = "aarch64-linux" f.write(