mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			973 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			973 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ 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 { }))
 |