1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-16 16:09:40 +01:00
nixos-hardware/starfive/visionfive/v2/uboot.nix

37 lines
855 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildUBoot
, buildPackages
, opensbi
}:
2023-04-16 22:43:32 +02:00
buildUBoot rec {
version = "2024.01-rc5";
2023-04-16 22:43:32 +02:00
src = fetchFromGitHub {
owner = "u-boot";
2023-04-16 22:43:32 +02:00
repo = "u-boot";
rev = "refs/tags/v${version}";
hash = "sha256-QlwgvnSaXh39z9AM7HNF731lRiUkPbN3oQyioQNTYFA=";
2023-04-16 22:43:32 +02:00
};
# workaround for https://github.com/NixOS/nixpkgs/pull/146634
# uboot: only apply raspberry pi patches to raspberry pi builds
patches = [ ];
extraMakeFlags = [
# workaround for https://github.com/NixOS/nixpkgs/pull/277997
# buildUBoot: specify absolute path of dtc, fix building u-boot 2023.10+
"DTC=${lib.getExe buildPackages.dtc}"
"OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin"
];
2023-04-16 22:43:32 +02:00
defconfig = "starfive_visionfive2_defconfig";
2023-04-16 22:43:32 +02:00
filesToInstall = [
"spl/u-boot-spl.bin.normal.out"
"u-boot.itb"
2023-04-16 22:43:32 +02:00
];
}