ucm-imx95: use --replace-fail for substituteInPlace

This commit is contained in:
Jörg Thalheim 2025-10-30 14:52:19 +01:00
parent 8650454db6
commit 86d9291cc3
5 changed files with 22 additions and 22 deletions

View file

@ -28,15 +28,15 @@ in
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' --replace-fail 'git rev-parse --short=8 HEAD' 'echo ${shortRev}'
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace 'CC = gcc' 'CC = clang' --replace-fail 'CC = gcc' 'CC = clang'
substituteInPlace iMX95/soc.mak \ substituteInPlace iMX95/soc.mak \
--replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
substituteInPlace scripts/fspi_fcb_gen.sh \ substituteInPlace scripts/fspi_fcb_gen.sh \
--replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
substituteInPlace scripts/fspi_packer.sh \ substituteInPlace scripts/fspi_packer.sh \
--replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
patchShebangs scripts patchShebangs scripts
''; '';

View file

@ -35,9 +35,9 @@ pkgs.stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
substituteInPlace oei/makefiles/build_info.mak \ substituteInPlace oei/makefiles/build_info.mak \
--replace "/bin/echo" "echo" --replace-fail "/bin/echo" "echo"
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "/bin/echo" "echo" --replace-fail "/bin/echo" "echo"
''; '';
makeFlags = [ makeFlags = [

View file

@ -35,9 +35,9 @@ pkgs.stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
substituteInPlace oei/makefiles/build_info.mak \ substituteInPlace oei/makefiles/build_info.mak \
--replace "/bin/echo" "echo" --replace-fail "/bin/echo" "echo"
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "/bin/echo" "echo" --replace-fail "/bin/echo" "echo"
''; '';
makeFlags = [ makeFlags = [

View file

@ -39,25 +39,25 @@ pkgs.stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
substituteInPlace scripts/arm32_sysreg.py \ substituteInPlace scripts/arm32_sysreg.py \
--replace '/usr/bin/env python3' '${python3}/bin/python' --replace-fail '/usr/bin/env python3' '${python3}/bin/python'
substituteInPlace scripts/gen_tee_bin.py \ substituteInPlace scripts/gen_tee_bin.py \
--replace '/usr/bin/env python3' '${python3}/bin/python' --replace-fail '/usr/bin/env python3' '${python3}/bin/python'
substituteInPlace scripts/pem_to_pub_c.py \ substituteInPlace scripts/pem_to_pub_c.py \
--replace '/usr/bin/env python3' '${python3}/bin/python' --replace-fail '/usr/bin/env python3' '${python3}/bin/python'
substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \
--replace '/bin/bash' '${pkgs.bash}/bin/bash' --replace-fail '/bin/bash' '${pkgs.bash}/bin/bash'
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy --replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump --replace-fail "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm --replace-fail "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf --replace-fail "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar
substituteInPlace mk/gcc.mk \ substituteInPlace mk/gcc.mk \
--replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp
''; '';
makeFlags = [ makeFlags = [

View file

@ -49,11 +49,11 @@ pkgs.stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
substituteInPlace sm/makefiles/gcc_cross.mak \ substituteInPlace sm/makefiles/gcc_cross.mak \
--replace "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy --replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy
substituteInPlace sm/makefiles/build_info.mak \ substituteInPlace sm/makefiles/build_info.mak \
--replace "/bin/echo" "echo" --replace-fail "/bin/echo" "echo"
substituteInPlace sm/makefiles/gcc_cross.mak \ substituteInPlace sm/makefiles/gcc_cross.mak \
--replace 'SM_CROSS_COMPILE ?= $(TOOLS)/arm-gnu-toolchain-*-none-eabi/bin/arm-none-eabi-' \ --replace-fail 'SM_CROSS_COMPILE ?= $(TOOLS)/arm-gnu-toolchain-*-none-eabi/bin/arm-none-eabi-' \
'SM_CROSS_COMPILE ?= $(CROSS_COMPILE)' 'SM_CROSS_COMPILE ?= $(CROSS_COMPILE)'
''; '';