3 # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \
6 # Where "/some/dir" is the pathname of a directory on a some filesystem with
7 # at least 1000MB of free space, "somename" is what you want the release to
8 # call itself, "/cvs/dir" is where our source repo resides and, optionally,
9 # which CVS "tag" name should be used when checking out the sources to build
10 # the release (default is HEAD).
12 # Please note: the md(4) driver must be present in the kernel
13 # (either by being compiled in or available as a kld(4) module),
14 # otherwise the target 'release.9' and possibly others will fail.
16 # Note: If you add options to this file, please keep release(7) updated!
18 # Set these, release builder!
21 #BUILDNAME=5.2-RELEASE
23 # Automatic SNAP versioning:
26 BUILDNAME?=${BASE}-${DATE}-SNAP
28 #CHROOTDIR=/junk/release
29 # If this is a -stable snapshot, then set
32 # To test a release with a source tree containing patches and
33 # other work. This tree will get copied instead of getting the
34 # src/ tree from a CVS checkout. For "rerelease", this will NOT
35 # be copied; cvs update will be used instead.
38 # To add other options to the CVS subcommands (co,up), set
39 #CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'"
41 # To add other options to the CVS command, set
44 # To prefix the cvs command
45 #CVSPREFIX="/usr/bin/time"
47 # Where the CVS repository is
50 # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we
51 # are building an official release. Otherwise, we are building for
53 .if defined(RELEASETAG)
54 ISRELEASE!= expr "${RELEASETAG}" : '^RELENG_.*_RELEASE$$' || true
56 # Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees.
57 AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//'
58 DOCRELEASETAG?= ${AUXRELEASETAG}
59 PORTSRELEASETAG?= ${AUXRELEASETAG}
63 # If you want to pass flags to the world build such as -j X, use
64 # WORLD_FLAGS. Similarly, you can specify make flags for kernel
65 # builds via KERNEL_FLAGS.
66 # Similarly, you can specify make flags for make readmes via PORTREADMES_FLAGS.
69 #PORTREADMES_FLAGS=-j4
71 TARGET_ARCH?= ${MACHINE_ARCH}
72 .if ${TARGET_ARCH} == ${MACHINE_ARCH}
75 TARGET?= ${TARGET_ARCH}
77 CROSSENV= TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
78 CROSSMAKE= ${MAKE} ${CROSSENV}
79 NATIVEMAKE= ${MAKE} TARGET_ARCH=${MACHINE_ARCH} TARGET=${MACHINE}
81 # If you are using a local CVS repository with components stored in
82 # non-standard modules, override these on the make commandline or
84 RELEASESRCMODULE?= src
85 RELEASEDOCMODULE?= doc
86 RELEASEPORTSMODULE?= ports
88 # Uncomment this to disable the doc.1 target. Docs normally require
89 # the ports tree, so NOPORTS can be set together with NODOC in order
90 # to have neither ports or docs. If only NOPORTS is set to YES, but
91 # docs are still desired, the DOMINIMALDOCPORTS logic below will only
92 # install the ports that are minimally required for the docs. This is
93 # intended as a compromise, less disk space is required than for using
94 # the entire ports collection (and much less time due to the huge number
95 # of directories it would create), but still quite a bit as well as some
96 # CPU cycles (some of the programs are C++, and things like ghostscript
97 # belong to the required ports nevertheless).
99 # Setting this also disables building of release note documentation
104 # Modify this definition if you want the release notes
105 # and other release documentation in a language other than English.
106 RELNOTES_LANG?= en_US.ISO8859-1
108 # As an alternative to installing the entire ports collection (which
109 # can take a huge amount of time, in particular on slower disks),
110 # setting ${MINIMALDOCPORTS} allows to install and build just those
111 # ports that are really required for getting the docs up & running.
112 .if defined(NOPORTS) && !defined(NODOC)
113 DOMINIMALDOCPORTS= YES
114 .include "Makefile.inc.docports"
115 RELEASEPORTSMODULE= ${MINIMALDOCPORTS}
120 .if !defined(DOMINIMALDOCPORTS) || ${DOMINIMALDOCPORTS} != "YES"
125 # By default, documentation (Handbook, FAQ, etc.) is built for all
126 # the languages. To speed up building, set the DOC_LANG to just
127 # the languages you need. (The language for the release notes is
128 # controlled by the RELNOTES_LANG variable above.)
129 #DOC_LANG= en_US.ISO8859-1
130 DOCPORTS= textproc/docproj
131 # Set this to wherever the distfiles required by release procedures.
132 .if defined(DOCDISTFILES)
133 # Respect DOCDISTFILES which is used before.
134 RELEASEDISTFILES?= ${DOCDISTFILES}
136 RELEASEDISTFILES?= ${.CURDIR}/../../ports/distfiles
138 # Set this to 1 if you want -P to be used for automatic keyboard detection
139 # on the boot floppy. WARNING: Breaks on some Athlon (K7) motherboards.
140 AUTO_KEYBOARD_DETECT?= 0
143 DIST_DOCS_ARCH_INDEP= readme errata early-adopter
144 DIST_DOCS_ARCH_DEP= installation relnotes hardware
147 # Things which without too much trouble can be considered variables
148 # BASE_DISTS are special in that they get full /etc installation sets.
150 .if ${TARGET_ARCH} == "i386"
151 COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x
152 .elif ${TARGET_ARCH} == "alpha"
153 COMPAT_DISTS?= compat4x
155 OTHER_DISTS?= catpages manpages games proflibs dict info doc
156 CRYPTO_DISTS?= crypto
158 DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS}
160 # mountpoint for filesystems.
163 # Various floppy image parameters.
166 .if ${TARGET_ARCH} == "i386"
167 .if ${TARGET} == "pc98"
168 SMALLFLOPPYSIZE= 1200
169 SMALLFLOPPYSPLITSIZE= 1152
170 SMALLFLOPPYLABEL= fd1200
174 FLOPPYSPLITSIZE= 1392
181 .elif ${TARGET_ARCH} == "alpha"
183 FLOPPYSPLITSIZE= 1392
191 .elif ${TARGET_ARCH} == "sparc64"
198 .elif ${TARGET_ARCH} == "ia64"
203 .elif ${TARGET_ARCH} == "amd64"
210 .if exists(/sbin/bsdlabel)
213 DISKLABEL?= disklabel
216 ZIPNSPLIT= gzip --no-name -9 -c | split -b 1392k -
218 # Things that need to be compiled without crypto support in releases
219 .if !defined(FIXCRYPTO) && !make(release) && !make(rerelease)
220 FIXCRYPTO!= cd ${.CURDIR}/../secure; ${MAKE} -V SPROGS
223 # Things which may get you into trouble if you change them
224 MTREEFILES= ${.CURDIR}/../etc/mtree
227 RND= ${RD}/release.doc
230 .if ${TARGET} != "pc98"
231 CD_BOOT= ${CD}/bootonly
233 CD_DISC1= ${CD}/disc1
234 CD_DISC2= ${CD}/disc2
235 _MK?= ${CHROOTDIR}/mk
237 # Where the bootstrap ports (see DOCPORTS) get installed.
238 LOCALDIR= /usr/local/bin
240 .if ${TARGET} != ${MACHINE} && ${DISKLABEL} == "bsdlabel"
241 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET}
243 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ""
247 .if ${TARGET_ARCH} == "i386"
248 CRUNCH_TARGETS+=fixit
249 .if ${TARGET} == "pc98"
250 CRUNCH_TARGETS+=fixit-small
254 .if !defined(NO_FLOPPIES)
256 .if ${TARGET_ARCH} == "i386"
262 .if !defined(NOCDROM)
264 .if defined(MAKE_ISOS)
267 .if ${TARGET} == "pc98"
278 .if !make(release) && !make(rerelease)
279 BINMAKE!= cd ${.CURDIR}/..; ${MAKE} -V BINMAKE
280 WMAKEENV!= cd ${.CURDIR}/..; \
281 ${BINMAKE} ${CROSSENV} -f Makefile.inc1 -V WMAKEENV
282 WMAKE= ${WMAKEENV} ${BINMAKE}
286 .if defined(RELEASETAG)
287 CVS_SRCARGS+= -r ${RELEASETAG}
291 .if defined(DOCRELEASETAG)
292 CVS_DOCARGS+= -r ${DOCRELEASETAG}
296 .if defined(PORTSRELEASETAG)
297 CVS_PORTSARGS+= -r ${PORTSRELEASETAG}
300 WORLDDIR?= ${.CURDIR}/..
303 .if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
304 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
306 .if defined(NOPORTSATALL) && !defined(NODOC)
307 @echo "Ports are required for building the docs. Either set NODOC or"
308 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
312 .if exists(${CHROOTDIR})
313 # The first command will fail on a handful of files that have their schg
314 # flags set. But it greatly speeds up the next two commands.
315 # NB: clear any vestigal devfs mount, just in case
316 -umount ${CHROOTDIR}/dev > /dev/null 2>&1
317 -rm -rf ${CHROOTDIR} 2>/dev/null
318 -chflags -R noschg ${CHROOTDIR}/.
321 mkdir -p ${CHROOTDIR}
322 @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`"
323 cd ${WORLDDIR} && ${NATIVEMAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \
324 -DNOPROFILE installworld DESTDIR=${CHROOTDIR}
325 cd ${WORLDDIR}/etc && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR}
326 if [ -f /etc/resolv.conf ]; then \
327 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
329 .if defined(EXTLOCALDIR)
330 rm -rf ${CHROOTDIR}/usr/local
331 cd ${CHROOTDIR}/usr && cp -R -H ${EXTLOCALDIR} local
333 rm -rf ${CHROOTDIR}/usr/src
334 .if defined(EXTSRCDIR)
335 cd ${CHROOTDIR}/usr && \
336 cp -R -H ${EXTSRCDIR} src
338 cd ${CHROOTDIR}/usr && \
339 ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
340 co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE}
342 .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES)
343 .for p in ${LOCAL_PATCHES}
345 patch -d ${CHROOTDIR}/usr/${RELEASESRCMODULE} ${PATCH_FLAGS} < ${p}
349 .if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT})
350 cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} \
351 RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT}
353 rm -rf ${CHROOTDIR}/usr/ports
354 .if !defined(NOPORTSATALL)
355 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
356 co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE}
359 rm -rf ${CHROOTDIR}/usr/doc
360 .if defined(EXTDOCDIR)
361 cd ${CHROOTDIR}/usr && cp -R -H ${EXTDOCDIR} doc
363 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
364 co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE}
366 if [ -d ${RELEASEDISTFILES}/ ]; then \
367 cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \
369 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \
371 .if !defined(NO_PREFETCHDISTFILES)
372 @cd ${.CURDIR} && ${MAKE} fetch-distfiles
377 .if !defined(RELEASENOUPDATE)
378 .if !defined(RELEASETAG)
379 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
380 update ${CVSCMDARGS} -P -d -A
382 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
383 update ${CVSCMDARGS} -P -d -r ${RELEASETAG}
385 rm -f ${CHROOTDIR}/tmp/.world_done
386 .if !defined(NOPORTS)
387 cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
388 update ${CVSCMDARGS} -P -d
390 .if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
391 for i in ${MINIMALDOCPORTS}; do \
392 ( cd ${CHROOTDIR}/usr/$$i && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
393 update ${CVSCMDARGS} -P -d ) ; \
397 cd ${CHROOTDIR}/usr/doc && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
398 update ${CVSCMDARGS} -P -d
402 # Add version information to those things that need it.
403 if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \
404 cd ${CHROOTDIR}/usr/src/sys/conf && \
405 mv newvers.sh foo && \
406 sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && \
409 -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release
410 echo "#!/bin/sh" > ${_MK}
411 echo "set -ex" >> ${_MK}
412 echo "trap 'umount /dev || true' 0" >> ${_MK}
413 echo "_RELTARGET=\$${1:-doRELEASE}" >> ${_MK}
415 AUTO_KEYBOARD_DETECT \
445 echo "export ${var}=\"${${var}}\"" >> ${_MK}
448 # Don't remove this, or the build will fall over!
449 echo "export RELEASEDIR=${_R}" >> ${_MK}
450 echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${_MK}
451 echo "export MANBUILDCAT=YES" >> ${_MK}
452 # NB: these may fail if the host is running w/o devfs
453 echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
454 echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK}
455 echo "if [ -x /etc/rc.d/ldconfig ]; then" >> ${_MK}
456 echo " /etc/rc.d/ldconfig start" >> ${_MK}
457 echo "else" >> ${_MK}
458 echo " ldconfig /lib /usr/lib /usr/local/lib || true" >> ${_MK}
460 echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK}
461 echo " cd /usr/src" >> ${_MK}
462 echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${_MK}
463 echo " touch /tmp/.world_done" >> ${_MK}
465 echo "if [ ! -f /tmp/.skip_ports ]; then" >> ${_MK}
466 echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
467 echo " cd /usr/ports" >> ${_MK}
468 echo " make ${PORTREADMES_FLAGS} readmes" >> ${_MK}
469 echo " touch /tmp/.skip_ports" >> ${_MK}
470 echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
472 echo "cd /usr/src/release" >> ${_MK}
473 echo "make obj" >> ${_MK}
474 echo "make \$${_RELTARGET}" >> ${_MK}
475 echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
477 .if defined(NOPORTS) || defined(NOPORTREADMES)
478 touch ${CHROOTDIR}/tmp/.skip_ports
480 # Ensure md.ko is loaded if md(4) is not statically compiled into
482 -mdconfig 2>/dev/null
483 env -i /usr/sbin/chroot `dirname ${_MK}` /`basename ${_MK}`
486 rm -rf ${CRUNCH_TARGETS:S/$/_crunch/} release.[0-9] ${EXTRAS}
489 @for i in ${DOCPORTS}; do \
490 cd ${CHROOTDIR}/usr/ports/$$i && \
491 make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \
492 WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes \
493 checksum-recursive ; \
496 # Clean out ${_R} and make the directory structure.
499 -rm -rf ${_R}/* 2> /dev/null
500 -chflags -R noschg ${_R}/.
503 .if !defined(NO_FLOPPIES)
508 for i in ${DISTRIBUTIONS}; do \
509 mkdir ${RD}/trees/$$i && \
510 mtree -deU -f ${MTREEFILES}/BSD.root.dist \
511 -p ${RD}/trees/$$i > /dev/null && \
512 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \
513 -p ${RD}/trees/$$i/usr > /dev/null && \
514 mtree -deU -f ${MTREEFILES}/BSD.include.dist \
515 -p ${RD}/trees/$$i/usr/include > /dev/null && \
516 mtree -deU -f ${MTREEFILES}/BSD.var.dist \
517 -p ${RD}/trees/$$i/var > /dev/null ; \
521 # Install the system into the various distributions.
523 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
524 cd ${.CURDIR}/.. && ${CROSSMAKE} distributeworld DISTDIR=${RD}/trees
527 # Build and install non-crypto versions of some tools.
529 # Handle some grief caused by the munition braindeadness.
531 ${CROSSMAKE} ${WORLD_FLAGS} -DNOCRYPT \
532 SUBDIR_OVERRIDE="${FIXCRYPTO}" \
533 buildworld distributeworld DISTDIR=${RD}/trees
534 -chflags -R noschg ${RD}/trees
537 # Make and install the generic kernel(s).
539 .for kernel in ${KERNELS}
541 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
542 KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \
543 DESTDIR=${RD}/trees/base
545 # Install a standard boot kernel+modules.
547 ${CROSSMAKE} ${KERNEL_FLAGS} \
549 DESTDIR=${RD}/trees/base; \
551 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
552 reinstallkernel -DINSTALL_DEBUG \
553 DESTDIR=${RD}/trees/base
556 # Make and install the three crunched binaries which live on the floppies.
557 # You are not supposed to like this :-)
560 mkdir -p ${RD}/crunch
561 .for j in ${CRUNCH_TARGETS}
562 .if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf)
565 cd ${j}_crunch; ${WMAKEENV} crunchgen -o \
566 ${.CURDIR}/${TARGET}/${j}_crunch.conf
567 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean
568 cd ${.CURDIR}/..; ${BINMAKE} -f Makefile.inc1 _build-tools
569 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk \
570 CFLAGS="-Os -pipe" -DNO_CPU_CFLAGS all
571 ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch
572 mv ${j}_crunch/${j}_crunch ${RD}/crunch/${j}
578 # --==## Fix up the distributions. ##==--
581 # Create any "synthetic dists" now.
582 @for i in ${DISTRIBUTIONS}; do \
583 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \
584 echo -n "Running $$i dist creation script... "; \
585 env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \
590 # Remove all the directories we don't need.
592 find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir
596 # --==## Package up the tarballs from assembled trees ##==--
601 @for i in ${DISTRIBUTIONS} ; \
603 if [ -d ${RD}/trees/$${i} ] ; then \
604 cd ${.CURDIR} && $(MAKE) doTARBALL \
605 SD=${RD}/trees/$${i} \
606 TN=$$i TD=$$i ARG="." && \
607 echo "$${i} distribution is finished."; \
610 .if !defined(NOPORTS)
611 # XXX: Inline stripped version of doTARBALL
612 @rm -rf ${RD}/dists/ports/ports*
613 @mkdir -p ${RD}/dists/ports
614 @echo rolling ports/ports tarball
615 @tar --exclude CVS --exclude 'ports/distfiles/*' -czf \
616 ${RD}/dists/ports/ports.tgz -C /usr ports
617 @cp ${.CURDIR}/scripts/ports-install.sh ${RD}/dists/ports/install.sh
618 @(cd ${RD}/dists/ports; \
619 rm -f CHECKSUM.MD5; \
620 md5 * > CHECKSUM.MD5)
621 @echo "ports distribution is finished."
627 # --==## Make source dists ##==--
631 @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \
632 TD=src TN=sbase ARG="[A-Z]*"
633 @for i in `cd /usr/src && echo [a-z]*` ; do \
634 if [ -d /usr/src/$$i ] ; then \
635 cd ${.CURDIR} && $(MAKE) doTARBALL \
636 TN=`echo s$$i | tr -d '.' | \
638 -e 's/kerberos5/krb5/'` \
639 SD=/usr/src TD=src ARG="$$i" ; \
642 .if defined(EXTRA_SRC)
643 @set ${EXTRA_SRC} && \
644 while [ $$# -ge 2 ] ; do \
645 if [ -d /usr/src/$$1 ] ; then \
646 cd ${.CURDIR} && $(MAKE) doTARBALL \
647 SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \
648 fi && shift && shift ; \
651 if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \
652 if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \
653 if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \
654 if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; \
655 cd ${RD}/dists/crypto; rm -f CHECKSUM.MD5; \
656 md5 * > CHECKSUM.MD5 ) ; fi
657 (cd ${RD}/dists/src; rm -f CHECKSUM.MD5; md5 * > CHECKSUM.MD5)
658 @echo "src distribution is finished."
662 # Build the memory root filesystem.
664 cp ${RD}/trees/base/etc/disktab /etc
668 mkdir -p etc/defaults dev mnt stand/etc/defaults stand/help
669 @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \
670 DIR=${RD}/mfsfd/stand ZIP=false
671 ( cd ${RD}/mfsfd && \
672 for dir in bin sbin ; do \
673 ln -sf /stand $$dir; \
675 cp ${RD}/trees/base/sbin/dhclient-script ${RD}/mfsfd/stand
676 .if ${TARGET} == "pc98"
677 cp ${.CURDIR}/../etc/defaults/pccard.conf \
678 ${RD}/mfsfd/etc/defaults/pccard.conf
680 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf
681 ( for F in defaults/rc.conf netconfig protocols ; do \
682 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
683 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \
685 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \
686 ${RD}/trees/base/etc/services | \
687 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
688 > ${RD}/mfsfd/stand/etc/services
689 grep 'operator' ${RD}/trees/base/etc/group \
690 > ${RD}/mfsfd/stand/etc/group
691 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services
692 ln ${RD}/mfsfd/stand/etc/group ${RD}/mfsfd/etc/group
693 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig
694 cp ${RD}/trees/base/COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp
696 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
697 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
698 ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
700 @for i in ${DIST_DOCS_ARCH_DEP}; do \
701 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
702 ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
704 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT \
705 ${RD}/mfsfd/stand/help/INSTALL.TXT
706 @mv ${RD}/mfsfd/stand/help/EARLY-ADOPTER.TXT \
707 ${RD}/mfsfd/stand/help/EARLY.TXT
709 -test -f ${.CURDIR}/install.cfg \
710 && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
711 @mkdir -p ${RD}/mfsfd/boot
712 .if ${TARGET_ARCH} != "ia64"
713 @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
715 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
716 @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
718 @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \
719 tar xf - -C ${RD}/mfsfd/stand
720 @mkdir -p ${RD}/mfsroot
721 sh -e ${DOFS_SH} ${RD}/mfsroot/mfsroot ${RD} ${MNT} \
722 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
723 @gzip -9fnv ${RD}/mfsroot/mfsroot
726 KERNFLOPPYSET= ${RD}/floppyset/kern/kernel.gz
727 .if defined(SMALLFLOPPYSIZE)
728 SMALLKERNFLOPPYSET= ${RD}/floppyset/kern-small/kernel.gz
730 .if defined(SPLIT_MFSROOT)
731 MFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot/mfsroot.gz
732 .if defined(SMALLFLOPPYSIZE)
733 SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot-small/mfsroot.gz
737 # Build boot and install floppies.
739 @gzip -9nc ${RD}/trees/base/boot/kernel/kernel > ${RD}/kernels/kernel.gz
740 @echo "Making the kernel boot floppies..."
741 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \
742 FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz
743 .if defined(SMALLFLOPPYSIZE)
744 @echo "Making the small kernel boot floppies..."
745 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern-small \
746 FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz \
749 .if defined(SPLIT_MFSROOT)
750 @echo "Making the mfsroot boot floppies..."
751 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot \
752 FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz
753 .if defined(SMALLFLOPPYSIZE)
754 @echo "Making the small mfsroot boot floppies..."
755 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot-small \
756 FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz \
759 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \
760 KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \
761 MFSROOTFILE="${MFSROOTFLOPPYSET}.split ${MFSROOTFLOPPYSET}.boot"
762 .if defined(SMALLFLOPPYSIZE)
763 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \
764 KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \
765 MFSROOTFILE="${SMALLMFSROOTFLOPPYSET}.split ${SMALLMFSROOTFLOPPYSET}.boot" \
768 .else # !SPLIT_MFSROOT
769 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \
770 KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \
771 MFSROOTFILE=${RD}/mfsroot/mfsroot.gz
772 .if defined(SMALLFLOPPYSIZE)
773 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \
774 KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \
775 MFSROOTFILE=${RD}/mfsroot/mfsroot.gz \
778 .endif # SPLIT_MFSROOT
781 # Build fixit floppy.
783 @echo "Making fixit floppy."
784 @rm -rf ${RD}/fixitfd
786 @cd ${RD}/fixitfd && \
787 mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \
789 @cp ${RD}/trees/base/etc/spwd.db ${RD}/trees/base/etc/group \
791 @sed -e 's/#.*//' ${RD}/trees/base/etc/protocols \
792 > ${RD}/fixitfd/etc/protocols
793 @sed -e 's/#.*//' ${RD}/trees/base/usr/share/misc/scsi_modes \
794 > ${RD}/fixitfd/usr/share/misc/scsi_modes
795 @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile
796 @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services
797 @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar
798 @chmod 555 ${RD}/fixitfd/stand/tar
799 .if defined(SMALLFLOPPYSIZE)
800 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit-small \
801 DIR=${RD}/fixitfd/stand ZIP=false
802 @sh -e ${DOFS_SH} ${RD}/floppies/fixit-small.flp ${RD} ${MNT} \
803 ${SMALLFLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${SMALLFLOPPYLABEL}
804 @rm -rf ${RD}/fixitfd/stand
805 @mkdir ${RD}/fixitfd/stand
807 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit \
808 DIR=${RD}/fixitfd/stand ZIP=false
809 @sh -e ${DOFS_SH} ${RD}/floppies/fixit.flp ${RD} ${MNT} \
810 ${FLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${FLOPPYLABEL}
813 # Do our last minute floppies directory setup
816 @cp ${RND}/${RELNOTES_LANG}/installation/${TARGET}/article.txt \
817 ${RD}/floppies/README.TXT
818 @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5)
820 @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5)
825 # --==## Setup a suitable ftp-area ##==--
828 @echo "Setting up FTP distribution area"
830 -@ln -s . ${FD}/${BUILDNAME}
831 .if !defined(NO_FLOPPIES)
832 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
834 @cd ${RD}/dists && find . -print | cpio -dumpl ${FD}
836 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
837 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
838 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
839 cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
840 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
842 @for i in ${DIST_DOCS_ARCH_DEP}; do \
843 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
844 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
845 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
846 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
848 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${FD}
849 @mv ${FD}/INSTALLATION.TXT ${FD}/INSTALL.TXT
850 @mv ${FD}/INSTALLATION.HTM ${FD}/INSTALL.HTM
851 @mv ${FD}/EARLY-ADOPTER.TXT ${FD}/EARLY.TXT
852 @mv ${FD}/EARLY-ADOPTER.HTM ${FD}/EARLY.HTM
854 @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf
858 # --==## Setup a suitable cdrom-area ##==--
861 @echo "Setting up CDROM distribution area"
862 @mkdir -p ${CD_BOOT} ${CD_DISC1} ${CD_DISC2}
863 -@ln -s . ${CD_DISC1}/${BUILDNAME}
864 .if !defined(NO_FLOPPIES)
865 @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1}
867 @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1}
868 @for i in ${DISTRIBUTIONS} ; \
870 if [ -d ${RD}/trees/$${i} ] ; then \
871 chflags -R noschg ${RD}/trees/$${i} || true ; \
872 ( cd ${RD}/trees/$${i} && \
873 find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \
876 @rm -f ${CD_DISC2}/.profile
877 @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile
878 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf
879 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf
881 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
882 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
883 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
884 cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
885 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
887 @for i in ${DIST_DOCS_ARCH_DEP}; do \
888 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
889 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
890 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
891 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
893 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DISC1}
894 @mv ${CD_DISC1}/INSTALLATION.TXT ${CD_DISC1}/INSTALL.TXT
895 @mv ${CD_DISC1}/INSTALLATION.HTM ${CD_DISC1}/INSTALL.HTM
896 @mv ${CD_DISC1}/EARLY-ADOPTER.TXT ${CD_DISC1}/EARLY.TXT
897 @mv ${CD_DISC1}/EARLY-ADOPTER.HTM ${CD_DISC1}/EARLY.HTM
899 .if ${TARGET} != "pc98"
900 @echo "Setting up boot area"
901 @rm -f ${CD_DISC2}/boot/loader.conf
902 @cp ${RD}/mfsroot/mfsroot.gz ${CD_DISC2}/boot/mfsroot.gz
903 @echo 'mfsroot_load="YES"' > ${CD_DISC2}/boot/loader.conf
904 @echo 'mfsroot_type="mfs_root"' >> ${CD_DISC2}/boot/loader.conf
905 @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf
907 @cp -Rp ${CD_DISC2}/boot ${CD_BOOT}
908 .if defined(MINIROOT)
909 @mkdir -p ${FD}/miniroot
910 @sh -e ${DOFS_SH} ${FD}/miniroot/miniroot.ufs \
911 ${RD} ${MNT} 0 ${CD_BOOT} 8192 auto
912 @gzip -9v ${FD}/miniroot/miniroot.ufs
915 @cp -Rp ${CD_DISC2}/boot ${CD_DISC1}
920 .if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh)
921 @echo "Creating ISO images..."
923 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
925 ${CD}/${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT}
927 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
929 ${CD}/${BUILDNAME}-${TARGET}-miniinst.iso ${CD_DISC1}
930 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
932 ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2}
933 .if defined(CD_EXTRA_BITS)
934 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
936 ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \
940 @(cd ${CD} && md5 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5)
943 @echo "Do not know how to create an ISO for ${TARGET_ARCH}."
947 # --==## Documentation Project files such as the Handbook and FAQ ##==--
950 @echo "Making docs..."
951 @for i in ${DOCPORTS}; do \
952 cd /usr/ports/$$i && \
953 env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \
954 make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
955 WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
957 @cd /usr/doc && make all install 'FORMATS=html html-split txt' \
958 INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc
962 # --==## RELNOTESng: Next-generation replacements for *.TXT files ##==--
965 @echo "Making release documentation..."
966 @cd ${.CURDIR}/doc && make all install clean 'FORMATS=html txt' \
967 INSTALL_COMPRESSED='' DOCDIR=${RND}
970 # Various "subroutine" and other supporting targets.
978 @echo "SD undefined in doTARBALL" && exit 1
981 @echo "TD undefined in doTARBALL" && exit 1
984 @echo "ARG undefined in doTARBALL" && exit 1
986 @rm -rf ${RD}/dists/${TD}/${TN}*
987 @mkdir -p ${RD}/dists/${TD}
989 tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \
990 echo rolling ${TD}/$$tn tarball &&\
991 tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \
992 ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \
993 sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn \
994 > ${RD}/dists/${TD}/$$tn.inf && \
995 if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \
996 cp -p ${.CURDIR}/scripts/$${TD}-install.sh \
997 ${RD}/dists/${TD}/install.sh; \
999 if [ "${SD}" != "/usr/src" ]; then \
1000 mtree -c -i -p ${SD}/${ARG} \
1001 -k gname,md5digest,mode,nlink,uname,size,link,type \
1002 > ${RD}/dists/${TD}/$$tn.mtree ; \
1006 ( cd ${RD}/dists/${TD}; \
1007 rm -f CHECKSUM.MD5; \
1008 md5 * > CHECKSUM.MD5 ) \
1011 doRELEASE: release.1 release.2 release.3 ${DOCREL} release.4 release.5 \
1012 release.6 release.7 release.8 release.9 ${EXTRAS}
1013 @echo "Release done"
1016 @rm -f release.5 release.9 floppies.[123]
1017 @cd ${.CURDIR} && ${MAKE} release.5 release.9 floppies.1 floppies.2 \
1019 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
1022 .if !defined(CRUNCH)
1023 @echo "CRUNCH undefined in installCRUNCH" && exit 1
1026 @echo "DIR undefined in installCRUNCH" && exit 1
1029 @echo "ZIP undefined in installCRUNCH" && exit 1
1032 gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \
1034 ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \
1036 @chmod 555 ${DIR}/${CRUNCH}_crunch
1037 @if [ -f ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf ] ; then \
1038 for i in `crunchgen -l ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf` ; do \
1039 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1042 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \
1043 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1048 # --==## Build a floppy set for a splitfs file ##==--
1050 # FLOPPYBASE - basename of floppy image files
1051 # FLOPPYDESC - description of floppy set
1052 # SPLITFILE - filename of the file to split
1053 # FDSIZE - if specified and "small", small floppy is created
1055 .if make(makeFloppySet)
1056 SPLITDIR= ${RD}/floppyset/${FLOPPYBASE}
1057 .if defined(FDSIZE) && ${FDSIZE} == "SMALL"
1058 FLPSPLITSIZE= ${SMALLFLOPPYSPLITSIZE}
1059 FLPSIZE= ${SMALLFLOPPYSIZE}
1060 FLPLABEL= ${SMALLFLOPPYLABEL}
1062 FLPSPLITSIZE= ${FLOPPYSPLITSIZE}
1063 FLPSIZE= ${FLOPPYSIZE}
1064 FLPLABEL= ${FLOPPYLABEL}
1069 .if !defined(FLOPPYBASE)
1070 @echo "FLOPPYBASE undefined in ${.TARGET}" && exit 1
1072 .if !defined(FLOPPYDESC)
1073 @echo "FLOPPYDESC undefined in ${.TARGET}" && exit 1
1075 .if !defined(SPLITFILE)
1076 @echo "SPLITFILE undefined in ${.TARGET}" && exit 1
1078 sh ${.CURDIR}/scripts/split-file.sh ${SPLITFILE} \
1079 ${RD}/floppyset/${FLOPPYBASE} ${FLPSPLITSIZE} "${FLOPPYDESC}"
1080 ( splitfile=${SPLITDIR}/`basename ${SPLITFILE}`.split ; \
1081 lines=`cat $${splitfile} | wc -l`; \
1082 lines=$$((lines - 1)) ; \
1083 for line in `jot $$lines`; do \
1084 file=`head -n $$(($${line} + 1)) $${splitfile} | tail -1 | cut -f 1 -d ' '` ; \
1085 sh -e ${DOFS_SH} ${RD}/floppies/${FLOPPYBASE}$${line}.flp \
1086 ${RD} ${MNT} ${FLPSIZE} ${SPLITDIR}/$${file} \
1087 ${BOOTINODE} ${FLPLABEL}; \
1091 # --==## Build a boot floppy ##==--
1093 # FSIMAGE - base floppy image name
1094 # FDSIZE - if specified and "small", small floppy is created
1095 # KERNFILE - path to kernel split file
1096 # MFSROOTFILE - path to mfsroot split file
1098 .if make(buildBootFloppy)
1099 IMAGEDIR= ${RD}/image.${FSIMAGE}
1100 BOOTDIR= ${RD}/trees/base/boot
1101 HINTSFILE= ${BOOTDIR}/device.hints
1102 ACPI_KO= ${BOOTDIR}/kernel/acpi.ko
1103 IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp
1104 .if defined(FDSIZE) && ${FDSIZE} == "SMALL"
1105 FLPSIZE= ${SMALLFLOPPYSIZE}
1106 FLPLABEL= ${SMALLFLOPPYLABEL}
1108 FLPSIZE= ${FLOPPYSIZE}
1109 FLPLABEL= ${FLOPPYLABEL}
1114 .if !defined(FSIMAGE)
1115 @echo "FSIMAGE undefined in ${.TARGET}" && exit 1
1117 .if !defined(KERNFILE)
1118 @echo "KERNFILE undefined in ${.TARGET}" && exit 1
1120 .if !defined(MFSROOTFILE)
1121 @echo "MFSROOTFILE undefined in ${.TARGET}" && exit 1
1123 @echo "Running ${.TARGET} for ${FSIMAGE}"
1126 @echo "Setting up /boot directory for ${FSIMAGE} floppy"
1127 @mkdir -p ${IMAGEDIR}/boot
1128 .if ${TARGET} == "i386"
1129 @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o -o \
1130 ${IMAGEDIR}/boot/loader ${BOOTDIR}/loader
1132 @cp ${BOOTDIR}/loader ${IMAGEDIR}/boot
1134 @cp -Rp ${BOOTDIR}/*.4th ${BOOTDIR}/defaults ${BOOTDIR}/loader.help \
1135 ${BOOTDIR}/loader.rc ${IMAGEDIR}/boot
1136 .if exists(${HINTSFILE})
1137 @gzip -9nc ${HINTSFILE} > ${IMAGEDIR}/boot/device.hints.gz
1139 @gzip -9n ${IMAGEDIR}/boot/*.4th ${IMAGEDIR}/boot/loader.help \
1140 ${IMAGEDIR}/boot/defaults/loader.conf
1141 @echo 'bootfile="/kernel"' > ${IMAGEDIR}/boot/loader.conf
1142 .if exists(${ACPI_KO})
1143 @gzip -9nc ${ACPI_KO} > ${IMAGEDIR}/acpi.ko.gz
1144 @echo 'acpi_load="YES"' >> ${IMAGEDIR}/boot/loader.conf
1145 @echo 'acpi_name="/acpi.ko"' >> ${IMAGEDIR}/boot/loader.conf
1146 @echo 'acpi_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf
1148 @echo 'mfsroot_load="YES"' >> ${IMAGEDIR}/boot/loader.conf
1149 @echo 'mfsroot_type="mfs_root"' >> ${IMAGEDIR}/boot/loader.conf
1150 @echo 'mfsroot_name="/mfsroot"' >> ${IMAGEDIR}/boot/loader.conf
1151 .if !exists(${ACPI_KO})
1152 @echo 'mfsroot_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf
1154 .if ${TARGET_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT}
1155 @echo "-P" >> ${IMAGEDIR}/boot.config
1158 @cp ${KERNFILE} ${MFSROOTFILE} ${IMAGEDIR}
1159 sh -e ${DOFS_SH} ${IMAGEFILE} ${RD} ${MNT} ${FLPSIZE} ${IMAGEDIR} \
1160 ${BOOTINODE} ${FLPLABEL}
1161 @echo "Created ${RD}/floppies/${FSIMAGE}.flp"
1163 .include <bsd.obj.mk>