Index: head/share/mk/src.opts.mk =================================================================== --- head/share/mk/src.opts.mk (revision 286821) +++ head/share/mk/src.opts.mk (revision 286822) @@ -1,401 +1,400 @@ # $FreeBSD$ # # Option file for FreeBSD /usr/src builds. # # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} # with sensible (usually) defaults. # # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that # are applicable for that Makefile (typically there are none, but sometimes there # are exceptions). Recursive makes usually add MK_FOO=no for options that they wish # to omit from that make. # # Makefiles must include bsd.mkopt.mk before they test the value of any MK_FOO # variable. # # Makefiles may also assume that this file is included by src.opts.mk should it # need variables defined there prior to the end of the Makefile where # bsd.{subdir,lib.bin}.mk is traditionally included. # # The old-style YES_FOO and NO_FOO are being phased out. No new instances of them # should be added. Old instances should be removed since they were just to # bridge the gap between FreeBSD 4 and FreeBSD 5. # # Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an # exception is made for _WITHOUT_SRCONF which turns off this mechanism # completely inside bsd.*.mk files). # .if !target(____) ____: .include # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `== "no"' or `!= "no"' in makefiles. # The NO_* variables should only be set by makefiles for variables # that haven't been converted over. # # These options are used by src the builds __DEFAULT_YES_OPTIONS = \ ACCT \ ACPI \ AMD \ APM \ AT \ ATM \ AUDIT \ AUTHPF \ AUTOFS \ BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ BOOT \ BOOTPARAMD \ BOOTPD \ BSD_CPIO \ BSDINSTALL \ BSNMP \ BZIP2 \ CALENDAR \ CAPSICUM \ CASPER \ CCD \ CDDL \ CPP \ CROSS_COMPILER \ CRYPT \ CTM \ CUSE \ CXX \ DICT \ DMAGENT \ DYNAMICROOT \ ED_CRYPTO \ EE \ EXAMPLES \ FDT \ FILE \ FINGER \ FLOPPY \ FMTREE \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ FTP \ GAMES \ GCOV \ GDB \ GNU \ GNU_GREP_COMPAT \ GPIO \ GPL_DTC \ GROFF \ HAST \ HTML \ HYPERV \ ICONV \ INET \ INET6 \ INETD \ IPFILTER \ IPFW \ ISCSI \ JAIL \ KDUMP \ KVM \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ LIBTHR \ LOCALES \ LOCATE \ LPR \ LS_COLORS \ LZMA_SUPPORT \ MAIL \ MAILWRAPPER \ MAKE \ MANDOCDB \ NDIS \ NETCAT \ NETGRAPH \ NLS_CATALOGS \ NS_CACHING \ NTP \ OPENSSL \ PAM \ PC_SYSINSTALL \ PF \ PKGBOOTSTRAP \ PMC \ PORTSNAP \ PPP \ QUOTAS \ RADIUS_SUPPORT \ RCMDS \ RBOOTD \ RCS \ RESCUE \ ROUTED \ SENDMAIL \ SETUID_LOGIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ SOURCELESS_UCODE \ SVNLITE \ SYSCONS \ - SYSINSTALL \ TALK \ TCP_WRAPPERS \ TCSH \ TELNET \ TESTS \ TEXTPROC \ TFTP \ TIMED \ UNBOUND \ USB \ UTMPX \ VI \ VT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ ZONEINFO __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ EISA \ HESIOD \ LLDB \ NAND \ OFED \ OPENLDAP \ OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN # # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not # used at all in bsd.*.mk, but we have to make an exception here if we want # to allow defaults for some things like clang to vary by target architecture. # Additional, per-target behavior should be rarely added only after much # gnashing of teeth and grinding of gears. # .if defined(TARGET_ARCH) __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif .if defined(TARGET) __TT=${TARGET} .else __TT=${MACHINE} .endif .include .if !${COMPILER_FEATURES:Mc++11} # If the compiler is not C++11 capable, disable clang and use gcc instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \ ${__T} == "i386" # On x86 and arm, clang is enabled, and will be installed as the default cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .elif ${__T:Mpowerpc*} # On powerpc, clang is enabled, but gcc is installed as the default cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables clang, and uses gcc instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif .if ${__T} == "aarch64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB __DEFAULT_YES_OPTIONS+=ELFCOPY_AS_OBJCOPY .else __DEFAULT_NO_OPTIONS+=ELFCOPY_AS_OBJCOPY .endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 .if ${__T} == "arm" || ${__T} == "armeb" BROKEN_OPTIONS+=LLDB .endif .include # # MK_* options that default to "yes" if the compiler is a C++11 compiler. # .for var in \ LIBCPLUSPLUS .if !defined(MK_${var}) .if ${COMPILER_FEATURES:Mc++11} .if defined(WITHOUT_${var}) MK_${var}:= no .else MK_${var}:= yes .endif .else .if defined(WITH_${var}) MK_${var}:= yes .else MK_${var}:= no .endif .endif .endif .endfor # # Force some options off if their dependencies are off. # Order is somewhat important. # .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif .if ${MK_LDNS} == "no" MK_LDNS_UTILS:= no MK_UNBOUND:= no .endif .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no .endif .if ${MK_CDDL} == "no" MK_ZFS:= no MK_CTF:= no .endif .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_CXX} == "no" MK_CLANG:= no MK_GROFF:= no MK_GNUCXX:= no .endif .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no MK_DMAGENT:= no .endif .if ${MK_NETGRAPH} == "no" MK_ATM:= no MK_BLUETOOTH:= no .endif .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_PF} == "no" MK_AUTHPF:= no .endif .if ${MK_TESTS} == "no" MK_DTRACE_TESTS:= no .endif .if ${MK_TEXTPROC} == "no" MK_GROFF:= no .endif .if ${MK_CROSS_COMPILER} == "no" MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no .endif .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no .endif .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no MK_CLANG_FULL:= no .endif # # Set defaults for the MK_*_SUPPORT variables. # # # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # .for var in \ BZIP2 \ GNU \ INET \ INET6 \ KERBEROS \ KVM \ NETGRAPH \ PAM \ TESTS \ WIRELESS .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else MK_${var}_SUPPORT:= yes .endif .endfor # # MK_* options whose default value depends on another option. # .for vv in \ GSSAPI/KERBEROS \ MAN_UTILS/MAN .if defined(WITH_${vv:H}) MK_${vv:H}:= yes .elif defined(WITHOUT_${vv:H}) MK_${vv:H}:= no .else MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor .if !${COMPILER_FEATURES:Mc++11} MK_LLDB:= no .endif # gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. # while in theory we could build it with that, we don't want to do # that since it creates too much confusion for too little gain. .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 MK_GNUCXX:=no MK_GCC:=no .endif .endif # !target(____) Index: head/tools/build/options/WITHOUT_SYSINSTALL =================================================================== --- head/tools/build/options/WITHOUT_SYSINSTALL (revision 286821) +++ head/tools/build/options/WITHOUT_SYSINSTALL (nonexistent) @@ -1,4 +0,0 @@ -.\" $FreeBSD$ -Set to not build -.Xr sysinstall 8 -and related programs. Property changes on: head/tools/build/options/WITHOUT_SYSINSTALL ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/tools/tools/nanobsd/gateworks/common =================================================================== --- head/tools/tools/nanobsd/gateworks/common (revision 286821) +++ head/tools/tools/nanobsd/gateworks/common (revision 286822) @@ -1,358 +1,357 @@ # $FreeBSD$ NANO_CFGDIR=${NANO_CFGDIR:-${NANO_SRC}/${NANO_TOOLS}/gateworks/cfg} test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty NANO_PMAKE="make" # NB: disable -j 3 NANO_ARCH=armeb TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX NANO_CUSTOMIZE="cust_allow_ssh_root" clean_usr_local() { LOCAL_DIR=${NANO_WORLDDIR}/usr/local pprint 2 "Clean and create world directory (${LOCAL_DIR})" if rm -rf ${LOCAL_DIR}/ > /dev/null 2>&1 ; then true else chflags -R noschg ${LOCAL_DIR}/ rm -rf ${LOCAL_DIR}/ fi for f in bin etc lib libdata libexec sbin share; do mkdir -p ${LOCAL_DIR}/$f done } NANO_CUSTOMIZE="$NANO_CUSTOMIZE clean_usr_local" cust_install_machine_files() { echo "cd ${NANO_TOOLS}/gateworks/Files" cd ${NANO_TOOLS}/gateworks/Files find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} } NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_install_files cust_install_machine_files" buildenv() { cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ DESTDIR=${NANO_WORLDDIR} make buildenv } net80211_tools() { for f in wlanstats wlanwds wlanwatch; do echo "(cd tools/tools/net80211/$f; make $1)"; done | buildenv } net80211_clean_tools() { net80211_tools "clean" } net80211_build_tools() { net80211_tools "" } net80211_install_tools() { net80211_tools "install" } NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_clean_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_build_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_install_tools" ath_clean_tools() { echo "cd tools/tools/ath; make clean" | buildenv } ath_build_tools() { echo "cd tools/tools/ath; make" | buildenv } ath_install_tools() { echo "cd tools/tools/ath; make install" | buildenv } NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_clean_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_build_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_install_tools" npe_clean_tools() { echo "cd tools/tools/npe; make clean" | buildenv } npe_build_tools() { echo "cd tools/tools/npe; make" | buildenv } npe_install_tools() { echo "cd tools/tools/npe; make install" | buildenv } NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_clean_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_build_tools" NANO_CUSTOMIZE="$NANO_CUSTOMIZE npe_install_tools" NANO_MAKEFS="makefs -B big \ -o bsize=4096,fsize=512,density=8192,optimization=space" export NANO_MAKEFS # NB: leave c++ enabled so devd can be built CONF_BUILD=" WITHOUT_ACCT=true WITHOUT_ACPI=true WITHOUT_APM=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BIND_DNSSEC=true WITHOUT_BIND_ETC=true WITHOUT_BIND_LIBS_LWRES=true WITHOUT_BLUETOOTH=true WITHOUT_BSNMP=true WITHOUT_CALENDAR=true WITHOUT_CDDL=true WITHOUT_CTM=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_FLOPPY=true WITHOUT_FORTRAN=true WITHOUT_GAMES=true WITHOUT_GCOV=true WITHOUT_GPIB=true WITHOUT_GROFF=true WITHOUT_HTML=true WITHOUT_INET6=true WITHOUT_INFO=true WITHOUT_IPFILTER=true WITHOUT_KERBEROS=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true WITHOUT_MAIL=true WITHOUT_MAILWRAPPER=true WITHOUT_NETCAT=true WITHOUT_NIS=true WITHOUT_NLS=true WITHOUT_NS_CACHING=true WITHOUT_OBJC=true WITHOUT_PMC=true WITHOUT_PORTSNAP=true WITHOUT_PROFILE=true WITHOUT_QUOTAS=true WITHOUT_RCMDS=true WITHOUT_RCS=true WITHOUT_RESCUE=true WITHOUT_SENDMAIL=true WITHOUT_SHAREDOCS=true WITHOUT_SSP=true WITHOUT_SYSCONS=true -WITHOUT_SYSINSTALL=true WITHOUT_TCSH=true WITHOUT_TFTPD=true WITHOUT_ZFS=true " CONF_INSTALL="$CONF_BUILD WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true INSTALL_NODEBUG=true " # NB: override to force / on s1 instead of s1a setup_nanobsd_etc() { pprint 2 "configure nanobsd /etc" ( cd ${NANO_WORLDDIR} # create diskless marker file touch etc/diskless # Make root filesystem R/O by default echo "root_rw_mount=NO" >> etc/defaults/rc.conf # save config file for scripts echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf echo "/dev/${NANO_DRIVE}s1 / ufs ro 1 1" > etc/fstab echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab mkdir -p cfg ) } create_arm_diskimage() { pprint 2 "build diskimage" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" ( echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" echo "NANO_IMAGES: $NANO_IMAGES" echo "NANO_SECTS: $NANO_SECTS" echo "NANO_HEADS: $NANO_HEADS" echo "NANO_CODESIZE: $NANO_CODESIZE" echo "NANO_CONFSIZE: $NANO_CONFSIZE" echo "NANO_DATASIZE: $NANO_DATASIZE" echo $NANO_MEDIASIZE $NANO_IMAGES \ $NANO_SECTS $NANO_HEADS \ $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | awk ' { printf "# %s\n", $0 # size of cylinder in sectors cs = $3 * $4 # number of full cylinders on media cyl = int ($1 / cs) # output fdisk geometry spec, truncate cyls to 1023 if (cyl <= 1023) print "g c" cyl " h" $4 " s" $3 else print "g c" 1023 " h" $4 " s" $3 if ($7 > 0) { # size of data partition in full cylinders dsl = int (($7 + cs - 1) / cs) } else { dsl = 0; } # size of config partition in full cylinders csl = int (($6 + cs - 1) / cs) if ($5 == 0) { # size of image partition(s) in full cylinders isl = int ((cyl - dsl - csl) / $2) } else { isl = int (($5 + cs - 1) / cs) } # First image partition start at second track print "p 1 165 " $3, isl * cs - $3 c = isl * cs; # Second image partition (if any) also starts offset one # track to keep them identical. if ($2 > 1) { print "p 2 165 " $3 + c, isl * cs - $3 c += isl * cs; } # Config partition starts at cylinder boundary. print "p 3 165 " c, csl * cs c += csl * cs # Data partition (if any) starts at cylinder boundary. if ($7 > 0) { print "p 4 165 " c, dsl * cs } else if ($7 < 0 && $1 > c) { print "p 4 165 " c, $1 - c } else if ($1 < c) { print "Disk space overcommitted by", \ c - $1, "sectors" > "/dev/stderr" exit 2 } # Force slice 1 to be marked active. This is necessary # for booting the image from a USB device to work. print "a 1" } ' > ${MAKEOBJDIRPREFIX}/_.fdisk IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} BS=${NANO_SECTS}b if [ "${NANO_MD_BACKING}" = "swap" ] ; then MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ -y ${NANO_HEADS}` else echo ""; echo "Creating md backing file ${IMG} ..." _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ -y ${NANO_HEADS}` fi trap "mdconfig -d -u $MD" 1 2 15 EXIT echo ""; echo "Write partition table ..." FDISK=${MAKEOBJDIRPREFIX}/_.fdisk pprint 2 "fdisk -i -f ${FDISK} ${MD}" fdisk -i -f ${FDISK} ${MD} pprint 2 "fdisk ${MD}" fdisk ${MD} # Create first image IMG1=${NANO_DISKIMGDIR}/_.disk.image1 echo ""; echo "Create first image ${IMG1} ..." SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then IMG2=${NANO_DISKIMGDIR}/_.disk.image2 echo ""; echo "Create second image ${IMG2}..." for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab do sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f done SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} fi # Create Config slice CFG=${NANO_DISKIMGDIR}/_.disk.cfg echo ""; echo "Creating config partition ${CFG}..." SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` # XXX: fill from where ? pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" dd if=${CFG} of=/dev/${MD}s3 bs=${BS} pprint 2 "rm ${CFG}" rm ${CFG}; CFG= # NB: disable printing below # Create Data slice, if any. if [ $NANO_DATASIZE -gt 0 ] ; then DATA=${NANO_DISKIMGDIR}/_.disk.data echo ""; echo "Creating data partition ${DATA}..." SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` # XXX: fill from where ? pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" dd if=${DATA} of=/dev/${MD}s4 bs=${BS} pprint 2 "rm ${DATA}" rm ${DATA}; DATA= # NB: disable printing below fi if [ "${NANO_MD_BACKING}" = "swap" ] ; then echo "Writing out _.disk.full..." dd if=/dev/${MD} of=${IMG} bs=${BS} fi echo "" echo "Completed images in:" echo "" echo "Full disk: ${IMG}" echo "Primary partition: ${IMG1}" test "${IMG2}" && echo "2ndary partition: ${IMG2}" test "${CFG}" && echo "/cfg partition: ${CFG}" test "${DATA}" && echo "/data partition: ${DATA}" echo "" echo "Use dd if= of=/dev/ bs=${BS} to transfer an" echo "image to bootable media /dev/." ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 }