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>fsdg20230625
parent
bee5054077
commit
5b6bf2a826
|
@ -175,36 +175,34 @@ if [ ! -d "${cbdir}" ]; then
|
||||||
./download coreboot ${cbtree}
|
./download coreboot ${cbtree}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cat version > "${cbdir}/.coreboot-version"
|
||||||
|
|
||||||
if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
|
if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
|
||||||
if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
|
if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
|
||||||
(
|
# Even for 64-bit machines, coreboot builds 32-bit ROM
|
||||||
cat version > "${cbdir}/.coreboot-version"
|
# images, so we only need to worry about i386-elf
|
||||||
cd "${cbdir}"
|
make -C "${cbdir}" crossgcc-i386 CPUS=$(nproc)
|
||||||
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
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
x86*|i*86|amd64) : ;;
|
x86*|i*86|amd64) : ;;
|
||||||
*) export CROSS_COMPILE=i386-elf- ;;
|
*) export CROSS_COMPILE=i386-elf- ;;
|
||||||
esac
|
esac
|
||||||
elif [ "${arch}" = "ARMv7" ]; then
|
elif [ "${arch}" = "ARMv7" ]; then
|
||||||
(
|
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
|
||||||
cat version > "${cbdir}/.coreboot-version"
|
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
|
||||||
cd "${cbdir}"
|
fi
|
||||||
make crossgcc-arm CPUS=$(nproc) # This is for armv7, doesn't apply to aarch64
|
|
||||||
)
|
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
arm|arm32|armv6*|armv7*) : ;;
|
arm|arm32|armv6*|armv7*) : ;;
|
||||||
*) export CROSS_COMPILE=arm-eabi- ;;
|
*) export CROSS_COMPILE=arm-eabi- ;;
|
||||||
esac
|
esac
|
||||||
elif [ "${arch}" = "AArch64" ]; then
|
elif [ "${arch}" = "AArch64" ]; then
|
||||||
(
|
if [ ! -d "${cbdir}/util/crossgcc/xgcc/aarch64-elf/" ]; then
|
||||||
cat version > "${cbdir}/.coreboot-version"
|
make -C "${cbdir}" crossgcc-aarch64 CPUS=$(nproc)
|
||||||
cd "${cbdir}"
|
fi
|
||||||
# aarch64 needs armv7 toolchain for arm-trusted-firmware
|
# aarch64 also needs armv7 toolchain for arm-trusted-firmware
|
||||||
make crossgcc-arm crossgcc-aarch64 CPUS=$(nproc)
|
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
|
||||||
)
|
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
|
||||||
|
fi
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
arm64|aarch64) : ;;
|
arm64|aarch64) : ;;
|
||||||
*) export CROSS_COMPILE=aarch64-elf- ;;
|
*) export CROSS_COMPILE=aarch64-elf- ;;
|
||||||
|
|
Loading…
Reference in New Issue