2017-10-22 22:52:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
#
|
|
|
|
# Full list of all arches, but we only build a subset. All different mips add any
|
|
|
|
# value, and there's a few others we just don't support.
|
|
|
|
#
|
|
|
|
# mips/mipsel mips/mips mips/mips64el mips/mips64 mips/mipsn32 \
|
|
|
|
# mips/mipselhf mips/mipshf mips/mips64elhf mips/mips64hf \
|
|
|
|
# powerpc/powerpc powerpc/powerpc64 powerpc/powerpcspe \
|
|
|
|
# riscv/riscv64 riscv/riscv64sf
|
|
|
|
#
|
2017-11-14 23:02:19 +00: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-22 22:52:23 +00: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.
|
|
|
|
#
|
|
|
|
|
2017-11-10 23:54:41 +00:00
|
|
|
dobuild()
|
|
|
|
{
|
|
|
|
local ta=$1
|
|
|
|
local lf=$2
|
|
|
|
local opt=$3
|
|
|
|
|
|
|
|
echo -n "Building $ta ${opt} ... "
|
2017-12-04 16:38:20 +00:00
|
|
|
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
|
2017-12-04 01:14:17 +00:00
|
|
|
rm -rf ${objdir}
|
2017-11-10 23:54:41 +00:00
|
|
|
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
|
|
|
> $lf 2>&1; then
|
|
|
|
echo "Fail (cleanup)"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make ${opt} -j 20 all" \
|
|
|
|
>> $lf 2>&1; then
|
|
|
|
echo "Fail (build)"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
echo "Success"
|
|
|
|
}
|
|
|
|
|
2017-10-25 15:27:48 +00:00
|
|
|
top=$(make -V SRCTOP)
|
2017-11-14 23:02:19 +00:00
|
|
|
cd $top/stand
|
2017-10-25 15:27:48 +00:00
|
|
|
|
2017-12-08 19:57:21 +00:00
|
|
|
# Build without forth
|
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.no_forth.log "WITHOUT_FORTH=yes"
|
|
|
|
done
|
2017-12-04 01:14:17 +00:00
|
|
|
|
|
|
|
# Build without GELI
|
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.no_geli.log "WITHOUT_LOADER_GEIL=yes"
|
|
|
|
done
|
|
|
|
|
2017-11-10 23:54:41 +00:00
|
|
|
# Default build for a goodly selection of architectures
|
2017-10-22 22:52:23 +00:00
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
2018-07-09 18:02:23 +00:00
|
|
|
arm/arm arm/armv7 \
|
2017-10-22 22:52:23 +00:00
|
|
|
arm64/aarch64 \
|
|
|
|
i386/i386 \
|
|
|
|
mips/mips mips/mips64 \
|
|
|
|
powerpc/powerpc powerpc/powerpc64 \
|
|
|
|
sparc64/sparc64 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
2017-11-10 23:54:41 +00:00
|
|
|
dobuild $ta _.boot.${ta}.log ""
|
2017-10-30 03:12:34 +00:00
|
|
|
done
|
2017-11-10 23:54:41 +00:00
|
|
|
|
2018-02-12 15:32:05 +00:00
|
|
|
# Default build for a goodly selection of architectures with Lua
|
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
2018-07-09 18:02:23 +00:00
|
|
|
arm/arm arm/armv7 \
|
2018-02-12 15:32:05 +00:00
|
|
|
arm64/aarch64 \
|
|
|
|
i386/i386 \
|
|
|
|
mips/mips mips/mips64 \
|
|
|
|
powerpc/powerpc powerpc/powerpc64 \
|
|
|
|
sparc64/sparc64 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.lua.log "MK_LOADEDER_LUA=yes MK_FORTH=no"
|
|
|
|
done
|
|
|
|
|
2017-11-10 23:54:41 +00:00
|
|
|
# Build w/o ZFS
|
2017-10-30 03:12:34 +00:00
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
2017-11-10 23:54:41 +00:00
|
|
|
sparc64/sparc64 \
|
2017-10-30 03:12:34 +00:00
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
2017-11-10 23:54:48 +00:00
|
|
|
dobuild $ta _.boot.${ta}.no_zfs.log "MK_ZFS=no"
|
2017-11-10 23:54:41 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Build with firewire
|
|
|
|
for i in \
|
|
|
|
amd64/amd64 \
|
|
|
|
i386/i386 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.firewire.log "MK_LOADER_FIREWIRE=yes"
|
2017-10-22 22:52:23 +00:00
|
|
|
done
|
2018-02-21 23:49:18 +00:00
|
|
|
|
|
|
|
# Build with LOADER_DEBUG, only sparc64 does this.
|
|
|
|
for i in \
|
|
|
|
sparc64/sparc64 \
|
|
|
|
; do
|
|
|
|
ta=${i##*/}
|
|
|
|
dobuild $ta _.boot.${ta}.debug.log "LOADER_DEBUG=yes"
|
|
|
|
done
|
|
|
|
|