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