2023-04-16 16:43:32 -04:00
|
|
|
{ config, lib, pkgs, ... }: {
|
|
|
|
boot = {
|
|
|
|
consoleLogLevel = lib.mkDefault 7;
|
2024-05-25 09:31:04 -04:00
|
|
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
2024-05-27 16:37:46 -04:00
|
|
|
kernelPatches = [{
|
|
|
|
name = "JH7110";
|
|
|
|
patch = pkgs.fetchpatch {
|
|
|
|
# https://patchwork.kernel.org/project/linux-riscv/patch/20240506034627.66765-1-hal.feng@starfivetech.com/
|
|
|
|
name = "v2-riscv-defconfig-Enable-StarFive-JH7110-drivers.patch";
|
|
|
|
url = "https://patchwork.kernel.org/series/850668/mbox/";
|
|
|
|
hash = "sha256-81Brj61TOUoyVBxrXQh2VU3gTh/1V3uo33ic3sJPk2w=";
|
|
|
|
};
|
|
|
|
}];
|
2023-04-16 16:43:32 -04:00
|
|
|
|
|
|
|
kernelParams =
|
|
|
|
lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ];
|
|
|
|
|
2023-04-29 10:50:43 -04:00
|
|
|
initrd.availableKernelModules = [ "dw_mmc_starfive" ];
|
2023-04-16 16:43:32 -04:00
|
|
|
|
|
|
|
loader = {
|
|
|
|
grub.enable = lib.mkDefault false;
|
|
|
|
generic-extlinux-compatible.enable = lib.mkDefault true;
|
|
|
|
};
|
2023-04-18 03:15:12 -04:00
|
|
|
};
|
2023-04-16 16:43:32 -04:00
|
|
|
|
|
|
|
hardware.deviceTree.name =
|
|
|
|
lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb";
|
2023-06-08 14:33:14 -04:00
|
|
|
|
|
|
|
hardware.deviceTree.overlays = [{
|
|
|
|
name = "qspi-patch";
|
|
|
|
dtsFile = ./qspi-patch.dts;
|
|
|
|
}];
|
2023-04-16 16:43:32 -04:00
|
|
|
}
|