From owner-svn-src-head@freebsd.org Fri Nov 10 23:54:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B70B2E541A9; Fri, 10 Nov 2017 23:54:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6941D68EFB; Fri, 10 Nov 2017 23:54:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAANsgsR075142; Fri, 10 Nov 2017 23:54:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAANsf83075135; Fri, 10 Nov 2017 23:54:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711102354.vAANsf83075135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 10 Nov 2017 23:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325692 - in head: . share/mk sys/boot/i386 sys/boot/i386/loader tools/boot tools/build/options X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/mk sys/boot/i386 sys/boot/i386/loader tools/boot tools/build/options X-SVN-Commit-Revision: 325692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2017 23:54:45 -0000 Author: imp Date: Fri Nov 10 23:54:41 2017 New Revision: 325692 URL: https://svnweb.freebsd.org/changeset/base/325692 Log: 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 Added: head/tools/build/options/WITH_LOADER_FIREWIRE (contents, props changed) Modified: head/UPDATING head/share/mk/src.opts.mk head/sys/boot/i386/Makefile head/sys/boot/i386/Makefile.inc head/sys/boot/i386/loader/Makefile head/tools/boot/universe.sh Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Nov 10 23:54:36 2017 (r325691) +++ head/UPDATING Fri Nov 10 23:54:41 2017 (r325692) @@ -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 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Nov 10 23:54:36 2017 (r325691) +++ head/share/mk/src.opts.mk Fri Nov 10 23:54:41 2017 (r325692) @@ -180,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ + LOADER_FIREWIRE \ LOADER_FORCE_LE \ NAND \ OFED \ Modified: head/sys/boot/i386/Makefile ============================================================================== --- head/sys/boot/i386/Makefile Fri Nov 10 23:54:36 2017 (r325691) +++ head/sys/boot/i386/Makefile Fri Nov 10 23:54:41 2017 (r325692) @@ -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 Modified: head/sys/boot/i386/Makefile.inc ============================================================================== --- head/sys/boot/i386/Makefile.inc Fri Nov 10 23:54:36 2017 (r325691) +++ head/sys/boot/i386/Makefile.inc Fri Nov 10 23:54:41 2017 (r325692) @@ -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" Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Fri Nov 10 23:54:36 2017 (r325691) +++ head/sys/boot/i386/loader/Makefile Fri Nov 10 23:54:41 2017 (r325692) @@ -26,18 +26,17 @@ 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 # Enable PnP and ISA-PnP code. 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 Modified: head/tools/boot/universe.sh ============================================================================== --- head/tools/boot/universe.sh Fri Nov 10 23:54:36 2017 (r325691) +++ head/tools/boot/universe.sh Fri Nov 10 23:54:41 2017 (r325692) @@ -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##*/} - 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}.noZFS.log "MK_ZFS=no" +done + +# Build with firewire +for i in \ + amd64/amd64 \ + i386/i386 \ + ; do + ta=${i##*/} + dobuild $ta _.boot.${ta}.firewire.log "MK_LOADER_FIREWIRE=yes" done Added: head/tools/build/options/WITH_LOADER_FIREWIRE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LOADER_FIREWIRE Fri Nov 10 23:54:41 2017 (r325692) @@ -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.