nixos-aarch64-images/pkgs/uboot-quartz64/default.nix
2023-02-28 12:38:26 -06:00

59 lines
1.4 KiB
Nix

{ lib
, fetchFromGitHub
, buildUBoot
, buildPackages
, stdenv
}:
let
bl31Blobs = fetchFromGitHub {
owner = "rockchip-linux";
repo = "rkbin";
rev = "87885c48747a358dc8eb1808db99e313935e129e";
sha256 = "aQj4JHk67dlr9OGI5SdbQSypQllIasF0TZFoPNARuTo=";
};
rkbinBlobs = fetchFromGitHub {
owner = "rockchip-linux";
repo = "rkbin";
rev = "a4c6de9ea29f275bb1d08c94ccded51ff2ab5b92";
};
buildQuartz64UBoot = (defconfig: buildUBoot {
version = "2022.64-rc1";
defconfig = defconfig;
src = fetchFromGitHub {
owner = "CounterPillow";
repo = "u-boot-quartz64";
rev = "be645fef058885e2fc9882e839dacd6941693ac6";
};
extraMakeFlags = [
"ARCH=arm"
];
extraMeta = {
platforms = [ "aarch64-linux" ];
license = lib.licenses.unfreeRedistributableFirmware;
};
filesToInstall = [ "u-boot.itb" "idbloader.img" ];
BL31 = "${bl31Blobs}/bin/rk35/rk3568_bl31_v1.34.elf";
ROCKCHIP_TPL = "${rkbinBlobs}/bin/rk36/rk3566_ddr_1056MHz_v1.13.bin";
preConfigure = ''
make mrproper
'';
});
in
{
ubootSoQuartzBlade = buildQuartz64UBoot "soquartz-blade-rk3566_defconfig";
ubootSoQuartzCM4 = buildQuartz64UBoot "soquartz-cm4io-rk3566_defconfig";
ubootSoQuartzModelA = buildQuartz64UBoot "soquartz-model-a-rk3566_defconfig";
ubootQuartz64b = buildQuartz64UBoot "quartz64-b-rk3566_defconfig";
ubootQuartz64a = buildQuartz64UBoot "quartz64-a-rk3566_defconfig";
}