mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-07 10:28:51 +08:00
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
This commit is contained in:
@@ -25,9 +25,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Compiler dependencies
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
nativeBuildInputs = [
|
||||
pkgsCross.aarch64-embedded.stdenv.cc
|
||||
openssl
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"HOSTCC=$(CC_FOR_BUILD)"
|
||||
@@ -51,8 +52,13 @@ stdenv.mkDerivation rec {
|
||||
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 ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ in
|
||||
imx95-boot = pkgs.stdenv.mkDerivation rec {
|
||||
inherit src;
|
||||
name = "imx95-mkimage";
|
||||
version = "lf-6.6.36";
|
||||
version = "lf-6.6.52-2.2.1";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
@@ -47,7 +47,6 @@ in
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
git
|
||||
glibc.static
|
||||
zlib
|
||||
zlib.static
|
||||
|
||||
@@ -46,7 +46,13 @@ stdenv.mkDerivation rec {
|
||||
./firmware-imx-8.28-994fa14.bin --auto-accept
|
||||
|
||||
mkdir -p $out/ddr
|
||||
cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr5*v202409.bin $out/ddr/
|
||||
# Resolve wildcard and verify at least one file matches
|
||||
lpddr5_files=(firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr5*v202409.bin)
|
||||
if [ ''${#lpddr5_files[@]} -eq 0 ]; then
|
||||
echo "ERROR: No lpddr5*v202409.bin file found in firmware/ddr/synopsys/" >&2
|
||||
exit 1
|
||||
fi
|
||||
cp "''${lpddr5_files[@]}" $out/ddr/
|
||||
|
||||
# AHAB container
|
||||
cp ${ahabFirmware} ./firmware-ele-imx-2.0.2-89161a8.bin
|
||||
@@ -56,8 +62,11 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/ahab
|
||||
if [ "$SILICON" = "A0" ]; then
|
||||
cp firmware-ele-imx-2.0.2-89161a8/mx95a0-ahab-container.img $out/ahab/
|
||||
else
|
||||
elif [ "$SILICON" = "B0" ]; then
|
||||
cp firmware-ele-imx-2.0.2-89161a8/mx95b0-ahab-container.img $out/ahab/
|
||||
else
|
||||
echo "ERROR: Invalid SILICON value '$SILICON'. Must be 'A0' or 'B0'." >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ buildLinux (
|
||||
defconfig = "compulab-mx95_defconfig";
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/366004
|
||||
# introduced a breaking change that if a module is declared but it is not being used it will faill.
|
||||
# introduced a breaking change that if a module is declared but it is not being used it will fail.
|
||||
ignoreConfigErrors = true;
|
||||
|
||||
kernelPatches = [
|
||||
@@ -53,8 +53,13 @@ buildLinux (
|
||||
};
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/compulab-yokneam/linux-compulab";
|
||||
license = [ licenses.gpl2Only ];
|
||||
maintainers = with maintainers; [ govindsi ];
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "imx95-imx-oei";
|
||||
version = "lf-6.6.36-2.1.0";
|
||||
@@ -20,15 +23,15 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch";
|
||||
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/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch";
|
||||
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/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch";
|
||||
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=";
|
||||
})
|
||||
];
|
||||
@@ -57,8 +60,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nxp-imx/imx-oei";
|
||||
description = "Optional Executable Image assembler for i.MX95 processors";
|
||||
license = [ licenses.bsd3 ];
|
||||
maintainers = with maintainers; [ govindsi ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "imx95-imx-oei-tcm";
|
||||
version = "lf-6.6.36-2.1.0";
|
||||
@@ -20,15 +23,15 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch";
|
||||
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/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch";
|
||||
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/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch";
|
||||
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=";
|
||||
})
|
||||
];
|
||||
@@ -57,8 +60,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nxp-imx/imx-oei";
|
||||
description = "Optional Executable Image assembler for i.MX95 processors";
|
||||
license = [ licenses.bsd3 ];
|
||||
maintainers = with maintainers; [ govindsi ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ let
|
||||
inherit (pkgs.buildPackages) python3;
|
||||
toolchain = pkgs.gccStdenv.cc;
|
||||
binutils = pkgs.gccStdenv.cc.bintools.bintools_bin;
|
||||
cpp = pkgs.gcc;
|
||||
cpp = pkgs.gccStdenv.cc;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "imx95-optee-os";
|
||||
@@ -32,8 +32,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
};
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nxp-imx/imx-optee-os";
|
||||
license = [ licenses.bsd2 ];
|
||||
maintainers = with maintainers; [ govindsi ];
|
||||
license = licenses.bsd2;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
metaBspImx95Rev = "224eed17cddc573061150e9d2ce6f9acb39ea50e"; # scarthgap-6.6.36-EVAL-UCM-iMX95-1.0
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "imx95-sm-fw";
|
||||
version = "lf-6.6.36-2.1.0";
|
||||
@@ -26,23 +29,23 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch";
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch";
|
||||
sha256 = "sha256-zvZ4bNew+yRPmaZQMrAH087KpCLRqz6zdElfe72Dtuc=";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch";
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch";
|
||||
sha256 = "sha256-q72VEvJqm2CmOxdWMqGibgXS5lY08mC4srEcy00QdrE=";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch";
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch";
|
||||
sha256 = "sha256-JzHqDiD/ZOu6VQQI0JxY17RQ3bA2t1aP3O1sjLPguWs=";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch";
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch";
|
||||
sha256 = "sha256-dhcDv7Uq856+MBonczMPznk+tuqUFxTcHiKLX+myCVA=";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch";
|
||||
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch";
|
||||
sha256 = "sha256-NcLu6+zXpiSz1bHKW14Zuf6F/4pzKsekb+zaRtKjSTY=";
|
||||
})
|
||||
];
|
||||
@@ -73,8 +76,13 @@ pkgs.stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nxp-imx/imx-sm";
|
||||
description = "System Manager firmware for i.MX processors";
|
||||
license = [ licenses.bsd3 ];
|
||||
maintainers = with maintainers; [ govindsi ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = [
|
||||
{
|
||||
name = "Govind Singh";
|
||||
email = "govind.singh@tii.ae";
|
||||
}
|
||||
];
|
||||
platforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ stdenv.mkDerivation {
|
||||
|
||||
make ucm-imx95_defconfig
|
||||
cat $extraConfigPath >> .config
|
||||
make olddefconfig
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user