diff --git a/UPDATING b/UPDATING index 2a8946c7786a..a84a9ecd63ef 100644 --- a/UPDATING +++ b/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 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 83eb875bcbe2..4ef52cb1689c 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -180,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ + LOADER_FIREWIRE \ LOADER_FORCE_LE \ NAND \ OFED \ diff --git a/sys/boot/i386/Makefile b/sys/boot/i386/Makefile index af74d6954dac..9a1663abab07 100644 --- a/sys/boot/i386/Makefile +++ b/sys/boot/i386/Makefile @@ -3,7 +3,13 @@ .include 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 diff --git a/sys/boot/i386/Makefile.inc b/sys/boot/i386/Makefile.inc index b324d1adfef5..5c36555f940c 100644 --- a/sys/boot/i386/Makefile.inc +++ b/sys/boot/i386/Makefile.inc @@ -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" diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile index d97d1bcd549d..e9d8f897a164 100644 --- a/sys/boot/i386/loader/Makefile +++ b/sys/boot/i386/loader/Makefile @@ -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 diff --git a/tools/boot/universe.sh b/tools/boot/universe.sh index fa11ad2dde7e..2f367c1c2bd0 100755 --- a/tools/boot/universe.sh +++ b/tools/boot/universe.sh @@ -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 diff --git a/tools/build/options/WITH_LOADER_FIREWIRE b/tools/build/options/WITH_LOADER_FIREWIRE new file mode 100644 index 000000000000..a8f8924934b3 --- /dev/null +++ b/tools/build/options/WITH_LOADER_FIREWIRE @@ -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.