From e678820fd53559ce8aeede509c61068474ffc224 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 4 Jun 2026 21:48:03 +0400 Subject: [PATCH] nxp: imx93-atf: fix GCC header-guard build failure GCC 14+ treats the mismatched TRDC header guard in imx-atf as a hard error (-Werror=header-guard), so bl31.bin does not build on our pinned revision. Fetch the upstream fix (e194a14) as a patch without bumping the ATF revision. --- nxp/imx93-evk/bsp/imx93-atf.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nxp/imx93-evk/bsp/imx93-atf.nix b/nxp/imx93-evk/bsp/imx93-atf.nix index 634cca19..aff26c85 100644 --- a/nxp/imx93-evk/bsp/imx93-atf.nix +++ b/nxp/imx93-evk/bsp/imx93-atf.nix @@ -1,6 +1,7 @@ { lib, fetchgit, + fetchpatch, stdenv, buildPackages, pkgsCross, @@ -22,6 +23,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE="; }; + patches = [ + (fetchpatch { + name = "imx93-trdc-header-guard.patch"; + url = "https://github.com/nxp-imx/imx-atf/commit/e194a14ec55f13386babc80c90098874367ab3d6.patch"; + sha256 = "sha256-uXRgeyFmxDww93nJe04aoOLml2R7IbABZLhywyYmePk="; + }) + ]; + # Compiler dependencies depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ];