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.1-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} != "ia64"
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"
176 SMALLBOOTLABEL= fd1200
178 SMALLFIXITLABEL= fd1200
195 BIGBOOTLABEL= minimum2
197 .elif ${TARGET_ARCH} == "alpha"
202 .elif ${TARGET_ARCH} == "sparc64"
209 .elif ${TARGET_ARCH} == "ia64"
214 .elif ${TARGET_ARCH} == "amd64"
221 .if exists(/sbin/bsdlabel)
224 DISKLABEL?= disklabel
227 ZIPNSPLIT= gzip --no-name -9 -c | split -b 1423k -
229 # Things that need to be compiled without crypto support in releases
230 .if !defined(FIXCRYPTO) && !make(release) && !make(rerelease)
231 FIXCRYPTO!= cd ${.CURDIR}/../kerberos5; ${MAKE} -V KPROGS; \
232 cd ${.CURDIR}/../secure; ${MAKE} -V SPROGS
235 # Things which may get you into trouble if you change them
236 MTREEFILES= ${.CURDIR}/../etc/mtree
239 RND= ${RD}/release.doc
242 .if ${TARGET} != "pc98"
243 CD_BOOT= ${CD}/bootonly
245 CD_DISC1= ${CD}/disc1
246 CD_DISC2= ${CD}/disc2
247 _MK?= ${CHROOTDIR}/mk
249 # Where the bootstrap ports (see DOCPORTS) get installed.
250 LOCALDIR= /usr/local/bin
252 .if ${TARGET} != ${MACHINE} && ${DISKLABEL} == "bsdlabel"
253 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET}
255 DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ""
259 .if ${TARGET_ARCH} == "i386"
260 CRUNCH_TARGETS+=fixit
261 .if ${TARGET} == "pc98"
262 CRUNCH_TARGETS+=fixit-small
267 .if !defined(NOCDROM)
269 .if defined(MAKE_ISOS)
272 .if ${TARGET} == "i386" && defined(EMUL_BOOT)
274 .elif ${TARGET} == "pc98"
285 .if !make(release) && !make(rerelease)
286 BINMAKE!= cd ${.CURDIR}/..; ${MAKE} -V BINMAKE
287 WMAKEENV!= cd ${.CURDIR}/..; \
288 ${BINMAKE} ${CROSSENV} -f Makefile.inc1 -V WMAKEENV
289 WMAKE= ${WMAKEENV} ${BINMAKE}
293 .if defined(RELEASETAG)
294 CVS_SRCARGS+= -r ${RELEASETAG}
298 .if defined(DOCRELEASETAG)
299 CVS_DOCARGS+= -r ${DOCRELEASETAG}
303 .if defined(PORTSRELEASETAG)
304 CVS_PORTSARGS+= -r ${PORTSRELEASETAG}
307 WORLDDIR?= ${.CURDIR}/..
310 .if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
311 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
313 .if defined(NOPORTSATALL) && !defined(NODOC)
314 @echo "Ports are required for building the docs. Either set NODOC or"
315 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
319 .if exists(${CHROOTDIR})
320 # The first command will fail on a handful of files that have their schg
321 # flags set. But it greatly speeds up the next two commands.
322 # NB: clear any vestigal devfs mount, just in case
323 -umount ${CHROOTDIR}/dev > /dev/null 2>&1
324 -rm -rf ${CHROOTDIR} 2>/dev/null
325 -chflags -R noschg ${CHROOTDIR}/.
328 mkdir -p ${CHROOTDIR}
329 @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`"
330 cd ${WORLDDIR} && ${NATIVEMAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \
331 -DNOPROFILE installworld DESTDIR=${CHROOTDIR}
332 cd ${WORLDDIR}/etc && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR}
333 if [ -f /etc/resolv.conf ]; then \
334 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
336 .if defined(EXTLOCALDIR)
337 rm -rf ${CHROOTDIR}/usr/local
338 cd ${CHROOTDIR}/usr && cp -R -H ${EXTLOCALDIR} local
340 rm -rf ${CHROOTDIR}/usr/src
341 .if defined(EXTSRCDIR)
342 cd ${CHROOTDIR}/usr && \
343 cp -R -H ${EXTSRCDIR} src
345 cd ${CHROOTDIR}/usr && \
346 ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE}
348 .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES)
349 cd ${CHROOTDIR}/usr/${RELEASESRCMODULE}
350 .for p in ${LOCAL_PATCHES}
352 patch ${PATCH_FLAGS} < ${p}
356 .if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT})
357 cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT}
359 rm -rf ${CHROOTDIR}/usr/ports
360 .if !defined(NOPORTSATALL)
361 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE}
364 rm -rf ${CHROOTDIR}/usr/doc
365 .if defined(EXTDOCDIR)
366 cd ${CHROOTDIR}/usr && cp -R -H ${EXTDOCDIR} doc
368 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE}
370 if [ -d ${RELEASEDISTFILES}/ ]; then \
371 cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \
373 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \
375 .if !defined(NO_PREFETCHDISTFILES)
376 @cd ${.CURDIR} && ${MAKE} fetch-distfiles
381 .if !defined(RELEASENOUPDATE)
382 .if !defined(RELEASETAG)
383 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d -A
385 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d -r ${RELEASETAG}
387 rm -f ${CHROOTDIR}/tmp/.world_done
388 .if !defined(NOPORTS)
389 cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d
391 .if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
392 for i in ${MINIMALDOCPORTS}; do \
393 ( cd ${CHROOTDIR}/usr/$$i && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d ) ; \
397 cd ${CHROOTDIR}/usr/doc && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d
401 # Add version information to those things that need it.
402 if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \
403 cd ${CHROOTDIR}/usr/src/sys/conf && \
404 mv newvers.sh foo && \
405 sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && \
408 -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release
409 echo "#!/bin/sh" > ${_MK}
410 echo "set -ex" >> ${_MK}
411 echo "trap 'umount /dev || true' 0" >> ${_MK}
412 echo "_RELTARGET=\$${1:-doRELEASE}" >> ${_MK}
414 AUTO_KEYBOARD_DETECT \
444 echo "export ${var}=\"${${var}}\"" >> ${_MK}
447 # Don't remove this, or the build will fall over!
448 echo "export RELEASEDIR=${_R}" >> ${_MK}
449 echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${_MK}
450 echo "export MANBUILDCAT=YES" >> ${_MK}
451 # NB: these may fail if the host is running w/o devfs
452 echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
453 echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK}
454 echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK}
455 echo " cd /usr/src" >> ${_MK}
456 echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${_MK}
457 echo " touch /tmp/.world_done" >> ${_MK}
459 echo "if [ ! -f /tmp/.skip_ports ]; then" >> ${_MK}
460 echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
461 echo " cd /usr/ports" >> ${_MK}
462 echo " make ${PORTREADMES_FLAGS} readmes" >> ${_MK}
463 echo " touch /tmp/.skip_ports" >> ${_MK}
464 echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
466 echo "cd /usr/src/release" >> ${_MK}
467 echo "make obj" >> ${_MK}
468 echo "make \$${_RELTARGET}" >> ${_MK}
469 echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK}
471 .if defined(NOPORTS) || defined(NOPORTREADMES)
472 touch ${CHROOTDIR}/tmp/.skip_ports
474 # Ensure md.ko is loaded if md(4) is not statically compiled into the kernel
475 -mdconfig 2>/dev/null
476 env -i /usr/sbin/chroot `dirname ${_MK}` /`basename ${_MK}`
479 rm -rf ${CRUNCH_TARGETS:S/$/_crunch/} release.[0-9] release.10 \
483 @for i in ${DOCPORTS}; do \
484 cd ${CHROOTDIR}/usr/ports/$$i && \
485 make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \
486 WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes \
487 checksum-recursive ; \
490 # Clean out ${_R} and make the directory structure.
493 -rm -rf ${_R}/* 2> /dev/null
494 -chflags -R noschg ${_R}/.
497 .if !defined(NO_FLOPPIES)
502 for i in ${DISTRIBUTIONS} special; do \
503 mkdir ${RD}/trees/$$i && \
504 mtree -deU -f ${MTREEFILES}/BSD.root.dist \
505 -p ${RD}/trees/$$i > /dev/null && \
506 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \
507 -p ${RD}/trees/$$i/usr > /dev/null && \
508 mtree -deU -f ${MTREEFILES}/BSD.include.dist \
509 -p ${RD}/trees/$$i/usr/include > /dev/null && \
510 mtree -deU -f ${MTREEFILES}/BSD.var.dist \
511 -p ${RD}/trees/$$i/var > /dev/null ; \
515 # Install the system into the various distributions.
517 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
518 cd ${.CURDIR}/.. && ${CROSSMAKE} distributeworld DISTDIR=${RD}/trees
521 # Build and install non-crypto versions of some tools.
523 # Handle some grief caused by the munition braindeadness.
525 ${CROSSMAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DNOCRYPT \
526 SUBDIR_OVERRIDE="${FIXCRYPTO}" \
527 buildworld distributeworld DISTDIR=${RD}/trees
528 -chflags -R noschg ${RD}/trees
531 # Make and install the generic kernel(s).
533 .for kernel in ${KERNELS}
535 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
536 KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \
537 DESTDIR=${RD}/trees/base
539 # Install a standard boot kernel+modules.
541 ${CROSSMAKE} ${KERNEL_FLAGS} \
543 DESTDIR=${RD}/trees/base; \
545 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \
546 reinstallkernel -DINSTALL_DEBUG \
547 DESTDIR=${RD}/trees/base
550 # Make and install the three crunched binaries which live on the floppies.
551 # You are not supposed to like this :-)
554 mkdir -p ${RD}/crunch
555 .for j in ${CRUNCH_TARGETS}
556 .if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf)
559 cd ${j}_crunch; ${WMAKEENV} crunchgen -o ${.CURDIR}/${TARGET}/${j}_crunch.conf
560 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean
561 cd ${.CURDIR}/..; ${BINMAKE} -f Makefile.inc1 _build-tools
562 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk \
563 CFLAGS="-Os -pipe" -DNO_CPU_CFLAGS all
564 ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch
565 mv ${j}_crunch/${j}_crunch ${RD}/crunch/${j}
571 # --==## Fix up the distributions. ##==--
574 # Create any "synthetic dists" now.
575 @for i in ${DISTRIBUTIONS}; do \
576 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \
577 echo -n "Running $$i dist creation script... "; \
578 env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \
583 # Remove all the directories we don't need.
585 find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir
589 # --==## Package up the tarballs from assembled trees ##==--
594 @for i in ${DISTRIBUTIONS} ; \
596 if [ -d ${RD}/trees/$${i} ] ; then \
597 cd ${.CURDIR} && $(MAKE) doTARBALL \
598 SD=${RD}/trees/$${i} \
599 TN=$$i TD=$$i ARG="." && \
600 echo "$${i} distribution is finished."; \
603 .if !defined(NOPORTS)
604 # XXX: Inline stripped version of doTARBALL
605 @rm -rf ${RD}/dists/ports/ports*
606 @mkdir -p ${RD}/dists/ports
607 @echo rolling ports/ports tarball
608 @tar --exclude CVS --exclude 'ports/distfiles/*' -czf \
609 ${RD}/dists/ports/ports.tgz -C /usr ports
610 @cp ${.CURDIR}/scripts/ports-install.sh ${RD}/dists/ports/install.sh
611 @(cd ${RD}/dists/ports; \
612 rm -f CHECKSUM.MD5; \
613 md5 * > CHECKSUM.MD5)
614 @echo "ports distribution is finished."
620 # --==## Make source dists ##==--
624 @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \
625 TD=src TN=sbase ARG="[A-Z]*"
626 @for i in `cd /usr/src && echo [a-z]*` ; do \
627 if [ -d /usr/src/$$i ] ; then \
628 cd ${.CURDIR} && $(MAKE) doTARBALL \
629 TN=`echo s$$i | tr -d '.' | \
631 -e 's/kerberos5/krb5/'` \
632 SD=/usr/src TD=src ARG="$$i" ; \
635 .if defined(EXTRA_SRC)
636 @set ${EXTRA_SRC} && \
637 while [ $$# -ge 2 ] ; do \
638 if [ -d /usr/src/$$1 ] ; then \
639 cd ${.CURDIR} && $(MAKE) doTARBALL \
640 SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \
641 fi && shift && shift ; \
644 if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \
645 if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \
646 if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \
647 if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; \
648 cd ${RD}/dists/crypto; rm -f CHECKSUM.MD5; \
649 md5 * > CHECKSUM.MD5 ) ; fi
650 (cd ${RD}/dists/src; rm -f CHECKSUM.MD5; md5 * > CHECKSUM.MD5)
651 @echo "src distribution is finished."
655 # Complete the bootfd
657 # Now, just to get this picture down once and for all:
659 # +------------------------------------------------------------------------+
661 # +-----+-----+------------------------------------------------------------+
662 # |boot1|boot2|floppy filesystem "bootfd" |
663 # +-----+-----+-+----------------------+---------------------------------+-+
664 # |kernel.gz |mfsroot.gz |
665 # +----------------------+---------------------------------+
669 .if exists(${.CURDIR}/../sys/boot/${TARGET}/loader)
670 cd ${.CURDIR}/../sys/boot/${TARGET}/loader; \
671 ${WMAKE} clean cleandepend; \
672 ${WMAKE} -DNOMAN -DNOFORTH all; \
673 ${WMAKE} -DNOMAN -DNOFORTH install DESTDIR=${RD}/trees/special
675 cp ${RD}/trees/base/etc/disktab /etc
679 mkdir -p etc/defaults dev mnt stand/etc/defaults stand/help
680 @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \
681 DIR=${RD}/mfsfd/stand ZIP=false
682 ( cd ${RD}/mfsfd && \
683 for dir in bin sbin ; do \
684 ln -sf /stand $$dir; \
686 cp ${RD}/trees/base/sbin/dhclient-script ${RD}/mfsfd/stand
687 .if ${TARGET} == "pc98"
688 cp ${.CURDIR}/../etc/defaults/pccard.conf ${RD}/mfsfd/etc/defaults/pccard.conf
690 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf
691 ( for F in defaults/rc.conf netconfig protocols ; do \
692 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
693 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \
695 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \
696 ${RD}/trees/base/etc/services | \
697 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
698 > ${RD}/mfsfd/stand/etc/services
699 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services
700 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig
701 cp ${RD}/trees/base/COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp
703 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
704 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
706 @for i in ${DIST_DOCS_ARCH_DEP}; do \
707 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
709 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT ${RD}/mfsfd/stand/help/INSTALL.TXT
710 @mv ${RD}/mfsfd/stand/help/EARLY-ADOPTER.TXT ${RD}/mfsfd/stand/help/EARLY.TXT
712 -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
713 @mkdir -p ${RD}/mfsfd/boot
714 .if ${TARGET_ARCH} != "ia64"
715 @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
717 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
718 @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
720 @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \
721 tar xf - -C ${RD}/mfsfd/stand
722 .if defined(SMALLBOOTSIZE)
723 @mkdir -p ${RD}/mfsroot-small
724 .if exists(${.CURDIR}/${TARGET}/drivers-small.conf)
725 @mkdir -p ${RD}/mfsfd/modules
726 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 2 \
727 ${.CURDIR}/${TARGET}/drivers-small.conf \
728 ${RD}/trees/base/boot/kernel ${RD}/mfsfd/modules
730 sh -e ${DOFS_SH} ${RD}/mfsroot-small/mfsroot ${RD} ${MNT} \
731 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
732 @gzip -9nv ${RD}/mfsroot-small/mfsroot
733 @rm -rf ${RD}/mfsfd/modules
735 .if exists(${.CURDIR}/${TARGET}/drivers.conf)
736 @mkdir -p ${RD}/mfsfd/modules
737 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 2 \
738 ${.CURDIR}/${TARGET}/drivers.conf \
739 ${RD}/trees/base/boot/kernel ${RD}/mfsfd/modules
741 @mkdir -p ${RD}/mfsroot
742 sh -e ${DOFS_SH} ${RD}/mfsroot/mfsroot ${RD} ${MNT} \
743 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
744 @gzip -9nv ${RD}/mfsroot/mfsroot
748 .if !defined(NO_FLOPPIES)
749 .if exists(${.CURDIR}/${TARGET}/drivers.conf)
750 @echo "Making the drivers floppy."
751 @rm -rf ${RD}/driversfd
752 @mkdir ${RD}/driversfd
753 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 3 \
754 ${.CURDIR}/${TARGET}/drivers.conf \
755 ${RD}/trees/base/boot/kernel ${RD}/driversfd
756 -@rmdir ${RD}/driversfd
757 if [ -d ${RD}/driversfd ]; then \
759 ${RD}/floppies/drivers.flp ${RD} ${MNT} ${DRIVERSIZE} \
760 ${RD}/driversfd ${DRIVERINODE} ${DRIVERLABEL}; \
761 cd ${RD}/driversfd && awk -f ${.CURDIR}/scripts/driver-desc.awk \
762 *.dsc >> ${RD}/floppies/DRIVERS.TXT; \
765 .if defined(BOOTSIZE)
766 @echo "Making the regular boot floppy."
767 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern
769 .if defined(SMALLBOOTSIZE)
770 @echo "Making the small boot floppy."
771 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern-small FDSIZE=SMALL
773 .if defined(BIGBOOTSIZE)
774 @echo "Making the big boot floppy."
775 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=boot FDSIZE=BIG
777 .if defined(FIXITSIZE) || defined(SMALLFIXITSIZE)
778 @echo "Making fixit floppy."
779 @rm -rf ${RD}/fixitfd
781 @cd ${RD}/fixitfd && \
782 mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \
784 @cp ${RD}/trees/base/etc/spwd.db ${RD}/trees/base/etc/group \
786 @sed -e 's/#.*//' ${RD}/trees/base/etc/protocols \
787 > ${RD}/fixitfd/etc/protocols
788 @sed -e 's/#.*//' ${RD}/trees/base/usr/share/misc/scsi_modes \
789 > ${RD}/fixitfd/usr/share/misc/scsi_modes
790 @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile
791 @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services
792 @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar
793 @chmod 555 ${RD}/fixitfd/stand/tar
794 .if defined(SMALLFIXITSIZE)
795 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit-small \
796 DIR=${RD}/fixitfd/stand ZIP=false
797 @sh -e ${DOFS_SH} ${RD}/floppies/fixit-small.flp \
798 ${RD} ${MNT} ${SMALLFIXITSIZE} ${RD}/fixitfd ${FIXITINODE} \
800 @rm -rf ${RD}/fixitfd/stand
801 @mkdir ${RD}/fixitfd/stand
803 .if defined(FIXITSIZE)
804 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit \
805 DIR=${RD}/fixitfd/stand ZIP=false
806 @sh -e ${DOFS_SH} ${RD}/floppies/fixit.flp ${RD} \
807 ${MNT} ${FIXITSIZE} ${RD}/fixitfd ${FIXITINODE} ${FIXITLABEL}
810 # Do our last minute floppies directory setup in a convenient place.
812 @cp ${RND}/${RELNOTES_LANG}/installation/${TARGET}/article.txt \
813 ${RD}/floppies/README.TXT
814 @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5)
816 @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5)
822 # --==## Setup a suitable ftp-area ##==--
825 @echo "Setting up FTP distribution area"
827 -@ln -s . ${FD}/${BUILDNAME}
828 .if !defined(NO_FLOPPIES)
829 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
831 @cd ${RD}/dists && find . -print | cpio -dumpl ${FD}
833 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
834 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
835 cp ${RND}/${RELNOTES_LANG}/$$i/article.html ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
837 @for i in ${DIST_DOCS_ARCH_DEP}; do \
838 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
839 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
841 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${FD}
842 @mv ${FD}/INSTALLATION.TXT ${FD}/INSTALL.TXT
843 @mv ${FD}/INSTALLATION.HTM ${FD}/INSTALL.HTM
844 @mv ${FD}/EARLY-ADOPTER.TXT ${FD}/EARLY.TXT
845 @mv ${FD}/EARLY-ADOPTER.HTM ${FD}/EARLY.HTM
847 @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf
851 # --==## Setup a suitable cdrom-area ##==--
854 @echo "Setting up CDROM distribution area"
855 @mkdir -p ${CD_BOOT} ${CD_DISC1} ${CD_DISC2}
856 -@ln -s . ${CD_DISC1}/${BUILDNAME}
857 .if !defined(NO_FLOPPIES)
858 @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1}
860 @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1}
861 @for i in ${DISTRIBUTIONS} ; \
863 if [ -d ${RD}/trees/$${i} ] ; then \
864 chflags -R noschg ${RD}/trees/$${i} || true ; \
865 ( cd ${RD}/trees/$${i} && \
866 find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \
869 @rm -f ${CD_DISC2}/.profile
870 @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile
871 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf
872 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf
874 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
875 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
876 cp ${RND}/${RELNOTES_LANG}/$$i/article.html ${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 ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
880 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
882 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DISC1}
883 @mv ${CD_DISC1}/INSTALLATION.TXT ${CD_DISC1}/INSTALL.TXT
884 @mv ${CD_DISC1}/INSTALLATION.HTM ${CD_DISC1}/INSTALL.HTM
885 @mv ${CD_DISC1}/EARLY-ADOPTER.TXT ${CD_DISC1}/EARLY.TXT
886 @mv ${CD_DISC1}/EARLY-ADOPTER.HTM ${CD_DISC1}/EARLY.HTM
888 .if ${TARGET} != "pc98"
889 @echo "Setting up boot area"
890 @rm -f ${CD_DISC2}/boot/loader.conf
891 @cp ${RD}/mfsroot/mfsroot.gz ${CD_DISC2}/boot/mfsroot.gz
892 @echo 'mfsroot_load="YES"' > ${CD_DISC2}/boot/loader.conf
893 @echo 'mfsroot_type="mfs_root"' >> ${CD_DISC2}/boot/loader.conf
894 @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf
896 @cp -Rp ${CD_DISC2}/boot ${CD_BOOT}
897 .if defined(MINIROOT)
898 @mkdir -p ${FD}/miniroot
899 @sh -e ${DOFS_SH} ${FD}/miniroot/miniroot.ufs \
900 ${RD} ${MNT} 0 ${CD_BOOT} 8192 auto
901 @gzip -9v ${FD}/miniroot/miniroot.ufs
904 @cp -Rp ${CD_DISC2}/boot ${CD_DISC1}
905 .if ${TARGET} == "i386" && defined(EMUL_BOOT) && !defined(NO_FLOPPIES)
906 # In case bootable ISO with floppy emulation is desired.
908 @mkdir -p ${CD_BOOT}/floppies
909 @cp ${CD_DISC1}/floppies/boot.flp ${CD_BOOT}/floppies
911 @mkdir -p ${CD_DISC2}/floppies
912 @cp ${CD_DISC1}/floppies/boot.flp ${CD_DISC2}/floppies
918 .if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh)
919 @echo "Creating ISO images..."
921 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
923 ${CD}/${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT}
925 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
927 ${CD}/${BUILDNAME}-${TARGET}-miniinst.iso ${CD_DISC1}
928 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
930 ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2}
931 .if defined(CD_EXTRA_BITS)
932 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
933 ${BOOTABLE} fbsd_boot \
934 ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \
940 @echo "Do not know how to create an ISO for ${TARGET_ARCH}."
944 # --==## Documentation Project files such as the Handbook and FAQ ##==--
947 @echo "Making docs..."
948 @for i in ${DOCPORTS}; do \
949 cd /usr/ports/$$i && \
950 env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \
951 make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
952 WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
954 @cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc
958 # --==## RELNOTESng: Next-generation replacements for *.TXT files ##==--
961 @echo "Making release documentation..."
962 @cd ${.CURDIR}/doc && make all install clean 'FORMATS=html txt' INSTALL_COMPRESSED='' DOCDIR=${RND}
965 # Various "subroutine" and other supporting targets.
973 @echo "SD undefined in doTARBALL" && exit 1
976 @echo "TD undefined in doTARBALL" && exit 1
979 @echo "ARG undefined in doTARBALL" && exit 1
981 @rm -rf ${RD}/dists/${TD}/${TN}*
982 @mkdir -p ${RD}/dists/${TD}
984 tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \
985 echo rolling ${TD}/$$tn tarball &&\
986 tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \
987 ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \
988 sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn > \
989 ${RD}/dists/${TD}/$$tn.inf && \
990 if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \
991 cp -p ${.CURDIR}/scripts/$${TD}-install.sh ${RD}/dists/${TD}/install.sh; \
993 if [ "${SD}" != "/usr/src" ]; then \
994 mtree -c -i -p ${SD}/${ARG} \
995 -k gname,md5digest,mode,nlink,uname,size,link,type \
996 > ${RD}/dists/${TD}/$$tn.mtree ; \
1000 (cd ${RD}/dists/${TD}; \
1001 rm -f CHECKSUM.MD5; \
1002 md5 * > CHECKSUM.MD5) \
1005 doRELEASE: release.1 release.2 release.3 ${DOCREL} release.4 release.5 \
1006 release.6 release.7 release.8 release.9 release.10 ${EXTRAS}
1007 @echo "Release done"
1010 @rm -f release.5 release.9 release.10
1011 @cd ${.CURDIR} && ${MAKE} release.5 release.9 release.10
1012 @cd ${RD} && find floppies -print | cpio -dumpl ${FD}
1015 .if !defined(CRUNCH)
1016 @echo "CRUNCH undefined in installCRUNCH" && exit 1
1019 @echo "DIR undefined in installCRUNCH" && exit 1
1022 @echo "ZIP undefined in installCRUNCH" && exit 1
1025 gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \
1027 ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \
1029 @chmod 555 ${DIR}/${CRUNCH}_crunch
1030 @if [ -f ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf ] ; then \
1031 for i in `crunchgen -l ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf` ; do \
1032 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1035 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \
1036 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
1041 # --==## Put a filesystem into a BOOTMFS kernel ##==--
1044 @echo "Running ${.TARGET} for ${FSIMAGE}"
1045 @rm -f ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE}
1046 @cd ${.CURDIR}/../sys/${TARGET}/conf; \
1047 if [ -r ${.CURDIR}/${TARGET}/dokern.sh ]; then \
1048 sh ${.CURDIR}/${TARGET}/dokern.sh ${FDSIZE}; \
1050 sed -e 's/ident.*GENERIC/ident BOOTMFS/g'; \
1051 fi < GENERIC > BOOTMFS; \
1052 [ -r GENERIC.hints ] && cp GENERIC.hints BOOTMFS.hints
1053 .if defined(FDSIZE) && ${FDSIZE} == "SMALL" && \
1054 exists(${.CURDIR}/${TARGET}/drivers-small.conf)
1055 @awk -f ${.CURDIR}/scripts/driver-remove.awk \
1056 ${.CURDIR}/${TARGET}/drivers-small.conf \
1057 ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS
1058 .elif exists(${.CURDIR}/${TARGET}/drivers.conf)
1059 @awk -f ${.CURDIR}/scripts/driver-remove.awk \
1060 ${.CURDIR}/${TARGET}/drivers.conf \
1061 ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS
1064 KERNEL_KO=BOOTMFS KODIR= \
1065 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES -DNO_KERNELCLEAN \
1066 KERNCONF=BOOTMFS COPTFLAGS="-Os -pipe" -DNO_CPU_COPTFLAGS \
1067 buildkernel reinstallkernel \
1068 DESTDIR=${RD}/kernels
1069 [ -r ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS.hints ] && \
1070 cp ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS.hints ${RD}/kernels
1071 @rm -rf ${RD}/image.${FSIMAGE}
1072 @mkdir ${RD}/image.${FSIMAGE}
1073 @cd ${RD}/kernels && \
1074 (chflags noschg BOOTMFS || true) && \
1075 ${WMAKEENV} strip -R .comment BOOTMFS && \
1076 cp BOOTMFS BOOTMFS.${FSIMAGE} && \
1077 [ -r BOOTMFS.hints ] && mv BOOTMFS.hints BOOTMFS.${FSIMAGE}.hints
1078 mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel
1079 @echo "Setting up /boot directory for ${FSIMAGE} floppy"
1080 @mkdir -p ${RD}/image.${FSIMAGE}/boot
1081 .if ${TARGET} == "i386"
1082 @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o \
1083 -o ${RD}/image.${FSIMAGE}/boot/loader ${RD}/trees/special/boot/loader
1085 @cp ${RD}/trees/special/boot/loader ${RD}/image.${FSIMAGE}/boot
1087 @[ -r ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints ] && \
1088 sed -e '/^hint/s/^/set /' -e '/^#/d' \
1089 ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints > \
1090 ${RD}/image.${FSIMAGE}/boot/device.hints && \
1091 echo "include /boot/device.hints" > ${RD}/image.${FSIMAGE}/boot/loader.rc
1092 @echo "load /kernel" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1093 .if !defined(FDSIZE) || ${FDSIZE} != "BIG"
1094 @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1095 @echo "echo Please insert MFS root floppy and press enter:" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1096 @echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1098 @echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1099 @echo "set hint.acpi.0.disabled=1" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1100 @if [ -r ${RD}/floppies/drivers.flp ]; then \
1101 echo "set driver_floppy=YES" >> ${RD}/image.${FSIMAGE}/boot/loader.rc; \
1103 @echo "set module_path=\"/modules;/dist\"" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1104 @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1105 @echo "autoboot 10" >> ${RD}/image.${FSIMAGE}/boot/loader.rc
1106 .if ${TARGET_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT}
1107 @echo "-P" >> ${RD}/image.${FSIMAGE}/boot.config
1109 @gzip -9v ${RD}/image.${FSIMAGE}/kernel
1110 @rm -f ${RD}/floppies/${FSIMAGE}.flp
1111 .if defined(FDSIZE) && ${FDSIZE} == "BIG"
1112 @cp ${RD}/mfsroot/mfsroot.gz ${RD}/image.${FSIMAGE}
1113 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \
1114 ${RD} ${MNT} ${BIGBOOTSIZE} ${RD}/image.${FSIMAGE} \
1115 ${BOOTINODE} ${BIGBOOTLABEL}
1116 .elif defined(FDSIZE) && ${FDSIZE} == "SMALL"
1117 sh -e ${DOFS_SH} ${RD}/floppies/mfsroot-small.flp \
1118 ${RD} ${MNT} ${SMALLBOOTSIZE} ${RD}/mfsroot-small/mfsroot.gz \
1119 ${BOOTINODE} ${SMALLBOOTLABEL}
1120 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \
1121 ${RD} ${MNT} ${SMALLBOOTSIZE} ${RD}/image.${FSIMAGE} \
1122 ${BOOTINODE} ${SMALLBOOTLABEL}
1124 sh -e ${DOFS_SH} ${RD}/floppies/mfsroot.flp \
1125 ${RD} ${MNT} ${BOOTSIZE} ${RD}/mfsroot/mfsroot.gz \
1126 ${BOOTINODE} ${BOOTLABEL}
1127 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \
1128 ${RD} ${MNT} ${BOOTSIZE} ${RD}/image.${FSIMAGE} \
1129 ${BOOTINODE} ${BOOTLABEL}
1131 @echo "Created ${RD}/floppies/${FSIMAGE}.flp"
1133 .include <bsd.obj.mk>