Add support for UCM-iMX95 Evaluation Kit platform

The CompuLab UCM-iMX95 Evaluation Kit provides a platform for comprehensive
evaluation of the NXP i.MX95 application processor. This change adds support
in NixOS hardware to provide a template for customized i.MX95-based platforms.

UCM-iMX95: https://www.compulab.com/products/som-evaluation-kits/ucm-imx95-evaluation-kit/

Signed-off-by: Govind Singh <govind.singh@tii.ae>
This commit is contained in:
Govind Singh
2025-10-23 09:28:48 +04:00
committed by Jörg Thalheim
parent 43ffe9ac82
commit fe21eda733
13 changed files with 643 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
{
stdenv,
lib,
bison,
dtc,
fetchgit,
flex,
gnutls,
libuuid,
ncurses,
openssl,
which,
perl,
buildPackages,
efitools,
}:
let
ubsrc = fetchgit {
url = "https://github.com/compulab-yokneam/u-boot-compulab.git";
# tag: lf_v2024.04
rev = "824401fe487d7d3cbcf251bd60270bd7fe8d21d0";
sha256 = "sha256-m+YW7+XF/jcNKfyb5533LXGyOWvStqY+MCczAdcNGZI=";
};
in
stdenv.mkDerivation {
pname = "imx95-uboot";
version = "2024.04";
src = ubsrc;
postPatch = ''
patchShebangs tools
patchShebangs scripts
'';
nativeBuildInputs = [
bison
flex
openssl
which
ncurses
libuuid
gnutls
openssl
perl
efitools
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
hardeningDisable = [ "all" ];
enableParallelBuilding = true;
makeFlags = [
"DTC=${lib.getExe buildPackages.dtc}"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
extraConfig = ''
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x97000000; setenv fdt_addr_r 0x96000000; run distro_bootcmd; "
CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_BOOTEFI=y
CONFIG_EFI_LOADER=y
CONFIG_BLK=y
CONFIG_PARTITIONS=y
CONFIG_DM_DEVICE_REMOVE=n
CONFIG_CMD_CACHE=y
'';
passAsFile = [ "extraConfig" ];
configurePhase = ''
runHook preConfigure
make ucm-imx95_defconfig
cat $extraConfigPath >> .config
runHook postConfigure
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp ./u-boot-nodtb.bin $out
cp ./spl/u-boot-spl.bin $out
cp ./arch/arm/dts/ucm-imx95.dtb $out
cp .config $out
runHook postInstall
'';
dontStrip = true;
}