Skip to content

Commit 3500c7b

Browse files
committed
cleanup inputs
1 parent b2c10e4 commit 3500c7b

File tree

3 files changed

+29
-79
lines changed

3 files changed

+29
-79
lines changed

flake.lock

+1-54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+14-25
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,12 @@
44
extra-trusted-public-keys = [ "cache.ztier.link-1:3P5j2ZB9dNgFFFVkCQWT3mh0E+S3rIWtZvoql64UaXM=" ];
55
};
66

7-
inputs = {
8-
nixpkgs = {
9-
url = "github:NickCao/nixpkgs/riscv";
10-
};
11-
nixpkgs-native = {
12-
url = "github:NixOS/nixpkgs/nixos-unstable";
13-
};
14-
linux-vf2-src = {
15-
flake = false;
16-
url = "github:starfive-tech/linux/JH7110_VisionFive2_upstream";
17-
};
18-
starfive-tools = {
19-
flake = false;
20-
url = "github:starfive-tech/Tools";
21-
};
22-
uboot-vf2-src = {
23-
flake = false;
24-
url = "github:u-boot/u-boot/v2024.04";
25-
};
26-
};
7+
inputs.nixpkgs.url = "github:NickCao/nixpkgs/riscv";
8+
inputs.nixpkgs-native.url = "github:NixOS/nixpkgs/nixos-unstable";
279

2810
outputs = inputs: {
2911
overlays.default = self: super: {
3012
linuxPackages_vf2 = self.linuxPackagesFor (self.callPackage ./linux-vf2.nix {
31-
src = inputs.linux-vf2-src;
3213
kernelPatches = [ ];
3314
});
3415
};
@@ -43,9 +24,12 @@
4324
};
4425

4526
overlays.firmware = self: super: {
46-
uboot-vf2 = (super.buildUBoot {
47-
version = inputs.uboot-vf2-src.shortRev;
48-
src = inputs.uboot-vf2-src;
27+
uboot-vf2 = (super.buildUBoot rec {
28+
version = "2024.04";
29+
src = super.fetchurl {
30+
url = "https://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2";
31+
hash = "sha256-GKhT/jn6160DqQzC1Cda6u1tppc13vrDSSuAUIhD3Uo=";
32+
};
4933
defconfig = "starfive_visionfive2_defconfig";
5034
filesToInstall = [
5135
"u-boot.itb"
@@ -59,7 +43,12 @@
5943

6044
spl-tool = self.stdenv.mkDerivation {
6145
name = "spl-tool";
62-
src = inputs.starfive-tools;
46+
src = super.fetchFromGitHub {
47+
owner = "starfive-tech";
48+
repo = "Tools";
49+
rev = "0747c0510e090f69bf7d2884f44903b77b3db5c5";
50+
hash = "sha256-up58PtvnZTi6rGZcP2VwZrZBYajrZf4MzILixqaNKbE=";
51+
};
6352
installPhase = ''
6453
runHook preInstall
6554

linux-vf2.nix

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ lib
22
, buildLinux
3+
, fetchFromGitHub
34
, ...
45
} @ args:
56

@@ -10,6 +11,13 @@ buildLinux (args // {
1011
inherit modDirVersion;
1112
version = "${modDirVersion}-vf2";
1213

14+
src = fetchFromGitHub {
15+
owner = "starfive-tech";
16+
repo = "linux";
17+
rev = "076ede06c00a4069cd9f90d609eaf35bf1bdc68a";
18+
hash = "sha256-oI048iCkvghEIiuDHbxNHtJz/krPwXPB/HB85YUaxL8=";
19+
};
20+
1321
structuredExtraConfig = with lib.kernel; {
1422
CPU_FREQ = yes;
1523
CPUFREQ_DT = yes;
@@ -42,6 +50,12 @@ buildLinux (args // {
4250
STARFIVE_HDMI = yes;
4351

4452
PL330_DMA = no;
53+
54+
# Disable some drivers that we don't need to make the build leaner
55+
NET_VENDOR_MELLANOX = no;
56+
NET_VENDOR_MARVELL = no;
57+
DRM_NOUVEAU = no;
58+
DRM_INTEL = no;
4559
};
4660

4761
preferBuiltin = true;

0 commit comments

Comments
 (0)