config/shared/platform/orangepi5plus.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

{
config,
lib,
pkgs,
2024-02-26 15:20:57 +02:00
modulesPath,
...
}: let
2024-02-26 15:20:57 +02:00
crossPkgs = pkgs.pkgsCross.aarch64-multiplatform;
in {
boot = {
2024-02-29 10:17:06 +02:00
kernelPackages = crossPkgs.linuxPackagesFor (crossPkgs.buildLinux rec {
2024-02-29 10:14:42 +02:00
version = "6.8.0-rc1";
modDirVersion = "6.8.0-rc1";
2024-02-29 10:14:42 +02:00
src = builtins.fetchTarball {
url = "https://git.kernel.org/torvalds/t/linux-6.8-rc1.tar.gz";
sha256 = "0rnrd1iy73vkrablx6rqlmxv9bv9zjfh6zj09aqca9rr5h8iz1p3";
};
kernelPatches = [
{
2024-02-29 10:17:06 +02:00
name = "orangepi-5-plus-collabora-${version}";
patch = ./orangepi5plus/rk3588-v${version}.patch;
2024-02-29 10:14:42 +02:00
}
];
2024-02-29 10:14:42 +02:00
extraMeta.branch = "6.8";
});
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
initrd.kernelModules = ["ahci_dwc" "phy_rockchip_naneng_combphy"];
consoleLogLevel = 7;
};
2024-03-05 10:59:42 +02:00
hardware.deviceTree.name = "rockchip/rk3588-orangepi-5-plus.dtb";
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
options = ["noatime"];
};
};
system.build = {
2024-02-26 15:20:57 +02:00
sdImage = import "${modulesPath}/../lib/make-disk-image.nix" {
name = "orangepi5-sd-image";
copyChannel = false;
inherit config lib pkgs;
};
2024-02-29 10:05:46 +02:00
uboot = crossPkgs.callPackage ../../hacks/orangepi5plus/uboot {};
};
}