summaryrefslogtreecommitdiff
path: root/resources/scripts/build/boot
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-12-07 21:55:05 +0300
committerAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-12-10 14:19:00 +0300
commit5b6bf2a82631f15ad8d3923520e678b9b0065302 (patch)
tree091ede5d7beb4760f44f9feae5b4392a43c424fe /resources/scripts/build/boot
parentbee5054077e8e178cb5dfe1b4ecd1b20d67ee93f (diff)
build/roms: Don't rebuild crossgcc if it was already built
The roms_helper script skips building crossgcc-i386 if its target directory exists. Skip it for other architectures as well. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Diffstat (limited to 'resources/scripts/build/boot')
-rwxr-xr-xresources/scripts/build/boot/roms_helper32
1 files changed, 15 insertions, 17 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper
index abec7402..f533e6ab 100755
--- a/resources/scripts/build/boot/roms_helper
+++ b/resources/scripts/build/boot/roms_helper
@@ -175,36 +175,34 @@ if [ ! -d "${cbdir}" ]; then
./download coreboot ${cbtree}
fi
+cat version > "${cbdir}/.coreboot-version"
+
if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
- (
- cat version > "${cbdir}/.coreboot-version"
- cd "${cbdir}"
- make crossgcc-i386 CPUS=$(nproc) # even for 64-bit machines, coreboot builds
- # 32-bit ROM images, so we only need to worry about i386-elf
- )
+ # Even for 64-bit machines, coreboot builds 32-bit ROM
+ # images, so we only need to worry about i386-elf
+ make -C "${cbdir}" crossgcc-i386 CPUS=$(nproc)
fi
case "$(uname -m)" in
x86*|i*86|amd64) : ;;
*) export CROSS_COMPILE=i386-elf- ;;
esac
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
- )
+ if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
+ make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
+ fi
case "$(uname -m)" in
arm|arm32|armv6*|armv7*) : ;;
*) export CROSS_COMPILE=arm-eabi- ;;
esac
elif [ "${arch}" = "AArch64" ]; then
- (
- cat version > "${cbdir}/.coreboot-version"
- cd "${cbdir}"
- # aarch64 needs armv7 toolchain for arm-trusted-firmware
- make crossgcc-arm crossgcc-aarch64 CPUS=$(nproc)
- )
+ if [ ! -d "${cbdir}/util/crossgcc/xgcc/aarch64-elf/" ]; then
+ make -C "${cbdir}" crossgcc-aarch64 CPUS=$(nproc)
+ fi
+ # aarch64 also needs armv7 toolchain for arm-trusted-firmware
+ if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
+ make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
+ fi
case "$(uname -m)" in
arm64|aarch64) : ;;
*) export CROSS_COMPILE=aarch64-elf- ;;