1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-15 15:39:41 +01:00
nixos-hardware/starfive/visionfive/v2/default.nix

37 lines
835 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
{
2023-04-16 22:43:32 +02:00
boot = {
consoleLogLevel = lib.mkDefault 7;
# Switch to default as soon they reach >= 6.11
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
2023-04-16 22:43:32 +02:00
2023-04-29 16:50:43 +02:00
initrd.availableKernelModules = [ "dw_mmc_starfive" ];
2023-04-16 22:43:32 +02:00
# Support booting SD-image from NVME SSD
initrd.kernelModules = [
"clk-starfive-jh7110-aon"
"clk-starfive-jh7110-stg"
"phy-jh7110-pcie"
"pcie-starfive"
"nvme"
];
2023-04-16 22:43:32 +02:00
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.";
}
];
2023-04-16 22:43:32 +02:00
}