Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nxp/common/bsp/imx-mkimage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ pkgs.stdenv.mkDerivation rec {
--replace 'CC = gcc' 'CC = clang'
'';

nativeBuildInputs = [
clang
git
depsBuildBuild = [
pkgs.buildPackages.stdenv.cc
];

buildInputs = [
nativeBuildInputs = [
clang
git
glibc.static
];
Expand Down
4 changes: 2 additions & 2 deletions nxp/common/bsp/imx-optee-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
inherit (pkgs.buildPackages) python3;
toolchain = pkgs.stdenv.cc;
binutils = pkgs.stdenv.cc.bintools.bintools_bin;
cpp = pkgs.stdenv.gcc;
cpp = pkgs.stdenv.cc;

# Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor
# Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx")
Expand Down Expand Up @@ -58,7 +58,7 @@ pkgs.stdenv.mkDerivation {
substituteInPlace mk/gcc.mk \
--replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar
substituteInPlace mk/gcc.mk \
--replace-fail "\$(CROSS_COMPILE_\$(sm))cpp"${cpp}/bin/${toolchain.targetPrefix}cpp
--replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/${toolchain.targetPrefix}cpp
'';

makeFlags = [
Expand Down
23 changes: 8 additions & 15 deletions nxp/imx8mp-evk/bsp/imx8mp-boot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pkgs,
enable-tee ? true,
}:
with pkgs;
let
fw-ver = "202006";
cp-tee = if enable-tee then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" else "";
Expand All @@ -22,30 +21,24 @@ let
shortRev = builtins.substring 0 8 src.rev;
in
{
imx8m-boot = pkgs.stdenv.mkDerivation rec {
imx8m-boot = pkgs.buildPackages.stdenv.mkDerivation {
inherit src;
name = "imx8mp-mkimage";
version = "lf-6.1.55-2.2.0";

postPatch = ''
substituteInPlace Makefile \
--replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}'
substituteInPlace Makefile \
--replace 'CC = gcc' 'CC = clang'
patchShebangs scripts
'';

nativeBuildInputs = [
clang
git
dtc
];

buildInputs = [
git
glibc.static
zlib
zlib.static
pkgs.buildPackages.stdenv.cc
pkgs.buildPackages.git
pkgs.buildPackages.dtc
pkgs.buildPackages.glibc.static
pkgs.buildPackages.zlib
pkgs.buildPackages.zlib.static
];

buildPhase = ''
Expand All @@ -54,7 +47,7 @@ in
make bin
make SOC=iMX8MP mkimage_imx8

cp -v ${pkgs.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot
cp -v ${pkgs.buildPackages.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot

install -m 0644 ${imx8mp-uboot}/u-boot-spl.bin ./iMX8M/u-boot-spl.bin
install -m 0644 ${imx8mp-uboot}/u-boot-nodtb.bin ./iMX8M/u-boot-nodtb.bin
Expand Down
2 changes: 1 addition & 1 deletion nxp/imx8mp-evk/bsp/imx8mp-firmware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
dontStrip = true;

installPhase = ''
${pkgs.bash}/bin/bash $src --auto-accept --force
${pkgs.buildPackages.bash}/bin/bash $src --auto-accept --force
mv firmware-imx-${version} $out
'';
}