2024-06-01 22:39:18 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2023-04-16 22:43:32 +02:00
|
|
|
boot = {
|
|
|
|
consoleLogLevel = lib.mkDefault 7;
|
2024-06-01 22:39:18 +02:00
|
|
|
# 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
|
|
|
|
2024-06-01 22:39:18 +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;
|
|
|
|
};
|
2023-04-18 09:15:12 +02:00
|
|
|
};
|
2024-06-01 22:39:18 +02:00
|
|
|
|
|
|
|
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
|
|
|
}
|