1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-15 23:49:41 +01:00
nixos-hardware/microchip/common/bsp/uboot.nix
Ganga Ram bb7ba40a67
Update microchip/common/bsp/uboot.nix
Added branch name, for better trackability.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-07-10 10:12:50 +04:00

36 lines
1,004 B
Nix

{
pkgs, targetBoard, ...
}:
with pkgs; let
payload-generator = pkgs.callPackage ./hss-payload-generator.nix {};
payload_config = ./uboot.yaml;
in
buildUBoot rec {
pname = "uboot";
version = "linux4microchip+fpga-2023.06";
src = fetchFromGitHub {
owner = "polarfire-soc";
repo = "u-boot";
# from mpfs-uboot-2022.01 branch
rev = "7e19f9dff788025403ac6a34d9acf8736eef32ff";
sha256 = "sha256-1qmifjjNxPOUWRgZdQk6Ld5KGQk/PypSRK/ILPSsTLs";
};
extraMakeFlags = [
"OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin"
];
patches = [
./patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch
./patches/0002-Riscv-Fix-build-against-binutils-2.38.patch
];
defconfig = "${targetBoard}_defconfig";
enableParallelBuilding = true;
extraMeta.platforms = ["riscv64-linux"];
postBuild = ''
${payload-generator}/hss-payload-generator -c ${payload_config} payload.bin
'';
filesToInstall = [ "payload.bin" ];
}