2023-05-16 07:42:48 -04:00
|
|
|
{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }:
|
2023-04-16 16:43:32 -04:00
|
|
|
|
|
|
|
let
|
2023-05-16 07:42:48 -04:00
|
|
|
modDirVersion = "6.4.0";
|
2023-04-16 16:43:32 -04:00
|
|
|
linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args:
|
|
|
|
buildLinux (args // {
|
|
|
|
version = "${modDirVersion}-starfive-visionfive2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "starfive-tech";
|
|
|
|
repo = "linux";
|
2023-05-16 07:42:48 -04:00
|
|
|
rev = "e5a381c51d624ffd8784db908a58ae227d0608a4";
|
|
|
|
sha256 = "sha256-gg3+2ITdnpo49UmySiAJnk47STW1I7kF7fsKGBVayRE=";
|
2023-04-16 16:43:32 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit modDirVersion;
|
2023-05-16 07:42:48 -04:00
|
|
|
kernelPatches = [{
|
|
|
|
name = "verisilicon";
|
|
|
|
patch = ./verisilicon.patch;
|
|
|
|
}] ++ kernelPatches;
|
2023-04-16 16:43:32 -04:00
|
|
|
|
|
|
|
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 { }))
|