mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
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>
93 lines
1.6 KiB
Nix
93 lines
1.6 KiB
Nix
{
|
|
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;
|
|
}
|