Replace LOADER_FIREWIRE_SUPPORT variable
Rename LOADER_FIREWIRE_SUPPORT to MK_LOADER_FIREWIRE. Only build libfirewire when this is "yes". Add note to updating. Fix build script to build this for x86 so the option doesn't decay. sparc64 supports ZFS, so also build it MK_ZFS=no. Sponsored by: Netflix
This commit is contained in:
parent
96534eedcd
commit
a179cd9114
4
UPDATING
4
UPDATING
@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
||||
|
||||
****************************** SPECIAL WARNING: ******************************
|
||||
|
||||
201711xx:
|
||||
The LOADER_FIREWIRE_SUPPORT build variable as been renamed to
|
||||
WITH_LOADER_FIREWIRE (or WITHOUT_LOADER_FIREWIRE).
|
||||
|
||||
20171106:
|
||||
The naive and non-compliant support of posix_fallocate(2) in ZFS
|
||||
has been removed as of r325320. The system call now returns EINVAL
|
||||
|
@ -180,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \
|
||||
GNU_GREP_COMPAT \
|
||||
HESIOD \
|
||||
LIBSOFT \
|
||||
LOADER_FIREWIRE \
|
||||
LOADER_FORCE_LE \
|
||||
NAND \
|
||||
OFED \
|
||||
|
@ -3,7 +3,13 @@
|
||||
.include <bsd.init.mk>
|
||||
|
||||
SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \
|
||||
libi386 libfirewire loader
|
||||
libi386
|
||||
|
||||
.if ${MK_LOADER_FIREWIRE} == "yes"
|
||||
SUBDIR+= libfirewire
|
||||
.endif
|
||||
|
||||
SUBDIR+= loader
|
||||
|
||||
# special boot programs, 'self-extracting boot2+loader'
|
||||
SUBDIR+= pxeldr
|
||||
|
@ -28,4 +28,9 @@ LD_FLAGS_BIN=-static -N --gc-sections
|
||||
DO32=1
|
||||
.endif
|
||||
|
||||
.if defined(LOADER_FIREWIRE_SUPPORT)
|
||||
MK_LOADER_FIREWIRE=yes
|
||||
.warning "LOADER_FIREWIRE_SUPPORT deprecated, please move to WITH_LOADER_FIREWIRE"
|
||||
.endif
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
@ -26,12 +26,6 @@ VERSION_FILE= ${.CURDIR}/../loader/version
|
||||
# architecture-specific loader code
|
||||
SRCS= main.c conf.c vers.c chain.c
|
||||
|
||||
# Put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf for FireWire/dcons support
|
||||
.if defined(LOADER_FIREWIRE_SUPPORT)
|
||||
CFLAGS+= -DLOADER_FIREWIRE_SUPPORT
|
||||
LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a
|
||||
.endif
|
||||
|
||||
# Include bcache code.
|
||||
HAVE_BCACHE= yes
|
||||
|
||||
@ -39,6 +33,11 @@ HAVE_BCACHE= yes
|
||||
HAVE_PNP= yes
|
||||
HAVE_ISABUS= yes
|
||||
|
||||
.if ${MK_LOADER_FIREWIRE} == "yes"
|
||||
CFLAGS+= -DLOADER_FIREWIRE_SUPPORT
|
||||
LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a
|
||||
.endif
|
||||
|
||||
.if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
|
||||
CFLAGS+= -DLOADER_GELI_SUPPORT
|
||||
CFLAGS+= -I${BOOTSRC}/geli
|
||||
|
@ -19,9 +19,30 @@
|
||||
# Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
|
||||
#
|
||||
|
||||
dobuild()
|
||||
{
|
||||
local ta=$1
|
||||
local lf=$2
|
||||
local opt=$3
|
||||
|
||||
echo -n "Building $ta ${opt} ... "
|
||||
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"
|
||||
}
|
||||
|
||||
top=$(make -V SRCTOP)
|
||||
cd $top/sys/boot
|
||||
|
||||
# Default build for a goodly selection of architectures
|
||||
for i in \
|
||||
amd64/amd64 \
|
||||
arm/arm arm/armeb arm/armv7 \
|
||||
@ -32,34 +53,24 @@ for i in \
|
||||
sparc64/sparc64 \
|
||||
; do
|
||||
ta=${i##*/}
|
||||
echo -n "Building $ta..."
|
||||
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
||||
> _.boot.${ta}.log 2>&1; then
|
||||
echo "Fail (cleanup)"
|
||||
continue
|
||||
fi
|
||||
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -j 20 all" \
|
||||
>> _.boot.${ta}.log 2>&1; then
|
||||
echo "Fail (build)"
|
||||
continue
|
||||
fi
|
||||
echo "Success"
|
||||
dobuild $ta _.boot.${ta}.log ""
|
||||
done
|
||||
|
||||
# Build w/o ZFS
|
||||
for i in \
|
||||
amd64/amd64 \
|
||||
i386/i386 \
|
||||
sparc64/sparc64 \
|
||||
; do
|
||||
ta=${i##*/}
|
||||
dobuild $ta _.boot.${ta}.noZFS.log "MK_ZFS=no"
|
||||
done
|
||||
|
||||
# Build with firewire
|
||||
for i in \
|
||||
amd64/amd64 \
|
||||
i386/i386 \
|
||||
; do
|
||||
ta=${i##*/}
|
||||
echo -n "Building $ta MK_ZFS=no..."
|
||||
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
||||
> _.boot.${ta}.noZFS.log 2>&1; then
|
||||
echo "Fail (cleanup)"
|
||||
continue
|
||||
fi
|
||||
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make MK_ZFS=no -j 20 all" \
|
||||
>> _.boot.${ta}.noZFS.log 2>&1; then
|
||||
echo "Fail (build)"
|
||||
continue
|
||||
fi
|
||||
echo "Success"
|
||||
dobuild $ta _.boot.${ta}.firewire.log "MK_LOADER_FIREWIRE=yes"
|
||||
done
|
||||
|
3
tools/build/options/WITH_LOADER_FIREWIRE
Normal file
3
tools/build/options/WITH_LOADER_FIREWIRE
Normal file
@ -0,0 +1,3 @@
|
||||
.\" $FreeBSD$
|
||||
Enable firewire support in /boot/loader and /boot/zfsloader on x86.
|
||||
This option is a nop on all other platforms.
|
Loading…
Reference in New Issue
Block a user