2017-10-23 00:52:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#
|
2022-07-08 19:07:39 +02:00
|
|
|
# Full list of all arches we don't build.
|
2017-10-23 00:52:23 +02:00
|
|
|
#
|
2024-06-20 11:26:20 +02:00
|
|
|
# powerpc/powerpcspe
|
2017-10-23 00:52:23 +02:00
|
|
|
#
|
2017-11-15 00:02:19 +01:00
|
|
|
# This script is expected to be run in stand (though you could run it anywhere
|
|
|
|
# in the tree). It does a full clean build. For stand you can do all the archs in
|
2017-10-23 00:52:23 +02:00
|
|
|
# about a minute or two on a fast machine. It's also possible that you need a full
|
|
|
|
# make universe for this to work completely.
|
|
|
|
#
|
|
|
|
# Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
|
|
|
|
#
|
|
|
|
|
2020-05-01 19:16:57 +02:00
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo $*
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2017-11-11 00:54:41 +01:00
|
|
|
dobuild()
|
|
|
|
{
|
|
|
|
local ta=$1
|
|
|
|
local lf=$2
|
|
|
|
local opt=$3
|
|
|
|
|
|
|
|
echo -n "Building $ta ${opt} ... "
|
2017-12-04 17:38:20 +01:00
|
|
|
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
|
2020-05-01 19:16:57 +02:00
|
|
|
case ${objdir} in
|
|
|
|
/*) ;;
|
|
|
|
make*) echo Error message from make: $objdir
|
|
|
|
continue ;;
|
|
|
|
*) die Crazy object dir: $objdir ;;
|
|
|
|
esac
|
2017-12-04 02:14:17 +01:00
|
|
|
rm -rf ${objdir}
|
2017-11-11 00:54:41 +01:00
|
|
|
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
|
|
|
> $lf 2>&1; then
|
|
|
|
echo "Fail (cleanup)"
|
|
|
|
continue
|
|
|
|
fi
|
2022-07-08 19:07:39 +02:00
|
|
|
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make ${opt} -j 40 all" \
|
2017-11-11 00:54:41 +01:00
|
|
|
>> $lf 2>&1; then
|
|
|
|
echo "Fail (build)"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
echo "Success"
|
|
|
|
}
|
|
|
|
|
2017-10-25 17:27:48 +02:00
|
|
|
top=$(make -V SRCTOP)
|
2017-11-15 00:02:19 +01:00
|
|
|
cd $top/stand
|
2017-10-25 17:27:48 +02:00
|
|
|
|
2017-12-08 20:57:21 +01:00
|
|
|
# Build without forth
|
|
|
|
for i in \
|
2022-07-08 19:07:39 +02:00
|
|
|
arm64/aarch64 \
|
2017-12-08 20:57:21 +01:00
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.no_forth.log "WITHOUT_FORTH=yes"
|
|
|
|
done
|
2017-12-04 02:14:17 +01:00
|
|
|
|
|
|
|
# Build without GELI
|
|
|
|
for i in \
|
2022-07-08 19:07:39 +02:00
|
|
|
arm64/aarch64 \
|
2017-12-04 02:14:17 +01:00
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.no_geli.log "WITHOUT_LOADER_GEIL=yes"
|
|
|
|
done
|
|
|
|
|
2022-07-08 19:07:39 +02:00
|
|
|
# Default build for a almost all architectures
|
2017-10-23 00:52:23 +02:00
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
2020-05-01 19:17:01 +02:00
|
|
|
arm/armv7 \
|
2017-10-23 00:52:23 +02:00
|
|
|
arm64/aarch64 \
|
|
|
|
i386/i386 \
|
2022-07-08 19:07:39 +02:00
|
|
|
powerpc/powerpc \
|
|
|
|
powerpc/powerpc64 \
|
|
|
|
powerpc/powerpc64le \
|
|
|
|
riscv/riscv64 \
|
2017-10-23 00:52:23 +02:00
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
2017-11-11 00:54:41 +01:00
|
|
|
dobuild $ta _.boot.${ta}.log ""
|
2017-10-30 04:12:34 +01:00
|
|
|
done
|
2017-11-11 00:54:41 +01:00
|
|
|
|
|
|
|
# Build w/o ZFS
|
2017-10-30 04:12:34 +01:00
|
|
|
for i in \
|
2022-07-08 19:07:39 +02:00
|
|
|
arm64/aarch64 \
|
2017-10-30 04:12:34 +01:00
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
2022-07-24 23:51:06 +02:00
|
|
|
dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_ZFS=no"
|
2017-11-11 00:54:41 +01:00
|
|
|
done
|
2024-02-18 07:28:33 +01:00
|
|
|
|
|
|
|
# Build w/ LOADER_BIOS_TEXTONLY
|
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_BIOS_TEXTONLY=yes"
|
|
|
|
done
|