mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19: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 = {
|
||||
# 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;
|
||||
kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix {
|
||||
inherit (config.boot) kernelPatches;
|
||||
});
|
||||
|
||||
kernelParams =
|
||||
lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ];
|
||||
# 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.";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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": {
|
||||
"locked": {
|
||||
"lastModified": 1726724509,
|
||||
"narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=",
|
||||
"lastModified": 1726905744,
|
||||
"narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94",
|
||||
"rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -37,11 +37,11 @@
|
|||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1726688310,
|
||||
"narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=",
|
||||
"lastModified": 1726838390,
|
||||
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0",
|
||||
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Reference in a new issue