1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-27 03:59:45 +01:00
nixos-hardware/starfive/visionfive/v1/linux.nix

37 lines
973 B
Nix
Raw Normal View History

2022-10-08 17:27:03 +02:00
{ lib
, callPackage
, linuxPackagesFor
, kernelPatches
, ... }:
let
modDirVersion = "6.0.0";
linuxPkg = { fetchFromGitHub, buildLinux, ... } @ args:
buildLinux (args // {
inherit modDirVersion kernelPatches;
version = "${modDirVersion}-starfive-visionfive-v1";
src = fetchFromGitHub {
owner = "starfive-tech";
repo = "linux";
rev = "cfcb617265422c0af0ae5bc9688dceba2d10b27a";
sha256 = "sha256-EAMCOtJZ51xSLySQPaZyomfa/1Xs9kNedz04tIbELqg=";
};
defconfig = "starfive_jh7100_fedora_defconfig";
structuredExtraConfig = with lib.kernel; {
KEXEC = yes;
SERIAL_8250_DW = yes;
PINCTRL_STARFIVE = yes;
DW_AXI_DMAC_STARFIVE = yes;
PTP_1588_CLOCK = yes;
STMMAC_ETH = yes;
STMMAC_PCI = yes;
};
extraMeta.branch = "visionfive";
} // (args.argsOverride or { }));
in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { }))