universe.sh revision 328902
1#!/bin/sh
2
3# $FreeBSD: stable/11/tools/boot/universe.sh 328902 2018-02-05 21:29:27Z kevans $
4
5#
6# Full list of all arches, but we only build a subset. All different mips add any
7# value, and there's a few others we just don't support.
8#
9#	mips/mipsel mips/mips mips/mips64el mips/mips64 mips/mipsn32 \
10#	mips/mipselhf mips/mipshf mips/mips64elhf mips/mips64hf \
11#	powerpc/powerpc powerpc/powerpc64 powerpc/powerpcspe \
12#	riscv/riscv64 riscv/riscv64sf
13#
14# This script is expected to be run in sys/boot (though you could run it anywhere
15# in the tree). It does a full clean build. For sys/boot you can do all the archs in
16# about a minute or two on a fast machine. It's also possible that you need a full
17# make universe for this to work completely.
18#
19# Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
20#
21
22top=$(make -V SRCTOP)
23cd $top/sys/boot
24
25for i in \
26	amd64/amd64 \
27	arm/arm arm/armeb \
28	arm64/aarch64 \
29	i386/i386 \
30	mips/mips mips/mips64 \
31	powerpc/powerpc powerpc/powerpc64 \
32	sparc64/sparc64 \
33	; do
34    ta=${i##*/}
35    echo -n "Building $ta..."
36    if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend"  \
37	 > _.boot.${ta}.log 2>&1; then
38	echo "Fail (cleanup)"
39	continue
40    fi
41    if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -j 20 all"  \
42	 >> _.boot.${ta}.log 2>&1; then
43	echo "Fail (build)"
44	continue
45    fi
46    echo "Success"
47done
48for i in \
49	amd64/amd64 \
50	i386/i386 \
51	; do
52    ta=${i##*/}
53    echo -n "Building $ta MK_ZFS=no..."
54    if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend"  \
55	 > _.boot.${ta}.noZFS.log 2>&1; then
56	echo "Fail (cleanup)"
57	continue
58    fi
59    if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make MK_ZFS=no -j 20 all"  \
60	 >> _.boot.${ta}.noZFS.log 2>&1; then
61	echo "Fail (build)"
62	continue
63    fi
64    echo "Success"
65done
66