1#!/bin/sh 2 3# $FreeBSD$ 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 stand (though you could run it anywhere 15# in the tree). It does a full clean build. For stand 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 22dobuild() 23{ 24 local ta=$1 25 local lf=$2 26 local opt=$3 27 28 echo -n "Building $ta ${opt} ... " 29 if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \ 30 > $lf 2>&1; then 31 echo "Fail (cleanup)" 32 continue 33 fi 34 if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make ${opt} -j 20 all" \ 35 >> $lf 2>&1; then 36 echo "Fail (build)" 37 continue 38 fi 39 echo "Success" 40} 41 42top=$(make -V SRCTOP) 43cd $top/stand 44 45# Default build for a goodly selection of architectures 46for i in \ 47 amd64/amd64 \ 48 arm/arm arm/armeb arm/armv7 \ 49 arm64/aarch64 \ 50 i386/i386 \ 51 mips/mips mips/mips64 \ 52 powerpc/powerpc powerpc/powerpc64 \ 53 sparc64/sparc64 \ 54 ; do 55 ta=${i##*/} 56 dobuild $ta _.boot.${ta}.log "" 57done 58 59# Build w/o ZFS 60for i in \ 61 amd64/amd64 \ 62 i386/i386 \ 63 sparc64/sparc64 \ 64 ; do 65 ta=${i##*/} 66 dobuild $ta _.boot.${ta}.no_zfs.log "MK_ZFS=no" 67done 68 69# Build with firewire 70for i in \ 71 amd64/amd64 \ 72 i386/i386 \ 73 ; do 74 ta=${i##*/} 75 dobuild $ta _.boot.${ta}.firewire.log "MK_LOADER_FIREWIRE=yes" 76done 77 78# Build without GELI 79for i in \ 80 amd64/amd64 \ 81 i386/i386 \ 82 ; do 83 ta=${i##*/} 84 dobuild $ta _.boot.${ta}.no_geli.log "MK_LOADER_GELI=no" 85done 86