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 <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2022-08-26 15:06:45 +03:00 committed by Denis 'GNUtoo' Carikli
parent aea8465b59
commit 9a88c41191
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
1 changed files with 11 additions and 6 deletions

View File

@ -4,6 +4,7 @@
#
# Copyright (C) 2020,2021 Leah Rowe <info@minifree.org>
# Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com>
# Copyright (C) 2022 Alper Nebi Yasak <alpernebiyasak@gmail.com>
#
# 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