Files
nixos-hardware/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix
Govind Singh 11ea8b8477 ucm-imx95: firmware: fetch firmware files from NXP release
Fetch AHAB container, M7 firmware, and DDR PHY firmware binaries
from the NXP release packages. The derivation extracts the correct
LPDDR5 PHY images and selects the appropriate AHAB container for
A0 or B0 silicon revisions.

Signed-off-by: Govind Singh <govind.singh@tii.ae>
2025-10-30 14:29:53 +01:00

59 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
stdenv,
buildPackages,
pkgsCross,
openssl,
}:
let
target-board = "imx95";
in
stdenv.mkDerivation rec {
pname = "imx95-atf";
version = "2.13.0";
platform = target-board;
enableParallelBuilding = true;
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-atf";
rev = "28affcae957cb8194917b5246276630f9e6343e1";
sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE=";
};
# Compiler dependencies
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ];
buildInputs = [ openssl ];
makeFlags = [
"HOSTCC=$(CC_FOR_BUILD)"
"CROSS_COMPILE=${pkgsCross.aarch64-embedded.stdenv.cc.targetPrefix}"
"PLAT=${platform}"
"SPD=opteed"
"bl31"
"LDFLAGS=-no-warn-rwx-segments"
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp build/${target-board}/release/bl31.bin $out
runHook postInstall
'';
hardeningDisable = [ "all" ];
dontStrip = true;
meta = with lib; {
homepage = "https://github.com/nxp-imx/imx-atf";
description = "Reference implementation of secure world software for ARMv8-A";
license = [ licenses.bsd3 ];
maintainers = with maintainers; [ govindsi ];
platforms = [ "aarch64-linux" ];
};
}