summaryrefslogtreecommitdiff
path: root/resources/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/build')
-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- ;;