mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-26 21:09:42 +01:00
Merge pull request #964 from onny/starfive2-mainline
starfive visionfive2: use mainline kernel
This commit is contained in:
commit
d0cb432a9d
3 changed files with 31 additions and 42 deletions
|
@ -1,21 +1,36 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
# Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0
|
|
||||||
supportedFilesystems =
|
|
||||||
lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
|
|
||||||
consoleLogLevel = lib.mkDefault 7;
|
consoleLogLevel = lib.mkDefault 7;
|
||||||
kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix {
|
# Switch to default as soon they reach >= 6.11
|
||||||
inherit (config.boot) kernelPatches;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
});
|
|
||||||
|
|
||||||
kernelParams =
|
|
||||||
lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ];
|
|
||||||
|
|
||||||
initrd.availableKernelModules = [ "dw_mmc_starfive" ];
|
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 = {
|
loader = {
|
||||||
grub.enable = lib.mkDefault false;
|
grub.enable = lib.mkDefault false;
|
||||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
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.";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
modDirVersion = "6.6.0";
|
|
||||||
linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args:
|
|
||||||
buildLinux (args // {
|
|
||||||
version = "${modDirVersion}-starfive-visionfive2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "starfive-tech";
|
|
||||||
repo = "linux";
|
|
||||||
rev = "13eb70da2a73187c8c7aece13d23d68928aa8210";
|
|
||||||
hash = "sha256-bwB7Pc+Z+MWXPfWYdgtRGuhqjiNHLDGNCY62e4lBGvE=";
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit modDirVersion kernelPatches;
|
|
||||||
|
|
||||||
structuredExtraConfig = with lib.kernel; {
|
|
||||||
PINCTRL_STARFIVE_JH7110_SYS = yes;
|
|
||||||
SERIAL_8250_DW = yes;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraMeta.branch = "JH7110_VisionFive2_upstream";
|
|
||||||
} // (args.argsOverride or { }));
|
|
||||||
|
|
||||||
in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { }))
|
|
|
@ -22,11 +22,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726724509,
|
"lastModified": 1726905744,
|
||||||
"narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=",
|
"narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94",
|
"rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -37,11 +37,11 @@
|
||||||
},
|
},
|
||||||
"nixos-stable": {
|
"nixos-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726688310,
|
"lastModified": 1726838390,
|
||||||
"narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=",
|
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0",
|
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Reference in a new issue