From 9a88c411919d718caa2dff34ac505456d03c867a Mon Sep 17 00:00:00 2001 From: Alper Nebi Yasak Date: Fri, 26 Aug 2022 15:06:45 +0300 Subject: [PATCH] build/roms: Fix building for ARMv7 and AArch64 boards The code that compiles coreboot crossgcc changes the working directory to the coreboot directory, and the following code cannot find the lbmk scripts that it needs to run. Compile ARMv7 and AArch64 cross compilers in a subshell like in the x86 case so the rest of the script can work. Signed-off-by: Alper Nebi Yasak --- resources/scripts/build/boot/roms_helper | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index a6b6431..2805336 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -4,6 +4,7 @@ # # Copyright (C) 2020,2021 Leah Rowe # Copyright (C) 2021 Vitali64 +# Copyright (C) 2022 Alper Nebi Yasak # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -150,13 +151,17 @@ if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then ) fi elif [ "${arch}" = "ARMv7" ]; then - cat version > "${cbdir}/.coreboot-version" - cd "${cbdir}" - make crossgcc-arm CPUS=$(nproc) # This is for armv7, doesn't apply to aarch64 + ( + cat version > "${cbdir}/.coreboot-version" + cd "${cbdir}" + make crossgcc-arm CPUS=$(nproc) # This is for armv7, doesn't apply to aarch64 + ) elif [ "${arch}" = "AArch64" ]; then - cat version > "${cbdir}/.coreboot-version" - cd "${cbdir}" - make crossgcc-aarch64 CPUS=$(nproc) # This is for aarch64, doesn't apply to armv7 + ( + cat version > "${cbdir}/.coreboot-version" + cd "${cbdir}" + make crossgcc-aarch64 CPUS=$(nproc) # This is for aarch64, doesn't apply to armv7 + ) fi if [ ! -f "${cbfstool}" ]; then