2024-02-26 14:34:02 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-02-26 15:20:57 +02:00
|
|
|
modulesPath,
|
2024-02-26 14:34:02 +02:00
|
|
|
...
|
|
|
|
}: let
|
2024-03-07 13:01:59 +02:00
|
|
|
crossFast = pkgs.crossArm64.pkgsCross.aarch64-multiplatform;
|
|
|
|
crossNative = pkgs.pkgsCross.aarch64-multiplatform;
|
2024-02-26 14:34:02 +02:00
|
|
|
in {
|
2024-03-07 13:08:40 +02:00
|
|
|
mj.skipPerf = true;
|
|
|
|
|
2024-02-26 14:34:02 +02:00
|
|
|
boot = {
|
2024-03-07 13:01:59 +02:00
|
|
|
kernelPackages = crossNative.linuxPackagesFor (crossFast.buildLinux rec {
|
2024-03-05 10:59:27 +02:00
|
|
|
version = "6.8.0-rc7";
|
|
|
|
modDirVersion = "6.8.0-rc7";
|
2024-02-26 14:34:02 +02:00
|
|
|
|
2024-02-29 10:14:42 +02:00
|
|
|
src = builtins.fetchTarball {
|
2024-03-05 10:59:27 +02:00
|
|
|
url = "https://git.kernel.org/torvalds/t/linux-6.8-rc7.tar.gz";
|
|
|
|
sha256 = "sha256:0q9isgv6lxzrmb4idl0spxv2l7fsk3nn4cdq0vdw9c8lyzrh5yy0";
|
2024-02-29 10:14:42 +02:00
|
|
|
};
|
|
|
|
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-03-07 11:12:28 +02:00
|
|
|
{
|
|
|
|
name = "rk3588-crypto";
|
|
|
|
patch = ./orangepi5plus/rk3588-crypto.patch;
|
|
|
|
}
|
2024-02-29 10:14:42 +02:00
|
|
|
];
|
2024-03-07 11:12:28 +02:00
|
|
|
extraConfig = ''
|
|
|
|
CRYPTO_DEV_ROCKCHIP2 m
|
2024-03-07 13:40:44 +02:00
|
|
|
CRYPTO_DEV_ROCKCHIP2_DEBUG y
|
2024-03-07 11:12:28 +02:00
|
|
|
'';
|
2024-02-26 14:34:02 +02:00
|
|
|
|
2024-02-29 10:14:42 +02:00
|
|
|
extraMeta.branch = "6.8";
|
|
|
|
});
|
2024-02-26 14:34:02 +02:00
|
|
|
|
|
|
|
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";
|
2024-02-26 14:34:02 +02:00
|
|
|
|
|
|
|
system.build = {
|
2024-02-26 15:20:57 +02:00
|
|
|
sdImage = import "${modulesPath}/../lib/make-disk-image.nix" {
|
2024-02-26 14:34:02 +02:00
|
|
|
name = "orangepi5-sd-image";
|
|
|
|
copyChannel = false;
|
|
|
|
inherit config lib pkgs;
|
|
|
|
};
|
2024-03-07 13:01:59 +02:00
|
|
|
uboot = crossFast.callPackage ../../hacks/orangepi5plus/uboot {};
|
2024-02-26 14:34:02 +02:00
|
|
|
};
|
|
|
|
}
|