1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-01 08:39:41 +01:00
nixos-hardware/starfive/visionfive/v2/default.nix
Jonas Heinrich cbcd0302c7 starfive visionfive2: use mainline kernel
Co-authored-by: NickCao <nickcao@nichi.co>
2024-09-22 20:44:38 +00:00

36 lines
835 B
Nix

{
config,
lib,
pkgs,
...
}:
{
boot = {
consoleLogLevel = lib.mkDefault 7;
# Switch to default as soon they reach >= 6.11
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
initrd.availableKernelModules = [ "dw_mmc_starfive" ];
# Support booting SD-image from NVME SSD
initrd.kernelModules = [
"clk-starfive-jh7110-aon"
"clk-starfive-jh7110-stg"
"phy-jh7110-pcie"
"pcie-starfive"
"nvme"
];
loader = {
grub.enable = lib.mkDefault false;
generic-extlinux-compatible.enable = lib.mkDefault true;
};
};
assertions = [
{
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.11";
message = "The VisionFive 2 requires at least mainline kernel version 6.11 for minimum hardware support.";
}
];
}