Files
nixos-hardware/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix
Jörg Thalheim a2bc09823a ucm-imx95: various changes
- Move openssl to nativeBuildInputs in ATF build for proper cross-compilation
- Add explicit SILICON validation with clear error messages in firmware build
- Fix fragile wildcard patterns in firmware DDR file copying
- Replace mutable branch URLs with pinned commit hashes for patch stability
- Add U-Boot config merge step (make olddefconfig) after extra config
- Fix cross-compilation toolchain coherence (cpp in optee-os)
- Standardize license format (single value instead of single-element list)
- Update maintainer references with inline name/email format
- Fix typos and grammar in documentation and comments
2025-10-30 15:17:56 +01:00

73 lines
2.1 KiB
Nix

{
lib,
pkgs,
}:
let
metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap
in
pkgs.stdenv.mkDerivation rec {
pname = "imx95-imx-oei";
version = "lf-6.6.36-2.1.0";
nativeBuildInputs = [
pkgs.buildPackages.python3
pkgs.gcc-arm-embedded
];
src = pkgs.fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-oei";
rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925";
sha256 = "sha256-Sb6u1NlhJpDCOKBu3HqUb4BLEy0F8LYVnJE0tRSvzWc=";
};
patches = [
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch";
sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8=";
})
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch";
sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698=";
})
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch";
sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8=";
})
];
postPatch = ''
substituteInPlace oei/makefiles/build_info.mak \
--replace-fail "/bin/echo" "echo"
substituteInPlace Makefile \
--replace-fail "/bin/echo" "echo"
'';
makeFlags = [
"board=mx95lp5"
"CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"ARCH=arm"
"DDR_CONFIG=lpddr5_timing"
"oei=ddr"
];
installPhase = ''
mkdir -p $out
cp build/mx95lp5/ddr/oei-m33-ddr.bin $out/
'';
meta = with lib; {
homepage = "https://github.com/nxp-imx/imx-oei";
description = "Optional Executable Image assembler for i.MX95 processors";
license = licenses.bsd3;
maintainers = [
{
name = "Govind Singh";
email = "govind.singh@tii.ae";
}
];
platforms = [ "aarch64-linux" ];
};
}