]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/boot/universe.sh
libfido2: update to 1.9.0
[FreeBSD/FreeBSD.git] / tools / boot / universe.sh
1 #!/bin/sh
2
3 # $FreeBSD$
4
5 #
6 # Full list of all arches we don't build.
7 #
8 #       powerpc/powerpcspe arm/armv6
9 #
10 # This script is expected to be run in stand (though you could run it anywhere
11 # in the tree). It does a full clean build. For stand you can do all the archs in
12 # about a minute or two on a fast machine. It's also possible that you need a full
13 # make universe for this to work completely.
14 #
15 # Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
16 #
17
18 die()
19 {
20     echo $*
21     exit 1
22 }
23
24 dobuild()
25 {
26     local ta=$1
27     local lf=$2
28     local opt=$3
29
30     echo -n "Building $ta ${opt} ... "
31     objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
32     case ${objdir} in
33         /*) ;;
34         make*) echo Error message from make: $objdir
35                continue ;;
36         *) die Crazy object dir: $objdir ;;
37     esac
38     rm -rf ${objdir}
39     if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend"  \
40          > $lf 2>&1; then
41         echo "Fail (cleanup)"
42         continue
43     fi
44     if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make ${opt} -j 40 all"  \
45          >> $lf 2>&1; then
46         echo "Fail (build)"
47         continue
48     fi
49     echo "Success"
50 }
51
52 top=$(make -V SRCTOP)
53 cd $top/stand
54
55 # Build without forth
56 for i in \
57         arm64/aarch64 \
58         amd64/amd64 \
59         i386/i386 \
60         ; do
61     ta=${i##*/}
62     dobuild $ta _.boot.${ta}.no_forth.log "WITHOUT_FORTH=yes"
63 done
64
65 # Build without GELI
66 for i in \
67         arm64/aarch64 \
68         amd64/amd64 \
69         i386/i386 \
70         ; do
71     ta=${i##*/}
72     dobuild $ta _.boot.${ta}.no_geli.log "WITHOUT_LOADER_GEIL=yes"
73 done
74
75 # Default build for a almost all architectures
76 for i in \
77         amd64/amd64 \
78         arm/armv7 \
79         arm64/aarch64 \
80         i386/i386 \
81         powerpc/powerpc \
82         powerpc/powerpc64 \
83         powerpc/powerpc64le \
84         riscv/riscv64 \
85         ; do
86     ta=${i##*/}
87     dobuild $ta _.boot.${ta}.log ""
88 done
89
90 # Build w/o ZFS
91 for i in \
92         arm64/aarch64 \
93         amd64/amd64 \
94         i386/i386 \
95         ; do
96     ta=${i##*/}
97     dobuild $ta _.boot.${ta}.no_zfs.log "MK_LOADER_ZFS=no"
98 done