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"
186 .elif ${TARGET_ARCH} == "sparc64"
193 .elif ${TARGET_ARCH} == "ia64"
198 .elif ${TARGET_ARCH} == "amd64"
205 .if exists(/sbin/bsdlabel)
208 DISKLABEL?= disklabel
211 ZIPNSPLIT= gzip --no-name -9 -c | split -b 1392k -
213 # Things that need to be compiled without crypto support in releases
214 .if !defined(FIXCRYPTO) && !make(release) && !make(rerelease)
215 FIXCRYPTO!= cd ${.CURDIR}/../secure; ${MAKE} -V SPROGS
218 # Things which may get you into trouble if you change them
219 MTREEFILES= ${.CURDIR}/../etc/mtree
222 RND= ${RD}/release.doc
225 .if ${TARGET} != "pc98"
226 CD_BOOT= ${CD}/bootonly
228 CD_DISC1= ${CD}/disc1
229 CD_DISC2= ${CD}/disc2
230 _MK?= ${CHROOTDIR}/mk
232 # Where the bootstrap ports (see DOCPORTS) get installed.
233 LOCALDIR= /usr/local/bin
235 .if ${TARGET} != ${MACHINE} && ${DISKLABEL} == "bsdlabel"
236 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET}
238 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ""
242 .if ${TARGET_ARCH} == "i386"
243 CRUNCH_TARGETS+=fixit
244 .if ${TARGET} == "pc98"
245 CRUNCH_TARGETS+=fixit-small
249 .if !defined(NO_FLOPPIES)
250 EXTRAS= floppies.1 floppies.2 floppies.3
253 .if !defined(NOCDROM)
255 .if defined(MAKE_ISOS)
258 .if ${TARGET} == "pc98"
269 .if !make(release) && !make(rerelease)
270 BINMAKE!= cd ${.CURDIR}/..; ${MAKE} -V BINMAKE
271 WMAKEENV!= cd ${.CURDIR}/..; \
272 ${BINMAKE} ${CROSSENV} -f Makefile.inc1 -V WMAKEENV
273 WMAKE= ${WMAKEENV} ${BINMAKE}
277 .if defined(RELEASETAG)
278 CVS_SRCARGS+= -r ${RELEASETAG}
282 .if defined(DOCRELEASETAG)
283 CVS_DOCARGS+= -r ${DOCRELEASETAG}
287 .if defined(PORTSRELEASETAG)
288 CVS_PORTSARGS+= -r ${PORTSRELEASETAG}
291 WORLDDIR?= ${.CURDIR}/..
294 .if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
295 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
297 .if defined(NOPORTSATALL) && !defined(NODOC)
298 @echo "Ports are required for building the docs. Either set NODOC or"
299 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
303 .if exists(${CHROOTDIR})
304 # The first command will fail on a handful of files that have their schg
305 # flags set. But it greatly speeds up the next two commands.
306 # NB: clear any vestigal devfs mount, just in case
307 -umount ${CHROOTDIR}/dev > /dev/null 2>&1
308 -rm -rf ${CHROOTDIR} 2>/dev/null
309 -chflags -R noschg ${CHROOTDIR}/.
312 mkdir -p ${CHROOTDIR}
313 @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`"
314 cd ${WORLDDIR} && ${NATIVEMAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \
315 -DNOPROFILE installworld DESTDIR=${CHROOTDIR}
316 cd ${WORLDDIR}/etc && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR}
317 if [ -f /etc/resolv.conf ]; then \
318 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
320 .if defined(EXTLOCALDIR)
321 rm -rf ${CHROOTDIR}/usr/local
322 cd ${CHROOTDIR}/usr && cp -R -H ${EXTLOCALDIR} local
324 rm -rf ${CHROOTDIR}/usr/src
325 .if defined(EXTSRCDIR)
326 cd ${CHROOTDIR}/usr && \
327 cp -R -H ${EXTSRCDIR} src
329 cd ${CHROOTDIR}/usr && \
330 ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
331 co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE}
333 .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES)
334 .for p in ${LOCAL_PATCHES}
336 patch -d ${CHROOTDIR}/usr/${RELEASESRCMODULE} ${PATCH_FLAGS} < ${p}
340 .if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT})
341 cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} \
342 RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT}
344 rm -rf ${CHROOTDIR}/usr/ports
345 .if !defined(NOPORTSATALL)
346 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
347 co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE}
350 rm -rf ${CHROOTDIR}/usr/doc
351 .if defined(EXTDOCDIR)
352 cd ${CHROOTDIR}/usr && cp -R -H ${EXTDOCDIR} doc
354 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
355 co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE}
357 if [ -d ${RELEASEDISTFILES}/ ]; then \
358 cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \
360 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \
362 .if !defined(NO_PREFETCHDISTFILES)
363 @cd ${.CURDIR} && ${MAKE} fetch-distfiles
368 .if !defined(RELEASENOUPDATE)
369 .if !defined(RELEASETAG)
370 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
371 update ${CVSCMDARGS} -P -d -A
373 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
374 update ${CVSCMDARGS} -P -d -r ${RELEASETAG}
376 rm -f ${CHROOTDIR}/tmp/.world_done
377 .if !defined(NOPORTS)
378 cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
379 update ${CVSCMDARGS} -P -d
381 .if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
382 for i in ${MINIMALDOCPORTS}; do \
383 ( cd ${CHROOTDIR}/usr/$$i && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
384 update ${CVSCMDARGS} -P -d ) ; \
388 cd ${CHROOTDIR}/usr/doc && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
389 update ${CVSCMDARGS} -P -d
393 # Add version information to those things that need it.
394 if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \
395 cd ${CHROOTDIR}/usr/src/sys/conf && \
396 mv newvers.sh foo && \
397 sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && \
400 -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release
401 echo "#!/bin/sh" > ${_MK}
402 echo "set -ex" >> ${_MK}
403 echo "trap 'umount /dev || true' 0" >> ${_MK}
404 echo "_RELTARGET=\$${1:-doRELEASE}" >> ${_MK}
406 AUTO_KEYBOARD_DETECT \
436 echo "export ${var}=\"${${var}}\"" >> ${_MK}
439 # Don't remove this, or the build will fall over!
440 echo "export RELEASEDIR=${_R}" >> ${_MK}
441 echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${_MK}
442 echo "export MANBUILDCAT=YES" >> ${_MK}
443 # NB: these may fail if the host is running w/o devfs
444 echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
445 echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK}
446 echo "if [ -x /etc/rc.d/ldconfig ]; then" >> ${_MK}
447 echo " /etc/rc.d/ldconfig start" >> ${_MK}
448 echo "else" >> ${_MK}
449 echo " ldconfig /lib /usr/lib /usr/local/lib || true" >> ${_MK}
451 echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK}
452 echo " cd /usr/src" >> ${_MK}
453 echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${_MK}
454 echo " touch /tmp/.world_done" >> ${_MK}
456 echo "if [ ! -f /tmp/.skip_ports ]; then" >> ${_MK}
457 echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
458 echo " cd /usr/ports" >> ${_MK}
459 echo " make ${PORTREADMES_FLAGS} readmes" >> ${_MK}
460 echo " touch /tmp/.skip_ports" >> ${_MK}
461 echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
463 echo "cd /usr/src/release" >> ${_MK}
464 echo "make obj" >> ${_MK}
465 echo "make \$${_RELTARGET}" >> ${_MK}
466 echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
468 .if defined(NOPORTS) || defined(NOPORTREADMES)
469 touch ${CHROOTDIR}/tmp/.skip_ports
471 # Ensure md.ko is loaded if md(4) is not statically compiled into
473 -mdconfig 2>/dev/null
474 env -i /usr/sbin/chroot `dirname ${_MK}` /`basename ${_MK}`
477 rm -rf ${CRUNCH_TARGETS:S/$/_crunch/} release.[0-9] ${EXTRAS}
480 @for i in ${DOCPORTS}; do \
481 cd ${CHROOTDIR}/usr/ports/$$i && \
482 make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \
483 WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes \
484 checksum-recursive ; \
487 # Clean out ${_R} and make the directory structure.
490 -rm -rf ${_R}/* 2> /dev/null
491 -chflags -R noschg ${_R}/.
494 .if !defined(NO_FLOPPIES)
499 for i in ${DISTRIBUTIONS}; do \
500 mkdir ${RD}/trees/$$i && \
501 mtree -deU -f ${MTREEFILES}/BSD.root.dist \
502 -p ${RD}/trees/$$i > /dev/null && \
503 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \
504 -p ${RD}/trees/$$i/usr > /dev/null && \
505 mtree -deU -f ${MTREEFILES}/BSD.include.dist \
506 -p ${RD}/trees/$$i/usr/include > /dev/null && \
507 mtree -deU -f ${MTREEFILES}/BSD.var.dist \
508 -p ${RD}/trees/$$i/var > /dev/null ; \
512 # Install the system into the various distributions.
514 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
515 cd ${.CURDIR}/.. && ${CROSSMAKE} distributeworld DISTDIR=${RD}/trees
518 # Build and install non-crypto versions of some tools.
520 # Handle some grief caused by the munition braindeadness.
522 ${CROSSMAKE} ${WORLD_FLAGS} -DNOCRYPT \
523 SUBDIR_OVERRIDE="${FIXCRYPTO}" \
524 buildworld distributeworld DISTDIR=${RD}/trees
525 -chflags -R noschg ${RD}/trees
528 # Make and install the generic kernel(s).
530 .for kernel in ${KERNELS}
532 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
533 KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \
534 DESTDIR=${RD}/trees/base
536 # Install a standard boot kernel+modules.
538 ${CROSSMAKE} ${KERNEL_FLAGS} \
540 DESTDIR=${RD}/trees/base; \
542 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
543 reinstallkernel -DINSTALL_DEBUG \
544 DESTDIR=${RD}/trees/base
547 # Make and install the three crunched binaries which live on the floppies.
548 # You are not supposed to like this :-)
551 mkdir -p ${RD}/crunch
552 .for j in ${CRUNCH_TARGETS}
553 .if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf)
556 cd ${j}_crunch; ${WMAKEENV} crunchgen -o \
557 ${.CURDIR}/${TARGET}/${j}_crunch.conf
558 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean
559 cd ${.CURDIR}/..; ${BINMAKE} -f Makefile.inc1 _build-tools
560 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk \
561 CFLAGS="-Os -pipe" -DNO_CPU_CFLAGS all
562 ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch
563 mv ${j}_crunch/${j}_crunch ${RD}/crunch/${j}
569 # --==## Fix up the distributions. ##==--
572 # Create any "synthetic dists" now.
573 @for i in ${DISTRIBUTIONS}; do \
574 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \
575 echo -n "Running $$i dist creation script... "; \
576 env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \
581 # Remove all the directories we don't need.
583 find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir
587 # --==## Package up the tarballs from assembled trees ##==--
592 @for i in ${DISTRIBUTIONS} ; \
594 if [ -d ${RD}/trees/$${i} ] ; then \
595 cd ${.CURDIR} && $(MAKE) doTARBALL \
596 SD=${RD}/trees/$${i} \
597 TN=$$i TD=$$i ARG="." && \
598 echo "$${i} distribution is finished."; \
601 .if !defined(NOPORTS)
602 # XXX: Inline stripped version of doTARBALL
603 @rm -rf ${RD}/dists/ports/ports*
604 @mkdir -p ${RD}/dists/ports
605 @echo rolling ports/ports tarball
606 @tar --exclude CVS --exclude 'ports/distfiles/*' -czf \
607 ${RD}/dists/ports/ports.tgz -C /usr ports
608 @cp ${.CURDIR}/scripts/ports-install.sh ${RD}/dists/ports/install.sh
609 @(cd ${RD}/dists/ports; \
610 rm -f CHECKSUM.MD5; \
611 md5 * > CHECKSUM.MD5)
612 @echo "ports distribution is finished."
618 # --==## Make source dists ##==--
622 @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \
623 TD=src TN=sbase ARG="[A-Z]*"
624 @for i in `cd /usr/src && echo [a-z]*` ; do \
625 if [ -d /usr/src/$$i ] ; then \
626 cd ${.CURDIR} && $(MAKE) doTARBALL \
627 TN=`echo s$$i | tr -d '.' | \
629 -e 's/kerberos5/krb5/'` \
630 SD=/usr/src TD=src ARG="$$i" ; \
633 .if defined(EXTRA_SRC)
634 @set ${EXTRA_SRC} && \
635 while [ $$# -ge 2 ] ; do \
636 if [ -d /usr/src/$$1 ] ; then \
637 cd ${.CURDIR} && $(MAKE) doTARBALL \
638 SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \
639 fi && shift && shift ; \
642 if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \
643 if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \
644 if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \
645 if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; \
646 cd ${RD}/dists/crypto; rm -f CHECKSUM.MD5; \
647 md5 * > CHECKSUM.MD5 ) ; fi
648 (cd ${RD}/dists/src; rm -f CHECKSUM.MD5; md5 * > CHECKSUM.MD5)
649 @echo "src distribution is finished."
653 # Build the memory root filesystem.
655 cp ${RD}/trees/base/etc/disktab /etc
659 mkdir -p etc/defaults dev mnt stand/etc/defaults stand/help
660 @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \
661 DIR=${RD}/mfsfd/stand ZIP=false
662 ( cd ${RD}/mfsfd && \
663 for dir in bin sbin ; do \
664 ln -sf /stand $$dir; \
666 cp ${RD}/trees/base/sbin/dhclient-script ${RD}/mfsfd/stand
667 .if ${TARGET} == "pc98"
668 cp ${.CURDIR}/../etc/defaults/pccard.conf \
669 ${RD}/mfsfd/etc/defaults/pccard.conf
671 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf
672 ( for F in defaults/rc.conf netconfig protocols ; do \
673 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
674 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \
676 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \
677 ${RD}/trees/base/etc/services | \
678 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
679 > ${RD}/mfsfd/stand/etc/services
680 grep 'operator' ${RD}/trees/base/etc/group \
681 > ${RD}/mfsfd/stand/etc/group
682 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services
683 ln ${RD}/mfsfd/stand/etc/group ${RD}/mfsfd/etc/group
684 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig
685 cp ${RD}/trees/base/COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp
687 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
688 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
689 ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
691 @for i in ${DIST_DOCS_ARCH_DEP}; do \
692 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
693 ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
695 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT \
696 ${RD}/mfsfd/stand/help/INSTALL.TXT
697 @mv ${RD}/mfsfd/stand/help/EARLY-ADOPTER.TXT \
698 ${RD}/mfsfd/stand/help/EARLY.TXT
700 -test -f ${.CURDIR}/install.cfg \
701 && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
702 @mkdir -p ${RD}/mfsfd/boot
703 .if ${TARGET_ARCH} != "ia64"
704 @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
706 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
707 @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
709 @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \
710 tar xf - -C ${RD}/mfsfd/stand
711 @mkdir -p ${RD}/mfsroot
712 sh -e ${DOFS_SH} ${RD}/mfsroot/mfsroot ${RD} ${MNT} \
713 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
714 @gzip -9fnv ${RD}/mfsroot/mfsroot
717 KERNFLOPPYSET= ${RD}/floppyset/kern/kernel.gz
718 .if defined(SMALLFLOPPYSIZE)
719 SMALLKERNFLOPPYSET= ${RD}/floppyset/kern-small/kernel.gz
721 .if defined(SPLIT_MFSROOT)
722 MFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot/mfsroot.gz
723 .if defined(SMALLFLOPPYSIZE)
724 SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot-small/mfsroot.gz
728 # Build boot and install floppies.
730 @gzip -9nc ${RD}/trees/base/boot/kernel/kernel > ${RD}/kernels/kernel.gz
731 @echo "Making the kernel boot floppies..."
732 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \
733 FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz
734 .if defined(SMALLFLOPPYSIZE)
735 @echo "Making the small kernel boot floppies..."
736 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern-small \
737 FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz \
740 .if defined(SPLIT_MFSROOT)
741 @echo "Making the mfsroot boot floppies..."
742 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot \
743 FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz
744 .if defined(SMALLFLOPPYSIZE)
745 @echo "Making the small mfsroot boot floppies..."
746 @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot-small \
747 FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz \
750 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \
751 KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \
752 MFSROOTFILE="${MFSROOTFLOPPYSET}.split ${MFSROOTFLOPPYSET}.boot"
753 .if defined(SMALLFLOPPYSIZE)
754 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \
755 KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \
756 MFSROOTFILE="${SMALLMFSROOTFLOPPYSET}.split ${SMALLMFSROOTFLOPPYSET}.boot" \
759 .else # !SPLIT_MFSROOT
760 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \
761 KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \
762 MFSROOTFILE=${RD}/mfsroot/mfsroot.gz
763 .if defined(SMALLFLOPPYSIZE)
764 @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \
765 KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \
766 MFSROOTFILE=${RD}/mfsroot/mfsroot.gz \
769 .endif # SPLIT_MFSROOT
772 # Build fixit floppy.
774 @echo "Making fixit floppy."
775 @rm -rf ${RD}/fixitfd
777 @cd ${RD}/fixitfd && \
778 mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \
780 @cp ${RD}/trees/base/etc/spwd.db ${RD}/trees/base/etc/group \
782 @sed -e 's/#.*//' ${RD}/trees/base/etc/protocols \
783 > ${RD}/fixitfd/etc/protocols
784 @sed -e 's/#.*//' ${RD}/trees/base/usr/share/misc/scsi_modes \
785 > ${RD}/fixitfd/usr/share/misc/scsi_modes
786 @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile
787 @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services
788 @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar
789 @chmod 555 ${RD}/fixitfd/stand/tar
790 .if defined(SMALLFLOPPYSIZE)
791 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit-small \
792 DIR=${RD}/fixitfd/stand ZIP=false
793 @sh -e ${DOFS_SH} ${RD}/floppies/fixit-small.flp ${RD} ${MNT} \
794 ${SMALLFLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${SMALLFLOPPYLABEL}
795 @rm -rf ${RD}/fixitfd/stand
796 @mkdir ${RD}/fixitfd/stand
798 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit \
799 DIR=${RD}/fixitfd/stand ZIP=false
800 @sh -e ${DOFS_SH} ${RD}/floppies/fixit.flp ${RD} ${MNT} \
801 ${FLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${FLOPPYLABEL}
804 # Do our last minute floppies directory setup
807 @cp ${RND}/${RELNOTES_LANG}/installation/${TARGET}/article.txt \
808 ${RD}/floppies/README.TXT
809 @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5)
811 @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5)
816 # --==## Setup a suitable ftp-area ##==--
819 @echo "Setting up FTP distribution area"
821 -@ln -s . ${FD}/${BUILDNAME}
822 .if !defined(NO_FLOPPIES)
823 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
825 @cd ${RD}/dists && find . -print | cpio -dumpl ${FD}
827 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
828 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
829 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
830 cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
831 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
833 @for i in ${DIST_DOCS_ARCH_DEP}; do \
834 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
835 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
836 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
837 ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
839 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${FD}
840 @mv ${FD}/INSTALLATION.TXT ${FD}/INSTALL.TXT
841 @mv ${FD}/INSTALLATION.HTM ${FD}/INSTALL.HTM
842 @mv ${FD}/EARLY-ADOPTER.TXT ${FD}/EARLY.TXT
843 @mv ${FD}/EARLY-ADOPTER.HTM ${FD}/EARLY.HTM
845 @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf
849 # --==## Setup a suitable cdrom-area ##==--
852 @echo "Setting up CDROM distribution area"
853 @mkdir -p ${CD_BOOT} ${CD_DISC1} ${CD_DISC2}
854 -@ln -s . ${CD_DISC1}/${BUILDNAME}
855 .if !defined(NO_FLOPPIES)
856 @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1}
858 @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1}
859 @for i in ${DISTRIBUTIONS} ; \
861 if [ -d ${RD}/trees/$${i} ] ; then \
862 chflags -R noschg ${RD}/trees/$${i} || true ; \
863 ( cd ${RD}/trees/$${i} && \
864 find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \
867 @rm -f ${CD_DISC2}/.profile
868 @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile
869 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf
870 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf
872 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
873 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
874 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
875 cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
876 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
878 @for i in ${DIST_DOCS_ARCH_DEP}; do \
879 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
880 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
881 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
882 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
884 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DISC1}
885 @mv ${CD_DISC1}/INSTALLATION.TXT ${CD_DISC1}/INSTALL.TXT
886 @mv ${CD_DISC1}/INSTALLATION.HTM ${CD_DISC1}/INSTALL.HTM
887 @mv ${CD_DISC1}/EARLY-ADOPTER.TXT ${CD_DISC1}/EARLY.TXT
888 @mv ${CD_DISC1}/EARLY-ADOPTER.HTM ${CD_DISC1}/EARLY.HTM
890 .if ${TARGET} != "pc98"
891 @echo "Setting up boot area"
892 @rm -f ${CD_DISC2}/boot/loader.conf
893 @cp ${RD}/mfsroot/mfsroot.gz ${CD_DISC2}/boot/mfsroot.gz
894 @echo 'mfsroot_load="YES"' > ${CD_DISC2}/boot/loader.conf
895 @echo 'mfsroot_type="mfs_root"' >> ${CD_DISC2}/boot/loader.conf
896 @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf
898 @cp -Rp ${CD_DISC2}/boot ${CD_BOOT}
899 .if defined(MINIROOT)
900 @mkdir -p ${FD}/miniroot
901 @sh -e ${DOFS_SH} ${FD}/miniroot/miniroot.ufs \
902 ${RD} ${MNT} 0 ${CD_BOOT} 8192 auto
903 @gzip -9v ${FD}/miniroot/miniroot.ufs
906 @cp -Rp ${CD_DISC2}/boot ${CD_DISC1}
911 .if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh)
912 @echo "Creating ISO images..."
914 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
916 ${CD}/${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT}
918 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
920 ${CD}/${BUILDNAME}-${TARGET}-miniinst.iso ${CD_DISC1}
921 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
923 ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2}
924 .if defined(CD_EXTRA_BITS)
925 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
927 ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \
931 @(cd ${CD} && md5 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5)
934 @echo "Do not know how to create an ISO for ${TARGET_ARCH}."
938 # --==## Documentation Project files such as the Handbook and FAQ ##==--
941 @echo "Making docs..."
942 @for i in ${DOCPORTS}; do \
943 cd /usr/ports/$$i && \
944 env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \
945 make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
946 WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
948 @cd /usr/doc && make all install 'FORMATS=html html-split txt' \
949 INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc
953 # --==## RELNOTESng: Next-generation replacements for *.TXT files ##==--
956 @echo "Making release documentation..."
957 @cd ${.CURDIR}/doc && make all install clean 'FORMATS=html txt' \
958 INSTALL_COMPRESSED='' DOCDIR=${RND}
961 # Various "subroutine" and other supporting targets.
969 @echo "SD undefined in doTARBALL" && exit 1
972 @echo "TD undefined in doTARBALL" && exit 1
975 @echo "ARG undefined in doTARBALL" && exit 1
977 @rm -rf ${RD}/dists/${TD}/${TN}*
978 @mkdir -p ${RD}/dists/${TD}
980 tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \
981 echo rolling ${TD}/$$tn tarball &&\
982 tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \
983 ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \
984 sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn \
985 > ${RD}/dists/${TD}/$$tn.inf && \
986 if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \
987 cp -p ${.CURDIR}/scripts/$${TD}-install.sh \
988 ${RD}/dists/${TD}/install.sh; \
990 if [ "${SD}" != "/usr/src" ]; then \
991 mtree -c -i -p ${SD}/${ARG} \
992 -k gname,md5digest,mode,nlink,uname,size,link,type \
993 > ${RD}/dists/${TD}/$$tn.mtree ; \
997 ( cd ${RD}/dists/${TD}; \
998 rm -f CHECKSUM.MD5; \
999 md5 * > CHECKSUM.MD5 ) \
1002 doRELEASE: release.1 release.2 release.3 ${DOCREL} release.4 release.5 \
1003 release.6 release.7 release.8 release.9 ${EXTRAS}
1004 @echo "Release done"
1007 @rm -f release.5 release.9 floppies.[123]
1008 @cd ${.CURDIR} && ${MAKE} release.5 release.9 floppies.1 floppies.2 \
1010 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
1013 .if !defined(CRUNCH)
1014 @echo "CRUNCH undefined in installCRUNCH" && exit 1
1017 @echo "DIR undefined in installCRUNCH" && exit 1
1020 @echo "ZIP undefined in installCRUNCH" && exit 1
1023 gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \
1025 ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \
1027 @chmod 555 ${DIR}/${CRUNCH}_crunch
1028 @if [ -f ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf ] ; then \
1029 for i in `crunchgen -l ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf` ; do \
1030 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1033 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \
1034 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1039 # --==## Build a floppy set for a splitfs file ##==--
1041 # FLOPPYBASE - basename of floppy image files
1042 # FLOPPYDESC - description of floppy set
1043 # SPLITFILE - filename of the file to split
1044 # FDSIZE - if specified and "small", small floppy is created
1046 .if make(makeFloppySet)
1047 SPLITDIR= ${RD}/floppyset/${FLOPPYBASE}
1048 .if defined(FDSIZE) && ${FDSIZE} == "SMALL"
1049 FLPSPLITSIZE= ${SMALLFLOPPYSPLITSIZE}
1050 FLPSIZE= ${SMALLFLOPPYSIZE}
1051 FLPLABEL= ${SMALLFLOPPYLABEL}
1053 FLPSPLITSIZE= ${FLOPPYSPLITSIZE}
1054 FLPSIZE= ${FLOPPYSIZE}
1055 FLPLABEL= ${FLOPPYLABEL}
1060 .if !defined(FLOPPYBASE)
1061 @echo "FLOPPYBASE undefined in ${.TARGET}" && exit 1
1063 .if !defined(FLOPPYDESC)
1064 @echo "FLOPPYDESC undefined in ${.TARGET}" && exit 1
1066 .if !defined(SPLITFILE)
1067 @echo "SPLITFILE undefined in ${.TARGET}" && exit 1
1069 sh ${.CURDIR}/scripts/split-file.sh ${SPLITFILE} \
1070 ${RD}/floppyset/${FLOPPYBASE} ${FLPSPLITSIZE} "${FLOPPYDESC}"
1071 ( splitfile=${SPLITDIR}/`basename ${SPLITFILE}`.split ; \
1072 lines=`cat $${splitfile} | wc -l`; \
1073 lines=$$((lines - 1)) ; \
1074 for line in `jot $$lines`; do \
1075 file=`head -n $$(($${line} + 1)) $${splitfile} | tail -1 | cut -f 1 -d ' '` ; \
1076 sh -e ${DOFS_SH} ${RD}/floppies/${FLOPPYBASE}$${line}.flp \
1077 ${RD} ${MNT} ${FLPSIZE} ${SPLITDIR}/$${file} \
1078 ${BOOTINODE} ${FLPLABEL}; \
1082 # --==## Build a boot floppy ##==--
1084 # FSIMAGE - base floppy image name
1085 # FDSIZE - if specified and "small", small floppy is created
1086 # KERNFILE - path to kernel split file
1087 # MFSROOTFILE - path to mfsroot split file
1089 .if make(buildBootFloppy)
1090 IMAGEDIR= ${RD}/image.${FSIMAGE}
1091 BOOTDIR= ${RD}/trees/base/boot
1092 HINTSFILE= ${BOOTDIR}/device.hints
1093 ACPI_KO= ${BOOTDIR}/kernel/acpi.ko
1094 IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp
1095 .if defined(FDSIZE) && ${FDSIZE} == "SMALL"
1096 FLPSIZE= ${SMALLFLOPPYSIZE}
1097 FLPLABEL= ${SMALLFLOPPYLABEL}
1099 FLPSIZE= ${FLOPPYSIZE}
1100 FLPLABEL= ${FLOPPYLABEL}
1105 .if !defined(FSIMAGE)
1106 @echo "FSIMAGE undefined in ${.TARGET}" && exit 1
1108 .if !defined(KERNFILE)
1109 @echo "KERNFILE undefined in ${.TARGET}" && exit 1
1111 .if !defined(MFSROOTFILE)
1112 @echo "MFSROOTFILE undefined in ${.TARGET}" && exit 1
1114 @echo "Running ${.TARGET} for ${FSIMAGE}"
1117 @echo "Setting up /boot directory for ${FSIMAGE} floppy"
1118 @mkdir -p ${IMAGEDIR}/boot
1119 .if ${TARGET} == "i386"
1120 @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o -o \
1121 ${IMAGEDIR}/boot/loader ${BOOTDIR}/loader
1123 @cp ${BOOTDIR}/loader ${IMAGEDIR}/boot
1125 @cp -Rp ${BOOTDIR}/*.4th ${BOOTDIR}/defaults ${BOOTDIR}/loader.help \
1126 ${BOOTDIR}/loader.rc ${IMAGEDIR}/boot
1127 .if exists(${HINTSFILE})
1128 @gzip -9nc ${HINTSFILE} > ${IMAGEDIR}/boot/device.hints.gz
1130 @gzip -9n ${IMAGEDIR}/boot/*.4th ${IMAGEDIR}/boot/loader.help \
1131 ${IMAGEDIR}/boot/defaults/loader.conf
1132 @echo 'bootfile="/kernel"' > ${IMAGEDIR}/boot/loader.conf
1133 .if exists(${ACPI_KO})
1134 @gzip -9nc ${ACPI_KO} > ${IMAGEDIR}/acpi.ko.gz
1135 @echo 'acpi_load="YES"' >> ${IMAGEDIR}/boot/loader.conf
1136 @echo 'acpi_name="/acpi.ko"' >> ${IMAGEDIR}/boot/loader.conf
1137 @echo 'acpi_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf
1139 @echo 'mfsroot_load="YES"' >> ${IMAGEDIR}/boot/loader.conf
1140 @echo 'mfsroot_type="mfs_root"' >> ${IMAGEDIR}/boot/loader.conf
1141 @echo 'mfsroot_name="/mfsroot"' >> ${IMAGEDIR}/boot/loader.conf
1142 .if !exists(${ACPI_KO})
1143 @echo 'mfsroot_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf
1145 .if ${TARGET_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT}
1146 @echo "-P" >> ${IMAGEDIR}/boot.config
1149 @cp ${KERNFILE} ${MFSROOTFILE} ${IMAGEDIR}
1150 sh -e ${DOFS_SH} ${IMAGEFILE} ${RD} ${MNT} ${FLPSIZE} ${IMAGEDIR} \
1151 ${BOOTINODE} ${FLPLABEL}
1152 @echo "Created ${RD}/floppies/${FSIMAGE}.flp"
1154 .include <bsd.obj.mk>