2024-02-26 14:34:02 +02:00
|
|
|
{
|
|
|
|
fetchFromGitLab,
|
|
|
|
fetchFromGitHub,
|
2024-03-07 20:59:58 +02:00
|
|
|
#buildArmTrustedFirmware,
|
2024-02-26 14:34:02 +02:00
|
|
|
buildUBoot,
|
|
|
|
}: let
|
|
|
|
rkbin = fetchFromGitHub {
|
|
|
|
owner = "rockchip-linux";
|
|
|
|
repo = "rkbin";
|
2024-03-05 10:24:29 +02:00
|
|
|
rev = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0";
|
|
|
|
hash = "sha256-U/jeUsV7bhqMw3BljmO6SI07NCDAd/+sEp3dZnyXeeA=";
|
2024-02-26 14:34:02 +02:00
|
|
|
};
|
2024-03-07 20:59:58 +02:00
|
|
|
#tfa =
|
|
|
|
# (buildArmTrustedFirmware rec {
|
|
|
|
# extraMakeFlags = ["bl31"];
|
|
|
|
# platform = "rk3588";
|
|
|
|
# extraMeta.platforms = ["aarch64-linux"];
|
|
|
|
# filesToInstall = ["build/${platform}/release/bl31/bl31.elf"];
|
|
|
|
# })
|
|
|
|
# .overrideAttrs (_: {
|
|
|
|
# src = fetchFromGitLab {
|
|
|
|
# domain = "gitlab.collabora.com";
|
|
|
|
# owner = "hardware-enablement";
|
|
|
|
# repo = "rockchip-3588/trusted-firmware-a";
|
|
|
|
# rev = "002d8e85ce5f4f06ebc2c2c52b4923a514bfa701";
|
|
|
|
# hash = "sha256-1XOG7ILIgWa3uXUmAh9WTfSGLD/76OsmWrUhIxm/zTg=";
|
|
|
|
# };
|
|
|
|
# });
|
2024-02-26 14:34:02 +02:00
|
|
|
in
|
|
|
|
buildUBoot rec {
|
2024-03-05 10:24:29 +02:00
|
|
|
version = "v2024.04-rc3-52-g773cb2bca7";
|
2024-02-26 14:34:02 +02:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "source.denx.de";
|
|
|
|
owner = "u-boot";
|
|
|
|
repo = "u-boot";
|
2024-03-05 10:24:29 +02:00
|
|
|
rev = "773cb2bca7743406e34ab4f441fc0a8a0d200a19";
|
|
|
|
hash = "sha256-MOlqc9KvQJcjpWUdnCf2n4KA0a806Tzsu72taUQjmcs=";
|
2024-02-26 14:34:02 +02:00
|
|
|
};
|
|
|
|
|
2024-02-28 21:25:33 +02:00
|
|
|
defconfig = "orangepi-5-plus-rk3588_defconfig";
|
2024-02-26 14:34:02 +02:00
|
|
|
|
2024-02-28 15:20:49 +02:00
|
|
|
patches = [];
|
|
|
|
|
2024-03-05 10:24:29 +02:00
|
|
|
ROCKCHIP_TPL = "${rkbin}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin";
|
2024-03-07 20:59:58 +02:00
|
|
|
BL31 = "${rkbin}/bin/rk35/rk3588_bl31_v1.45.elf";
|
2024-02-26 14:34:02 +02:00
|
|
|
|
|
|
|
# FIXME: seems to not like nixpkgs dtc for some reason
|
|
|
|
extraMakeFlags = ["DTC=./scripts/dtc/dtc"];
|
|
|
|
|
|
|
|
filesToInstall = [".config" "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin"];
|
|
|
|
|
|
|
|
extraMeta.platforms = ["aarch64-linux"];
|
|
|
|
}
|