197d92980SPeter Wemm# $FreeBSD$ 20202c140SRodney W. Grimes# 3aeb6d603SJordan K. Hubbard# make release CHROOTDIR=/some/dir BUILDNAME=somename [ RELEASETAG=tag ] 4bd668f6fSPoul-Henning Kamp# 5aeb6d603SJordan K. Hubbard# Where "/some/dir" is the pathname of a directory on a some 68e291261SJohn Polstra# filesystem with at least 1000MB of free space, "somename" is what 7aeb6d603SJordan K. Hubbard# you want the release to call itself and, optionally, which CVS "tag" 8aeb6d603SJordan K. Hubbard# name should be used when checking out the sources to build the release 9aeb6d603SJordan K. Hubbard# (default is HEAD). 10bd668f6fSPoul-Henning Kamp# 11aeb6d603SJordan K. Hubbard# Please note: the vn driver must also be compiled into your kernel, 12f1a03fb6SAndreas Klemm# otherwise the target 'release.8' and possibly others will fail. 13f1a03fb6SAndreas Klemm# 14aeb6d603SJordan K. Hubbard# Set these, release builder! 15d013a27bSJoerg Wunsch# 16d013a27bSJoerg Wunsch# Fixed version: 1720ffc587SYoshihiro Takahashi#BUILDNAME=5.0-RELEASE 18d013a27bSJoerg Wunsch# 19d013a27bSJoerg Wunsch# Automatic SNAP versioning: 20fcab936bSDag-Erling SmørgravDATE != date +%Y%m%d 2120ffc587SYoshihiro TakahashiBASE = 5.0 2264938abfSJordan K. HubbardBUILDNAME?=${BASE}-${DATE}-SNAP 23d013a27bSJoerg Wunsch# 24fe85fe95SJordan K. Hubbard#CHROOTDIR=/junk/release 253da2229cSBrian Somers# If this is a -stable snapshot, then set 2616cca1b2SAlexander Langer#RELEASETAG=RELENG_4 273f17d264SSatoshi Asami# 283f17d264SSatoshi Asami# Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we 293f17d264SSatoshi Asami# are building an official release. Otherwise, we are building for 303f17d264SSatoshi Asami# a branch. 313f17d264SSatoshi Asami.if defined(RELEASETAG) 323f17d264SSatoshi AsamiISRELEASE!= expr ${RELEASETAG} : '^RELENG_.*_RELEASE$$' || true 333f17d264SSatoshi Asami.if ${ISRELEASE} != 0 343f17d264SSatoshi Asami# Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees. 353f17d264SSatoshi AsamiAUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//' 363f17d264SSatoshi Asami.endif 373f17d264SSatoshi Asami.endif 38ab0e9cdcSPoul-Henning Kamp 39968f82b7SWarner LoshKERNCONF=GENERIC 401a95b917SMark Murray 41fff8eb57SJohn Baldwin# If you want to pass flags to the world build such as -j X, use 42fff8eb57SJohn Baldwin# WORLD_FLAGS. Similarly, you can specify make flags for kernel 43fff8eb57SJohn Baldwin# builds via KERNEL_FLAGS. 44fff8eb57SJohn Baldwin#WORLD_FLAGS=-j4 45fff8eb57SJohn Baldwin#KERNEL_FLAGS=-j4 46fff8eb57SJohn Baldwin 470c9cba52SMike Smith# If you are using a local CVS repository with components stored in 480c9cba52SMike Smith# non-standard modules, override these on the make commandline or 490c9cba52SMike Smith# in the environment. 500c9cba52SMike SmithRELEASESRCMODULE?= src 510c9cba52SMike SmithRELEASEDOCMODULE?= doc 520c9cba52SMike SmithRELEASEPORTSMODULE?= ports 530c9cba52SMike Smith 5454d7af2eSJordan K. Hubbard# Unless set elsewhere, indicate the object format we'll be using. 55e8341fd0SJordan K. HubbardOBJFORMAT?= elf 5654d7af2eSJordan K. Hubbard 57e97fdb25SJordan K. Hubbard# Uncomment this to disable the doc.1 target. It is also an ERROR 58e97fdb25SJordan K. Hubbard# to set NOPORTS and not set NODOC since docs depend on ports. 5985486998SJordan K. Hubbard#NODOC= YES 60d6c7028cSJohn Hay#NOPORTS= YES 6150ee7e6cSJordan K. Hubbard# Set ALLLANG=no if you want the release documentation to be 628f24c563SJoseph Koshy# in English only. 6350ee7e6cSJordan K. HubbardALLLANG?= yes 642f332092SJordan K. HubbardDOCPORTS= textproc/docproj 65f6ede19cSJohn Baldwin# Set this to wherever the distfiles required by ${DOCPORTS} live. 66065aa0a0SJohn BaldwinDOCDISTFILES?= ${.CURDIR}/../../ports/distfiles 67ce51a9fcSJordan K. Hubbard# Set this to 1 if you want -P to be used for automatic keyboard detection 68ce51a9fcSJordan K. Hubbard# on the boot floppy. WARNING: Breaks on some Athlon (K7) motherboards. 69ce51a9fcSJordan K. HubbardAUTO_KEYBOARD_DETECT?= 0 70ce51a9fcSJordan K. Hubbard 717a9a71e0SJordan K. Hubbard 72ed517874SJordan K. HubbardDIST_DOCS= ABOUT.TXT ERRATA.TXT LAYOUT.TXT README.TXT HARDWARE.TXT \ 73022090a6SJordan K. Hubbard RELNOTES.TXT TROUBLE.TXT UPGRADE.TXT INSTALL.TXT 74ed517874SJordan K. Hubbard 75bd668f6fSPoul-Henning Kamp# Things which without too much trouble can be considered variables 767284556fSJordan K. Hubbard# BIN_DISTS are special in that they get full /etc installation sets. 777284556fSJordan K. Hubbard# 789f08adb1SDavid E. O'BrienCOMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x 7948084fddSJordan K. HubbardOTHER_DISTS?= manpages catpages games proflibs dict info doc 80470f825fSJordan K. HubbardCRYPTO_DISTS?= crypto krb4 krb5 817284556fSJordan K. HubbardBIN_DISTS?= bin 820a9e93bfSJordan K. HubbardDISTRIBUTIONS?= ${BIN_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} 8316c61233SJordan K. HubbardKERNELS?= GENERIC 84785bd4b4SPoul-Henning Kamp 8540b0c0d9SPeter Wemm# Extra source tarballs; each argument is a pair of source dir and 8640b0c0d9SPeter Wemm# distribution name. The dist name should not exceed 7 characters 8740b0c0d9SPeter Wemm# (another "s" for "source" will be prepended). 8840b0c0d9SPeter WemmEXTRA_SRC+= usr.sbin/sendmail/cf smailcf 8940b0c0d9SPeter Wemm 90fb71f0f6SJordan K. HubbardBOOT1= etc/protocols etc/defaults/rc.conf 911cdab3d4SJordan K. Hubbard 927c474103SPoul-Henning Kamp# mountpoint for filesystems. 937c474103SPoul-Henning KampMNT= /mnt 94518a1d34SPoul-Henning Kamp 95a5ddb8cfSJordan K. Hubbard# Various floppy image parameters. 96a5ddb8cfSJordan K. Hubbard# 97a40915d7SYoshihiro Takahashi.if ${MACHINE} == "pc98" 98a40915d7SYoshihiro TakahashiBOOTSIZE= 1200 99a40915d7SYoshihiro TakahashiFIXITSIZE= 1440 100a40915d7SYoshihiro TakahashiMFSSIZE= 2880 101a40915d7SYoshihiro TakahashiBOOTINODE= 80000 102a40915d7SYoshihiro TakahashiFIXITINODE= 4000 103a40915d7SYoshihiro TakahashiMFSINODE= 8000 104a40915d7SYoshihiro TakahashiBOOTLABEL= fd1200 105a40915d7SYoshihiro TakahashiFIXITLABEL= fd1440 106a40915d7SYoshihiro TakahashiMFSLABEL= minimum2 107a40915d7SYoshihiro Takahashi.else 108a5ddb8cfSJordan K. HubbardBOOTSIZE= 1440 109a5ddb8cfSJordan K. HubbardFIXITSIZE= 1440 110d7f9b906SJordan K. HubbardMFSSIZE= 2880 111b5d01310SJordan K. HubbardBIGBOOTSIZE= 2880 11283e16716SJordan K. HubbardBOOTINODE= 80000 1137f047619SJoerg WunschFIXITINODE= 4000 114a40915d7SYoshihiro TakahashiMFSINODE= 8000 115a5ddb8cfSJordan K. HubbardBOOTLABEL= fd1440 1167385073dSJordan K. HubbardFIXITLABEL= fd1440 117d7f9b906SJordan K. HubbardMFSLABEL= minimum2 118a40915d7SYoshihiro TakahashiBIGBOOTLABEL= minimum2 119a40915d7SYoshihiro Takahashi.endif 1207385073dSJordan K. Hubbard 1217385073dSJordan K. Hubbard# overrides. 1227f047619SJoerg Wunsch.if ${MACHINE_ARCH} == "alpha" 1237385073dSJordan K. HubbardFIXITSIZE= 2880 124a5ddb8cfSJordan K. HubbardFIXITLABEL= minimum2 1257f047619SJoerg Wunsch.endif 1260202c140SRodney W. Grimes 12730c107ccSJordan K. HubbardZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - 12800063f88SPoul-Henning Kamp 129d5cf6f60SAndrey A. Chernov 1304f059134SJohn HayVNDEVICE?= vn0 1314f059134SJohn Hay 1327284556fSJordan K. Hubbard# Things which may get you into trouble if you change them 13348327bc9SPoul-Henning KampMTREEFILES= ${.CURDIR}/../etc/mtree 134335d64e6SJordan K. Hubbard_R= /R 135335d64e6SJordan K. HubbardRD= ${_R}/stage 136335d64e6SJordan K. HubbardFD= ${_R}/ftp 137335d64e6SJordan K. HubbardCD= ${_R}/cdrom 1381bac119bSJordan K. HubbardCD_DISC1= ${CD}/disc1 1391bac119bSJordan K. HubbardCD_DISC2= ${CD}/disc2 14048327bc9SPoul-Henning Kamp 1410c5b292cSJordan K. Hubbard# Where the bootstrap ports (see DOCPORTS) get installed. 1420c5b292cSJordan K. HubbardLOCALDIR= /usr/local/bin 1430c5b292cSJordan K. Hubbard 144571240d7SJoerg Wunsch# ${BOOTSTRAPDIR} is for those utilities that refer to the hosting 1459c3b2346SDaniel O'Callaghan# environment, rather than the target environment. This is specifically 1469c3b2346SDaniel O'Callaghan# intended for kernel-dependent utilities that are used during the build. 147571240d7SJoerg Wunsch# 148571240d7SJoerg Wunsch# ${BOOTSTRAPDIR} is actually being used by prepending it to the normal 149571240d7SJoerg Wunsch# ${PATH}. Thus, it's also available to outside utilities like doFS.sh. 150571240d7SJoerg WunschBOOTSTRAPDIR= /bootstrap 151571240d7SJoerg Wunsch# 152571240d7SJoerg Wunsch# The mount subsystem has been changed between 2.2 and 3.0 by the 153571240d7SJoerg Wunsch# Lite2 import. 154571240d7SJoerg WunschBOOTSTRAPUTILS= /sbin/mount /sbin/umount 155571240d7SJoerg Wunsch# 156571240d7SJoerg Wunsch# 3.0 cpio tries to reference lchown(2) which is not available in 2.2 157571240d7SJoerg WunschBOOTSTRAPUTILS+= /usr/bin/cpio 158571240d7SJoerg Wunsch 1597284556fSJordan K. Hubbard.if !defined(CRUNCH_TARGETS) 1607284556fSJordan K. HubbardCRUNCH_TARGETS= boot fixit 1613525074dSPoul-Henning Kamp.endif 1623525074dSPoul-Henning Kamp 163a40915d7SYoshihiro Takahashi.if ${MACHINE} == "pc98" 164a40915d7SYoshihiro TakahashiEXTRAS= ftp.1 165a5986baeSTatsumi Hosokawa.else 166d219716cSJordan K. HubbardEXTRAS= cdrom.1 ftp.1 167a5986baeSTatsumi Hosokawa.endif 168793e8c6fSJordan K. Hubbard 169793e8c6fSJordan K. Hubbard.if !defined(NODOC) 170793e8c6fSJordan K. HubbardDOCREL= doc.1 171793e8c6fSJordan K. Hubbard.endif 172793e8c6fSJordan K. Hubbard 17350ee7e6cSJordan K. Hubbard.if !defined(NOPORTREADMES) 17450ee7e6cSJordan K. HubbardMAKEREADMES= make readmes PORTSDIR=${CHROOTDIR}/usr/ports 17550ee7e6cSJordan K. Hubbard.else 17650ee7e6cSJordan K. HubbardMAKEREADMES= true 17750ee7e6cSJordan K. Hubbard.endif 17850ee7e6cSJordan K. Hubbard 179288fe4dbSPoul-Henning Kamprerelease release: 180574c2247SJordan K. Hubbard.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) 181574c2247SJordan K. Hubbard @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false 1827eb11201SPoul-Henning Kamp.endif 183d191a99cSJohn Baldwin.if defined(NOPORTS) && !defined(NODOC) 184d191a99cSJohn Baldwin @echo "Ports are required for building the docs. Either set NODOC or" 185d191a99cSJohn Baldwin @echo "unset NOPORTS!" 186d191a99cSJohn Baldwin @exit 1 187d191a99cSJohn Baldwin.endif 188288fe4dbSPoul-Henning Kamp.if make(release) 189682078bdSRodney W. Grimes.if exists(${CHROOTDIR}) 19072ac7e4dSJohn Polstra# The first command will fail on a handful of files that have their schg 19172ac7e4dSJohn Polstra# flags set. But it greatly speeds up the next two commands. 19227b5e4fdSJordan K. Hubbard -rm -rf ${CHROOTDIR} 2>/dev/null 193492cf9a4SJohn Polstra -chflags -R noschg ${CHROOTDIR}/. 194b7738481SJoerg Wunsch -rm -rf ${CHROOTDIR} 195682078bdSRodney W. Grimes.endif 196335d64e6SJordan K. Hubbard mkdir -p ${CHROOTDIR} 1974b3d3c6dSJordan K. Hubbard @echo ">>> make release started on `LC_TIME=C date`" 198288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../etc && ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR} 199288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR} 2008e8d540fSSADA Kenji if [ -f /etc/resolv.conf ]; then \ 2018e8d540fSSADA Kenji cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \ 2028e8d540fSSADA Kenji fi 2036b94cd72SJordan K. Hubbard cd ${.CURDIR}/.. && ${MAKE} installworld DESTDIR=${CHROOTDIR} NOMAN=1 204571240d7SJoerg Wunsch mkdir ${CHROOTDIR}/${BOOTSTRAPDIR} 205571240d7SJoerg Wunsch for i in ${BOOTSTRAPUTILS} ; do \ 206571240d7SJoerg Wunsch cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \ 207571240d7SJoerg Wunsch done 208bd668f6fSPoul-Henning Kamp.if !defined(RELEASETAG) 20962bb2153SPaul Traina cd ${CHROOTDIR}/usr && rm -rf src && \ 2103d9c8a5dSPoul-Henning Kamp cvs -R -d ${CVSROOT} co -P ${RELEASESRCMODULE} 211bd668f6fSPoul-Henning Kamp.else 21262bb2153SPaul Traina cd ${CHROOTDIR}/usr && rm -rf src && \ 2133d9c8a5dSPoul-Henning Kamp cvs -R -d ${CVSROOT} co -P -r ${RELEASETAG} ${RELEASESRCMODULE} 214288fe4dbSPoul-Henning Kamp.endif 21562bb2153SPaul Traina.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) 21675f462f4SJordan K. Hubbard cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} 21762bb2153SPaul Traina.endif 21848f1b394SJordan K. Hubbard.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) 21948f1b394SJordan K. Hubbard cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} 22048f1b394SJordan K. Hubbard.endif 22197febce7SJoerg Wunsch.if !defined(NOPORTS) 2223f17d264SSatoshi Asami.if defined(AUXRELEASETAG) 22350ee7e6cSJordan K. Hubbard cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P -r ${AUXRELEASETAG} ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES} 2243f17d264SSatoshi Asami.else 22550ee7e6cSJordan K. Hubbard cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES} 2266e5cd2d2SJordan K. Hubbard.endif 2273f17d264SSatoshi Asami.endif 228aeb6d603SJordan K. Hubbard.if !defined(NODOC) 2293f17d264SSatoshi Asami.if defined(AUXRELEASETAG) 2303f17d264SSatoshi Asami cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P -r ${AUXRELEASETAG} ${RELEASEDOCMODULE} 2313f17d264SSatoshi Asami.else 2323d9c8a5dSPoul-Henning Kamp cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P ${RELEASEDOCMODULE} 2333f17d264SSatoshi Asami.endif 234f6ede19cSJohn Baldwin if [ -d ${DOCDISTFILES}/ ]; then \ 235f6ede19cSJohn Baldwin cp -rp ${DOCDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \ 2368e8d540fSSADA Kenji fi 237aeb6d603SJordan K. Hubbard.endif 238288fe4dbSPoul-Henning Kamp.endif 239288fe4dbSPoul-Henning Kamp.if make(rerelease) 240288fe4dbSPoul-Henning Kamp.if !defined(RELEASENOUPDATE) 241288fe4dbSPoul-Henning Kamp.if !defined(RELEASETAG) 2423d9c8a5dSPoul-Henning Kamp cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d 243288fe4dbSPoul-Henning Kamp.else 2443d9c8a5dSPoul-Henning Kamp cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG} 245288fe4dbSPoul-Henning Kamp.endif 24697febce7SJoerg Wunsch.if !defined(NOPORTS) 2473d9c8a5dSPoul-Henning Kamp cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d 2486e5cd2d2SJordan K. Hubbard.endif 249aeb6d603SJordan K. Hubbard.if !defined(NODOC) 2503d9c8a5dSPoul-Henning Kamp cd ${CHROOTDIR}/usr/doc && cvs -R -q update -P -d 251aeb6d603SJordan K. Hubbard.endif 252288fe4dbSPoul-Henning Kamp.endif 253bd668f6fSPoul-Henning Kamp.endif 2547284556fSJordan K. Hubbard # Add version information to those things that need it. 255ab0e9cdcSPoul-Henning Kamp ( cd ${CHROOTDIR}/usr/src/sys/conf && \ 256288fe4dbSPoul-Henning Kamp mv newvers.sh foo && \ 257288fe4dbSPoul-Henning Kamp sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && rm foo ) 258a4abb1d0SJordan K. Hubbard echo OBJFORMAT=${OBJFORMAT} > ${CHROOTDIR}/etc/objformat 259d4983966SPaul Traina -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release 26020e5d523SJordan K. Hubbard echo "#!/bin/sh" > ${CHROOTDIR}/mk 26120e5d523SJordan K. Hubbard echo "set -ex" >> ${CHROOTDIR}/mk 2620276d282SJordan K. Hubbard echo "_RELTARGET=\$${1:-doRELEASE}" >> ${CHROOTDIR}/mk 263c4da8a34SJordan K. Hubbard echo "export CFLAGS='-O -pipe'" >> ${CHROOTDIR}/mk 2647284556fSJordan K. Hubbard echo "export DISTRIBUTIONS=\"${DISTRIBUTIONS}\"" >> ${CHROOTDIR}/mk 26546e90709SJoerg Wunsch echo "export BUILDNAME=${BUILDNAME}" >> ${CHROOTDIR}/mk 2664f059134SJohn Hay echo "export VNDEVICE=${VNDEVICE}" >> ${CHROOTDIR}/mk 2670f31af31SJordan K. Hubbard echo "export OBJFORMAT=${OBJFORMAT}" >> ${CHROOTDIR}/mk 268c27edf93SJohn Baldwin echo "export MODULES_WITH_WORLD=YES" >> ${CHROOTDIR}/mk 26946e90709SJoerg Wunsch.if defined(RELEASETAG) 27037ca025aSJoerg Wunsch echo "export RELEASETAG=${RELEASETAG}" >> ${CHROOTDIR}/mk 27146e90709SJoerg Wunsch.endif 27297febce7SJoerg Wunsch.if defined(NOPORTS) 27397febce7SJoerg Wunsch echo "export NOPORTS=${NOPORTS}" >> ${CHROOTDIR}/mk 27437ca025aSJoerg Wunsch.endif 275793e8c6fSJordan K. Hubbard.if defined(NODOC) 276793e8c6fSJordan K. Hubbard echo "export NODOC=${NODOC}" >> ${CHROOTDIR}/mk 277793e8c6fSJordan K. Hubbard.endif 27850ee7e6cSJordan K. Hubbard.if defined(ALLLANG) && ${ALLLANG} != "NO" && ${ALLLANG} != "no" 2798f24c563SJoseph Koshy echo "export ALLLANG=${ALLLANG}" >> ${CHROOTDIR}/mk 280fa937880SNik Clayton.else 2815916b53aSNik Clayton echo "export DOC_LANG=en_US.ISO_8859-1" >> ${CHROOTDIR}/mk 2828f24c563SJoseph Koshy.endif 2834731faa3SJordan K. Hubbard.if defined(NOSRC) 2844731faa3SJordan K. Hubbard echo "export NOSRC=${NOSRC}" >> ${CHROOTDIR}/mk 2854731faa3SJordan K. Hubbard.endif 28651038afbSPaul Traina.if defined(NOSHARED) 28751038afbSPaul Traina echo "export NOSHARED=${NOSHARED}" >> ${CHROOTDIR}/mk 28851038afbSPaul Traina.endif 289871b7d1cSJordan K. Hubbard.if defined(USA_RESIDENT) 290871b7d1cSJordan K. Hubbard echo "export USA_RESIDENT=${USA_RESIDENT}" >> ${CHROOTDIR}/mk 291871b7d1cSJordan K. Hubbard.endif 29251038afbSPaul Traina.if defined(BOOT_CONFIG) 29351038afbSPaul Traina echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk 29451038afbSPaul Traina.endif 295fff8eb57SJohn Baldwin.if defined(KERNEL_FLAGS) 296fff8eb57SJohn Baldwin echo "export KERNEL_FLAGS=\"${KERNEL_FLAGS}\"" >> ${CHROOTDIR}/mk 297fff8eb57SJohn Baldwin.endif 29843276d06SJoerg Wunsch # Don't remove this, or the build will fall over! 299335d64e6SJordan K. Hubbard echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk 3000c5b292cSJordan K. Hubbard echo "export PATH=${BOOTSTRAPDIR}:$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk 3013e5ef0fdSJordan K. Hubbard echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk 30220e5d523SJordan K. Hubbard echo " cd /usr/src" >> ${CHROOTDIR}/mk 303288fe4dbSPoul-Henning Kamp.if make(release) 3042ec59376SJoerg Wunsch echo " (cd etc; make distrib-dirs distribution)" >> ${CHROOTDIR}/mk 305fff8eb57SJohn Baldwin echo " make ${WORLD_FLAGS} world && \\" >> ${CHROOTDIR}/mk 3066edfc50cSJordan K. Hubbard.endif 307288fe4dbSPoul-Henning Kamp.if make(rerelease) 308fff8eb57SJohn Baldwin echo " make ${WORLD_FLAGS} all install && \\" >> ${CHROOTDIR}/mk 309288fe4dbSPoul-Henning Kamp.endif 3103e5ef0fdSJordan K. Hubbard echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk 3113e5ef0fdSJordan K. Hubbard echo "fi" >> ${CHROOTDIR}/mk 312c67c1d08SJordan K. Hubbard echo "cd /usr/src/release/sysinstall" >> ${CHROOTDIR}/mk 313c67c1d08SJordan K. Hubbard echo "make obj" >> ${CHROOTDIR}/mk 314a3e12198SJordan K. Hubbard echo "cd /usr/src/release" >> ${CHROOTDIR}/mk 3150276d282SJordan K. Hubbard echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk 3164b3d3c6dSJordan K. Hubbard echo "echo \" >>> make ${.TARGET} Finished on `LC_TIME=C date`\"" >> ${CHROOTDIR}/mk 31720e5d523SJordan K. Hubbard chmod 755 ${CHROOTDIR}/mk 31820e5d523SJordan K. Hubbard chroot ${CHROOTDIR} /mk 31920e5d523SJordan K. Hubbard 320bd668f6fSPoul-Henning Kampclean: 321a40915d7SYoshihiro Takahashi rm -rf boot_crunch release.[0-9] 322bd668f6fSPoul-Henning Kamp 323335d64e6SJordan K. Hubbard# Clean out ${_R} and make the directory structure. 324bd668f6fSPoul-Henning Kamprelease.1: 325335d64e6SJordan K. Hubbard mkdir -p ${_R} 326cd8d8dacSJordan K. Hubbard -rm -rf ${_R}/* 2> /dev/null 327335d64e6SJordan K. Hubbard -chflags -R noschg ${_R}/. 328335d64e6SJordan K. Hubbard rm -rf ${_R}/* 329bd668f6fSPoul-Henning Kamp mkdir ${RD} 330bd668f6fSPoul-Henning Kamp mkdir ${RD}/floppies 331e12c4355SPoul-Henning Kamp mkdir ${RD}/trees 332bd668f6fSPoul-Henning Kamp mkdir ${RD}/dists 333bb91094aSPoul-Henning Kamp mkdir ${RD}/kernels 3347284556fSJordan K. Hubbard for i in ${DISTRIBUTIONS} ; do \ 335288fe4dbSPoul-Henning Kamp mkdir ${RD}/trees/$$i && \ 336288fe4dbSPoul-Henning Kamp mkdir ${RD}/dists/$$i && \ 337590694fbSAndrey A. Chernov mtree -deLU -f ${MTREEFILES}/BSD.root.dist \ 338288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i > /dev/null && \ 339590694fbSAndrey A. Chernov mtree -deLU -f ${MTREEFILES}/BSD.usr.dist \ 340288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i/usr > /dev/null && \ 341590694fbSAndrey A. Chernov mtree -deLU -f ${MTREEFILES}/BSD.include.dist \ 342288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i/usr/include > /dev/null && \ 343590694fbSAndrey A. Chernov mtree -deLU -f ${MTREEFILES}/BSD.var.dist \ 344e12c4355SPoul-Henning Kamp -p ${RD}/trees/$$i/var > /dev/null ; \ 34548327bc9SPoul-Henning Kamp done 346bd668f6fSPoul-Henning Kamp touch release.1 3477f986648SPoul-Henning Kamp 348bd668f6fSPoul-Henning Kamp# Install the system into the various distributions. 349bd668f6fSPoul-Henning Kamprelease.2: 3503c331140SJordan K. Hubbard cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin 35197febce7SJoerg Wunsch cd ${.CURDIR}/.. && make distribute DISTDIR=${RD}/trees 352ce737050SPoul-Henning Kamp.if exists(${.CURDIR}/../kerberosIV) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) 35364fd8fa8SJordan K. Hubbard cd ${.CURDIR}/../kerberosIV && ( \ 35497febce7SJoerg Wunsch make bootstrap &&\ 35597febce7SJoerg Wunsch make obj all help-distribute DISTDIR=${RD}/trees &&\ 35697febce7SJoerg Wunsch make kprog \ 35797febce7SJoerg Wunsch ) 35897febce7SJoerg Wunsch.endif 359470f825fSJordan K. Hubbard.if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) 360470f825fSJordan K. Hubbard cd ${.CURDIR}/../kerberos5 && ( \ 361470f825fSJordan K. Hubbard make bootstrap &&\ 362470f825fSJordan K. Hubbard make obj all help-distribute DISTDIR=${RD}/trees &&\ 363470f825fSJordan K. Hubbard make kprog \ 364470f825fSJordan K. Hubbard ) 365470f825fSJordan K. Hubbard.endif 3665966cedcSJoerg Wunsch -chflags -R noschg ${RD}/trees 36797febce7SJoerg Wunsch touch release.2 36897febce7SJoerg Wunsch 36997febce7SJoerg Wunsch# Make and install the generic kernel(s). 37097febce7SJoerg Wunschrelease.3: 37116c61233SJordan K. Hubbard.for kernel in ${KERNELS} 37216c61233SJordan K. Hubbard rm -f ${RD}/kernels/${kernel} 37316c61233SJordan K. Hubbard rm -rf ${.CURDIR}/../sys/compile/${kernel} 37416c61233SJordan K. Hubbard cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=${kernel} 37516c61233SJordan K. Hubbard rm -rf ${.CURDIR}/../sys/compile/${kernel} 376c27edf93SJohn Baldwin cp ${RD}/kernels/${kernel} ${RD}/trees/bin/kernel.${kernel} 37716c61233SJordan K. Hubbard.endfor 378bd668f6fSPoul-Henning Kamp touch release.3 379bd668f6fSPoul-Henning Kamp 38001feef2cSPoul-Henning Kamp# Make and install the three crunched binaries which live on the floppies. 381bd668f6fSPoul-Henning Kamp# You are not supposed to like this :-) 382cd6f5820SJoerg Wunsch# 383cd6f5820SJoerg Wunsch# NB: the "RELEASE_BUILD_FIXIT" magic prevents vi from including the 384cd6f5820SJoerg Wunsch# Tcl and Perl APIs. See also /usr/src/usr.bin/vi/Makefile. 3853ad254b3SJosef Karthauser# It also prevents ls linking against termcap by disabling color support. 3863ad254b3SJosef Karthauser# See /usr/src/bin/ls/Makefile. 387bd668f6fSPoul-Henning Kamprelease.4: 38865d6daa0SJordan K. Hubbard @mkdir -p /stand 3890f37309eSTatsumi Hosokawa cd ${.CURDIR}/sysinstall && make obj depend all install 390518a1d34SPoul-Henning Kamp rm -rf ${RD}/crunch 391518a1d34SPoul-Henning Kamp mkdir -p ${RD}/crunch 392cd6f5820SJoerg Wunsch export RELEASE_BUILD_FIXIT=noway ; \ 3937284556fSJordan K. Hubbard for j in ${CRUNCH_TARGETS} ; do \ 394518a1d34SPoul-Henning Kamp rm -rf $${j}_crunch && \ 395518a1d34SPoul-Henning Kamp mkdir $${j}_crunch && \ 396518a1d34SPoul-Henning Kamp ( cd $${j}_crunch && \ 3977ec62217SYoshihiro Takahashi ( ( [ -f ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ] && \ 3987ec62217SYoshihiro Takahashi crunchgen ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ) || \ 3997ec62217SYoshihiro Takahashi ( crunchgen ${.CURDIR}/$${j}_crunch.conf ) ) && \ 4007a0b248eSJordan K. Hubbard ${MAKE} -DRELEASE_CRUNCH -f $${j}_crunch.mk subclean all \ 401ced716c3SBrian Somers NOCRYPT=yes "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \ 402518a1d34SPoul-Henning Kamp mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \ 4035bb88366SJoerg Wunsch true || { rm -rf $${j}_crunch ; false ; } ; \ 404bd668f6fSPoul-Henning Kamp done 405bd668f6fSPoul-Henning Kamp touch release.4 406bd668f6fSPoul-Henning Kamp 40730e8b491SPoul-Henning Kamp# 40830e8b491SPoul-Henning Kamp# --==## Fix up the distributions. ##==-- 40930e8b491SPoul-Henning Kamp# 410bd668f6fSPoul-Henning Kamprelease.5: 41104f11c61SJordan K. Hubbard # Handle some grief caused by the munition braindeadness. 412d74efe91SJohn Polstra for i in sbin/init bin/ed usr.sbin/ppp usr.sbin/pppd ; do \ 4134f9a3d48SJoerg Wunsch ( cd ${.CURDIR}/../$$i; \ 4144f9a3d48SJoerg Wunsch make -DNOCRYPT clean all distribute DISTDIR=${RD}/trees ) ; \ 4154f9a3d48SJoerg Wunsch done 4164f9a3d48SJoerg Wunsch 4177284556fSJordan K. Hubbard # Create any "synthetic dists" now. 4187284556fSJordan K. Hubbard @for i in ${DISTRIBUTIONS}; do \ 4197284556fSJordan K. Hubbard if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ 4207284556fSJordan K. Hubbard echo -n "Running $$i dist creation script... "; \ 421839de40eSJohn Birrell env OBJFORMAT=${OBJFORMAT} RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \ 42258183fc7SJordan K. Hubbard echo "Done."; \ 4237284556fSJordan K. Hubbard fi \ 4247284556fSJordan K. Hubbard done \ 4257284556fSJordan K. Hubbard 4262fb96ab9SJoerg Wunsch # Create symlinks for the MD5-based crypt lib, too. The 4272fb96ab9SJoerg Wunsch # automatically created links still point to the DES stuff, 4282fb96ab9SJoerg Wunsch # which went into its own distribution. 42980e2640fSJordan K. Hubbard for i in ${RD}/trees/bin/usr/lib/libscrypt* ; do \ 4302fb96ab9SJoerg Wunsch c=`echo $$i | sed -e 's/libscrypt/libcrypt/'` ; \ 4312fb96ab9SJoerg Wunsch rm -f $$c ; \ 4322fb96ab9SJoerg Wunsch ln -s `basename $$i` $$c ; \ 4332fb96ab9SJoerg Wunsch done 43434fca5ddSJoerg Wunsch 43530e8b491SPoul-Henning Kamp # Remove all the directories we don't need. 43627d44115SPoul-Henning Kamp -cd ${RD}/trees && \ 4370a9e93bfSJordan K. Hubbard find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir 438bd668f6fSPoul-Henning Kamp touch release.5 439f14786ddSJordan K. Hubbard 44030e8b491SPoul-Henning Kamp# 4417284556fSJordan K. Hubbard# --==## Package up the tarballs from assembled trees ##==-- 44230e8b491SPoul-Henning Kamp# 443bd668f6fSPoul-Henning Kamprelease.6: 44495e34bfcSJordan K. Hubbard rm -rf ${RD}/dists 44595e34bfcSJordan K. Hubbard mkdir -p ${RD}/dists 44695e34bfcSJordan K. Hubbard @for i in ${DISTRIBUTIONS} ; \ 44795e34bfcSJordan K. Hubbard do \ 44895e34bfcSJordan K. Hubbard if [ -d ${RD}/trees/$${i} ] ; then \ 44930e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 45030e8b491SPoul-Henning Kamp SD=${RD}/trees/$${i} \ 451288fe4dbSPoul-Henning Kamp TN=$$i TD=$$i ARG="." && \ 45295e34bfcSJordan K. Hubbard echo "$${i} distribution is finished."; \ 45395e34bfcSJordan K. Hubbard fi ; \ 45495e34bfcSJordan K. Hubbard done 4557284556fSJordan K. Hubbard # More munition braindeadness. 45630e8b491SPoul-Henning Kamp ( cd ${RD}/dists && \ 457470f825fSJordan K. Hubbard if [ -f krb4/krb4.aa ] ; then mv krb4/* crypto && rmdir krb4 ; fi ) 458470f825fSJordan K. Hubbard ( cd ${RD}/dists && \ 459470f825fSJordan K. Hubbard if [ -f krb5/krb5.aa ] ; then mv krb5/* crypto && rmdir krb5 ; fi ) 4600412e9f7SJordan K. Hubbard touch release.6 46195e34bfcSJordan K. Hubbard 46295e34bfcSJordan K. Hubbard 46330e8b491SPoul-Henning Kamp# 46430e8b491SPoul-Henning Kamp# --==## Make source dists ##==-- 46530e8b491SPoul-Henning Kamp# 46695e34bfcSJordan K. Hubbardrelease.7: 4674731faa3SJordan K. Hubbard.if !defined(NOSRC) 468288fe4dbSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \ 46995e34bfcSJordan K. Hubbard TD=src TN=sbase ARG="[A-Z]*" 470fb29e2cfSJordan K. Hubbard @for i in `cd /usr/src && echo [a-z]*` ; do \ 47130e8b491SPoul-Henning Kamp if [ -d /usr/src/$$i ] ; then \ 47230e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 473470f825fSJordan K. Hubbard TN=`echo s$$i | tr -d '.' | \ 474470f825fSJordan K. Hubbard sed -e 's/usr/u/' \ 475470f825fSJordan K. Hubbard -e 's/kerberosIV/krb4/' \ 476470f825fSJordan K. Hubbard -e 's/kerberos5/krb5/'` \ 47730e8b491SPoul-Henning Kamp SD=/usr/src TD=src ARG="$$i" ; \ 47895e34bfcSJordan K. Hubbard fi ; \ 47995e34bfcSJordan K. Hubbard done 48040b0c0d9SPeter Wemm.if defined(EXTRA_SRC) 481288fe4dbSPoul-Henning Kamp @set ${EXTRA_SRC} && \ 48240b0c0d9SPeter Wemm while [ $$# -ge 2 ] ; do \ 48330e8b491SPoul-Henning Kamp if [ -d /usr/src/$$1 ] ; then \ 48430e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 48530e8b491SPoul-Henning Kamp SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \ 48630e8b491SPoul-Henning Kamp fi && shift && shift ; \ 48740b0c0d9SPeter Wemm done 48840b0c0d9SPeter Wemm.endif 489470f825fSJordan K. Hubbard if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \ 490470f825fSJordan K. Hubbard if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \ 491470f825fSJordan K. Hubbard if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \ 4920de00367SJohn Hay if [ -f skrb4.aa ] ; then mv skrb4.* ../crypto ; fi && \ 493470f825fSJordan K. Hubbard if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; ) ; fi 49495e34bfcSJordan K. Hubbard @echo "src distribution is finished." 4954731faa3SJordan K. Hubbard.endif 4960412e9f7SJordan K. Hubbard touch release.7 49795e34bfcSJordan K. Hubbard 49895e34bfcSJordan K. Hubbard# Complete the bootfd 499409f9329SJordan K. Hubbard# 500409f9329SJordan K. Hubbard# Now, just to get this picture down once and for all: 501409f9329SJordan K. Hubbard# 502409f9329SJordan K. Hubbard# +------------------------------------------------------------------------+ 503409f9329SJordan K. Hubbard# |boot.flp | 504409f9329SJordan K. Hubbard# +-----+-----+------------------------------------------------------------+ 505409f9329SJordan K. Hubbard# |boot1|boot2|floppy filesystem "bootfd" | 506409f9329SJordan K. Hubbard# +-----+-----+-+--------------------------------------------------------+-+ 507409f9329SJordan K. Hubbard# |kernel | 508409f9329SJordan K. Hubbard# +------------+-----------------------------------------+-+ 509409f9329SJordan K. Hubbard# |mfs filesystem "mfsfd" | 510409f9329SJordan K. Hubbard# +-----------------------------------------+ 511409f9329SJordan K. Hubbard# 512409f9329SJordan K. Hubbard 51323aac4b3SJordan K. Hubbardrelease.8: write_mfs_in_kernel 514409f9329SJordan K. Hubbard rm -rf ${RD}/mfsfd 515409f9329SJordan K. Hubbard mkdir ${RD}/mfsfd 516409f9329SJordan K. Hubbard cd ${RD}/mfsfd && \ 51715558ea0SMitsuru IWASAKI mkdir -p etc/defaults dev mnt stand/help 5183df0e2afSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ 519a91fd119SPoul-Henning Kamp DIR=${RD}/mfsfd/stand ZIP=false 5203df0e2afSPoul-Henning Kamp ( cd ${RD}/trees/bin/dev && \ 5212931df8aSHajimu UMEMOTO ls console tty bpf0 ttyv0 ttyv1 ttyv2 ttyv3 null zero card0 card1 card2 card3 usb usb0 uhid0 ums0 ulpt0 ugen0 kbd0 kmem mem | \ 522409f9329SJordan K. Hubbard cpio -dump ${RD}/mfsfd/dev ) 5235bf8036aSJordan K. Hubbard ( cd ${RD}/mfsfd/dev && rm -f *[swo]d*[bdefgh] ) 524ad183257SJordan K. Hubbard ( cd ${RD}/mfsfd && mkdir -p bin sbin && ln -s /stand/sh bin/sh ) 525bb1bff6dSJordan K. Hubbard cp /sbin/dhclient-script ${RD}/mfsfd/sbin 526e8bbfc06SMitsuru IWASAKI cp ${.CURDIR}/../etc/defaults/pccard.conf ${RD}/mfsfd/etc/defaults/pccard.conf 527fead5c44SJohn Baldwin cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf 5283df0e2afSPoul-Henning Kamp cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand 529d3628763SRodney W. Grimes echo "nameserver 42/tcp name" > ${RD}/mfsfd/stand/etc/services 530d3628763SRodney W. Grimes echo "ftp 21/tcp" >> ${RD}/mfsfd/stand/etc/services 531d3628763SRodney W. Grimes echo "domain 53/tcp nameserver" >> ${RD}/mfsfd/stand/etc/services 532d3628763SRodney W. Grimes echo "domain 53/udp nameserver" >> ${RD}/mfsfd/stand/etc/services 533e7fc885eSJordan K. Hubbard echo "cmd 514/tcp shell" >> ${RD}/mfsfd/stand/etc/services 5347953e823SJordan K. Hubbard gzip -9c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz 5357114cf8cSJordan K. Hubbard @for i in README.TXT RELNOTES.TXT INSTALL.TXT UPGRADE.TXT HARDWARE.TXT; do \ 5367114cf8cSJordan K. Hubbard if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ 5377114cf8cSJordan K. Hubbard gzip -9c ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} > ${RD}/mfsfd/stand/help/$${i}.gz; \ 5387114cf8cSJordan K. Hubbard else \ 5397114cf8cSJordan K. Hubbard gzip -9c ${.CURDIR}/texts/$${i} > ${RD}/mfsfd/stand/help/$${i}.gz; \ 5407114cf8cSJordan K. Hubbard fi; \ 5417114cf8cSJordan K. Hubbard done 542605ec649SJordan K. Hubbard -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd 54371696ba3SJordan K. Hubbard @mkdir -p ${RD}/mfsfd/boot 54471696ba3SJordan K. Hubbard @cp /boot/boot* ${RD}/mfsfd/boot 545fcc943bcSJordan K. Hubbard @cp /boot/loader.help ${RD}/mfsfd/boot 5466545b6a5SJordan K. Hubbard @echo "Making the regular boot floppy." 54792e86f99SJordan K. Hubbard @tar --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \ 54892e86f99SJordan K. Hubbard tar xf - -C ${RD}/mfsfd/stand 5496545b6a5SJordan K. Hubbard @echo "Compressing doc files..." 550891258b7SJordan K. Hubbard @gzip -9 ${RD}/mfsfd/stand/help/*.hlp 55150895b89SJordan K. Hubbard sh -e ${.CURDIR}/scripts/doFS.sh -s mfsroot ${RD} ${MNT} \ 55250895b89SJordan K. Hubbard ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} 5537953e823SJordan K. Hubbard @gzip -9vc mfsroot > mfsroot.gz 55492e86f99SJordan K. Hubbard @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/mfsroot.flp \ 55592e86f99SJordan K. Hubbard ${RD} ${MNT} ${BOOTSIZE} mfsroot.gz ${BOOTINODE} ${BOOTLABEL} 556643f7da0SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern 557a40915d7SYoshihiro Takahashi.if ${MACHINE} != "pc98" 558b5d01310SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=boot BIGBOOT=YES 559a40915d7SYoshihiro Takahashi.endif 56092e86f99SJordan K. Hubbard @rm mfsroot mfsroot.gz mfsroot.size 561f21b983cSJordan K. Hubbard @echo "Regular and MFS boot floppies made." 5620412e9f7SJordan K. Hubbard touch release.8 563bd668f6fSPoul-Henning Kamp 56430e8b491SPoul-Henning Kamp# 56530e8b491SPoul-Henning Kamp# --==## Create a fixit floppy ##==-- 56630e8b491SPoul-Henning Kamp# 567b53e8a34SJordan K. Hubbardrelease.9: 56892e86f99SJordan K. Hubbard @echo "Making fixit floppy." 56992e86f99SJordan K. Hubbard @rm -rf ${RD}/fixitfd 57092e86f99SJordan K. Hubbard @mkdir ${RD}/fixitfd 57192e86f99SJordan K. Hubbard @cd ${RD}/fixitfd && \ 572fbc6f9e0SJoerg Wunsch mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \ 573d26a815bSJordan K. Hubbard usr/share/misc 5743df0e2afSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=fixit \ 575518c7f2aSJoerg Wunsch DIR=${RD}/fixitfd/stand ZIP=false 57692e86f99SJordan K. Hubbard @( cd ${RD}/fixitfd/dev && \ 577a18763d0SJoerg Wunsch sed -e '/^PATH/s/^/#/' ${RD}/trees/bin/dev/MAKEDEV > MAKEDEV && \ 578a18763d0SJoerg Wunsch chmod 755 MAKEDEV && \ 5797f047619SJoerg Wunsch sh MAKEDEV fixit ) 58092e86f99SJordan K. Hubbard @cp ${RD}/trees/bin/etc/spwd.db ${RD}/trees/bin/etc/group \ 581518c7f2aSJoerg Wunsch ${RD}/trees/bin/etc/protocols ${RD}/fixitfd/etc 58292e86f99SJordan K. Hubbard @cp ${RD}/trees/bin/usr/share/misc/scsi_modes \ 583fbc6f9e0SJoerg Wunsch ${RD}/fixitfd/usr/share/misc 58492e86f99SJordan K. Hubbard @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile 58592e86f99SJordan K. Hubbard @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services 58692e86f99SJordan K. Hubbard @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar 58792e86f99SJordan K. Hubbard @chmod 555 ${RD}/fixitfd/stand/tar 58892e86f99SJordan K. Hubbard @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/fixit.flp ${RD} \ 58992e86f99SJordan K. Hubbard ${MNT} ${FIXITSIZE} ${RD}/fixitfd ${FIXITINODE} ${FIXITLABEL} 5906e5cd2d2SJordan K. Hubbard# Do our last minute floppies directory setup in a convenient place. 59192e86f99SJordan K. Hubbard @cp ${.CURDIR}/texts/FLOPPIES.TXT ${RD}/floppies/README.TXT 5924b861c74STatsumi Hosokawa @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5) 593b53e8a34SJordan K. Hubbard touch release.9 5943bc93c76SPoul-Henning Kamp 59530e8b491SPoul-Henning Kamp# 59630e8b491SPoul-Henning Kamp# --==## Setup a suitable ftp-area ##==-- 59730e8b491SPoul-Henning Kamp# 598e12c4355SPoul-Henning Kampftp.1: 59992e86f99SJordan K. Hubbard @echo "Setting up FTP distribution area" 60092e86f99SJordan K. Hubbard @mkdir -p ${FD} 601518aacadSPoul-Henning Kamp -@ln -s . ${FD}/${BUILDNAME} 60292e86f99SJordan K. Hubbard @cd ${RD} && find floppies -print | cpio -dumpl ${FD} 60392e86f99SJordan K. Hubbard @cd ${RD}/dists && find . -print | cpio -dumpl ${FD} 60496fa8770SJordan K. Hubbard @for i in ${DIST_DOCS}; do \ 60510c6fb3dSWilko Bulte if [ -f ${.CURDIR}/texts/$${i} ]; then \ 60696fa8770SJordan K. Hubbard cp ${.CURDIR}/texts/$${i} ${FD}; \ 60710c6fb3dSWilko Bulte fi; \ 6088e0f26e8SWilko Bulte if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ 6098e0f26e8SWilko Bulte echo "=== Platform specifics for ${MACHINE_ARCH}" >> ${FD}/$${i}; \ 6108e0f26e8SWilko Bulte cat ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} >> ${FD}/$${i}; \ 61196fa8770SJordan K. Hubbard fi; \ 61296fa8770SJordan K. Hubbard done 61392e86f99SJordan K. Hubbard @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf 6140206d3bdSJordan K. Hubbard.if !defined(NOPORTS) 61514870ecfSJordan K. Hubbard @tar --exclude CVS -cBf - -C ${CD_DISC1} ports | tar -xBf - -C ${FD} 6160206d3bdSJordan K. Hubbard.endif 6173bc93c76SPoul-Henning Kamp 61830e8b491SPoul-Henning Kamp# 61930e8b491SPoul-Henning Kamp# --==## Setup a suitable cdrom-area ##==-- 62030e8b491SPoul-Henning Kamp# 621c5b0a909SPoul-Henning Kampcdrom.1: 62292e86f99SJordan K. Hubbard @echo "Setting up CDROM distribution area" 62392e86f99SJordan K. Hubbard @mkdir -p ${CD_DISC1} ${CD_DISC2} 62492e86f99SJordan K. Hubbard @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1} 62592e86f99SJordan K. Hubbard @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1} 626431463e0SJordan K. Hubbard @ln -f ${RD}/kernels/MFSKERNEL.boot ${CD_DISC1}/kernel 62792e86f99SJordan K. Hubbard @for i in ${DISTRIBUTIONS} ; \ 628c5b0a909SPoul-Henning Kamp do \ 629c5b0a909SPoul-Henning Kamp if [ -d ${RD}/trees/$${i} ] ; then \ 630ad5ebf3fSDag-Erling Smørgrav chflags -R noschg ${RD}/trees/$${i} || true ; \ 63101feef2cSPoul-Henning Kamp ( cd ${RD}/trees/$${i} && \ 6321bac119bSJordan K. Hubbard find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \ 633c5b0a909SPoul-Henning Kamp fi \ 634c5b0a909SPoul-Henning Kamp done 63592e86f99SJordan K. Hubbard @rm -f ${CD_DISC2}/.profile 63692e86f99SJordan K. Hubbard @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile 63792e86f99SJordan K. Hubbard @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf 63892e86f99SJordan K. Hubbard @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf 63996fa8770SJordan K. Hubbard @for i in ${DIST_DOCS}; do \ 640f4da27bfSWilko Bulte if [ -f ${.CURDIR}/texts/$${i} ]; then \ 64196fa8770SJordan K. Hubbard cp ${.CURDIR}/texts/$${i} ${CD_DISC1}; \ 64210c6fb3dSWilko Bulte fi; \ 6438e0f26e8SWilko Bulte if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ 6447b5036ebSDavid E. O'Brien echo "=== Platform specifics for ${MACHINE_ARCH}" >> ${CD_DISC1}/$${i}; \ 6458e0f26e8SWilko Bulte cat ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} >> ${CD_DISC1}/$${i}; \ 64696fa8770SJordan K. Hubbard fi; \ 64796fa8770SJordan K. Hubbard done 6482a76df63SDavid E. O'Brien.if ${MACHINE_ARCH} == "alpha" 6492a76df63SDavid E. O'Brien @echo "Setting up Alpha CD disc1 for booting" 6502a76df63SDavid E. O'Brien @cp -Rp ${RD}/image.boot/boot ${CD_DISC1} 6512a0bb855SDavid E. O'Brien @ln -f ${CD_DISC2}/boot/cdboot ${CD_DISC1}/boot 6522a0bb855SDavid E. O'Brien @ln -f ${CD_DISC1}/boot/loader.rc ${CD_DISC2}/boot 6532a0bb855SDavid E. O'Brien @ln -f ${CD_DISC1}/kernel ${CD_DISC2}/kernel 6542a76df63SDavid E. O'Brien.endif 65597febce7SJoerg Wunsch.if !defined(NOPORTS) 65692e86f99SJordan K. Hubbard @-rm -rf /usr/ports/distfiles/* 65792e86f99SJordan K. Hubbard @mkdir -p ${CD_DISC1}/ports && \ 65814870ecfSJordan K. Hubbard tar --exclude CVS -czf ${CD_DISC1}/ports/ports.tgz -C /usr ports && \ 659a43aa360SJordan K. Hubbard cp ${.CURDIR}/scripts/ports-install.sh ${CD_DISC1}/ports/install.sh \ 660a43aa360SJordan K. Hubbard && (cd ${CD_DISC1}/ports; md5 * > CHECKSUM.MD5) 661d219716cSJordan K. Hubbard.endif 662c5b0a909SPoul-Henning Kamp 663793e8c6fSJordan K. Hubbarddoc.1: 66492e86f99SJordan K. Hubbard @echo "Making docs..." 66592e86f99SJordan K. Hubbard @for i in ${DOCPORTS}; do \ 66670af253aSJordan K. Hubbard cd /usr/ports/$$i && make all install clean JADETEX=no FORCE_PKG_REGISTER=yes; \ 667b59d8897SJordan K. Hubbard done 6685916b53aSNik Clayton @cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/bin/usr/share/doc 669a5ddb8cfSJordan K. Hubbard touch doc.1 670793e8c6fSJordan K. Hubbard 6717eb11201SPoul-Henning Kamp# Various "subroutine" and other supporting targets. 6727eb11201SPoul-Henning Kamp 673470f825fSJordan K. Hubbard# RD= 674470f825fSJordan K. Hubbard# SD= 675470f825fSJordan K. Hubbard# TD= 676470f825fSJordan K. Hubbard# ARG= 677bd668f6fSPoul-Henning KampdoTARBALL: 678bd668f6fSPoul-Henning Kamp.if !defined(SD) 679288fe4dbSPoul-Henning Kamp @echo "SD undefined in doTARBALL" && exit 1 680bd668f6fSPoul-Henning Kamp.endif 681bd668f6fSPoul-Henning Kamp.if !defined(TD) 682288fe4dbSPoul-Henning Kamp @echo "TB undefined in doTARBALL" && exit 1 683bd668f6fSPoul-Henning Kamp.endif 684bd668f6fSPoul-Henning Kamp.if !defined(ARG) 685288fe4dbSPoul-Henning Kamp @echo "ARG undefined in doTARBALL" && exit 1 686bd668f6fSPoul-Henning Kamp.endif 68792e86f99SJordan K. Hubbard @rm -rf ${RD}/dists/${TD}/${TN}* 68892e86f99SJordan K. Hubbard @mkdir -p ${RD}/dists/${TD} 68992e86f99SJordan K. Hubbard @( cd ${SD} && \ 690d2b98961SPoul-Henning Kamp tn=`echo ${TN} | tr '[A-Z]' '[a-z]' | cut -c1-8` && \ 691d2b98961SPoul-Henning Kamp echo rolling ${TD}/$$tn tarball &&\ 6920ef3fb22SJoerg Wunsch tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ 69395e34bfcSJordan K. Hubbard ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \ 69420ff6b88SJordan K. Hubbard sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn > \ 695ac0a5268SJordan K. Hubbard ${RD}/dists/${TD}/$$tn.inf && \ 6961e104a1eSJordan K. Hubbard if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \ 6971e104a1eSJordan K. Hubbard cp -p ${.CURDIR}/scripts/$${TD}-install.sh ${RD}/dists/${TD}/install.sh; \ 6981e104a1eSJordan K. Hubbard fi && \ 69916c61233SJordan K. Hubbard if [ "${SD}" != "/usr/src" ]; then \ 70006eaff03SAndrey A. Chernov mtree -L -c -i -p ${SD}/${ARG} \ 70116c61233SJordan K. Hubbard -k gname,md5digest,mode,nlink,uname,size,link,type \ 70291f2535eSJordan K. Hubbard > ${RD}/dists/${TD}/$$tn.mtree ; \ 70391f2535eSJordan K. Hubbard else \ 70491f2535eSJordan K. Hubbard true; \ 70591f2535eSJordan K. Hubbard fi; \ 70691f2535eSJordan K. Hubbard (cd ${RD}/dists/${TD}; \ 70791f2535eSJordan K. Hubbard rm -f CHECKSUM.MD5; \ 70891f2535eSJordan K. Hubbard md5 * > CHECKSUM.MD5) \ 70991f2535eSJordan K. Hubbard ) 7107eb11201SPoul-Henning Kamp 7113fe1f923SJordan K. HubbarddoRELEASE: release.1 release.2 ${DOCREL} release.3 release.4 release.5 \ 712793e8c6fSJordan K. Hubbard release.6 release.7 release.8 release.9 71392e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} ${EXTRAS} 7147eb11201SPoul-Henning Kamp @echo "Release done" 7157eb11201SPoul-Henning Kamp 7160ead1f1dSJordan K. Hubbardfloppies: 71792e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} boot.flp 71892e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} fixit.flp 71992e86f99SJordan K. Hubbard @cd ${RD} && find floppies -print | cpio -dumpl ${FD} 7200ead1f1dSJordan K. Hubbard 7213525074dSPoul-Henning Kampboot.flp: 72292e86f99SJordan K. Hubbard @rm -f release.4 release.8 72392e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} release.4 release.8 CRUNCH_TARGETS=boot 7243525074dSPoul-Henning Kamp 725e841846bSPoul-Henning Kampfixit.flp: 72692e86f99SJordan K. Hubbard @rm -f release.4 release.9 72792e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} release.4 release.9 CRUNCH_TARGETS=fixit 728e841846bSPoul-Henning Kamp 729409f9329SJordan K. Hubbardwrite_mfs_in_kernel: ${.CURDIR}/write_mfs_in_kernel.c 730409f9329SJordan K. Hubbard ${CC} ${CFLAGS} -o write_mfs_in_kernel ${.CURDIR}/write_mfs_in_kernel.c 731409f9329SJordan K. Hubbard 732518a1d34SPoul-Henning KampinstallCRUNCH: 733518a1d34SPoul-Henning Kamp.if !defined(CRUNCH) 734288fe4dbSPoul-Henning Kamp @echo "CRUNCH undefined in installCRUNCH" && exit 1 735518a1d34SPoul-Henning Kamp.endif 736518a1d34SPoul-Henning Kamp.if !defined(DIR) 737288fe4dbSPoul-Henning Kamp @echo "DIR undefined in installCRUNCH" && exit 1 738518a1d34SPoul-Henning Kamp.endif 739518a1d34SPoul-Henning Kamp.if !defined(ZIP) 740288fe4dbSPoul-Henning Kamp @echo "ZIP undefined in installCRUNCH" && exit 1 741518a1d34SPoul-Henning Kamp.endif 74292e86f99SJordan K. Hubbard @if ${ZIP} ; then \ 743518a1d34SPoul-Henning Kamp gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \ 744518a1d34SPoul-Henning Kamp else \ 745518a1d34SPoul-Henning Kamp ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \ 746518a1d34SPoul-Henning Kamp fi 74792e86f99SJordan K. Hubbard @chmod 555 ${DIR}/${CRUNCH}_crunch 7487ec62217SYoshihiro Takahashi @if [ -f ${.CURDIR}/${MACHINE}/${CRUNCH}_crunch.conf ] ; then \ 7497ec62217SYoshihiro Takahashi for i in `crunchgen -l ${.CURDIR}/${MACHINE}/${CRUNCH}_crunch.conf` ; do \ 750518a1d34SPoul-Henning Kamp ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ 7517ec62217SYoshihiro Takahashi done \ 7527ec62217SYoshihiro Takahashi else \ 7537ec62217SYoshihiro Takahashi for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \ 7547ec62217SYoshihiro Takahashi ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ 7557ec62217SYoshihiro Takahashi done \ 7567ec62217SYoshihiro Takahashi fi 757288fe4dbSPoul-Henning Kamp 758288fe4dbSPoul-Henning Kamp# 759288fe4dbSPoul-Henning Kamp# --==## Compile a kernel by name ${KERNEL} ##==-- 760288fe4dbSPoul-Henning Kamp# 761288fe4dbSPoul-Henning Kamp# We don't erase the sys/compile/${KERNEL} directory, since somebody 762288fe4dbSPoul-Henning Kamp# may want to reuse it (release.8 presently) 763288fe4dbSPoul-Henning Kamp# 764288fe4dbSPoul-Henning KampdoKERNEL: 76592e86f99SJordan K. Hubbard @rm -f ${RD}/kernels/${KERNEL} 766a40915d7SYoshihiro Takahashi @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} 76792e86f99SJordan K. Hubbard @cd ${.CURDIR}/../sys/compile/${KERNEL} && \ 768c27edf93SJohn Baldwin make kernel-depend && \ 769fff8eb57SJohn Baldwin make ${KERNEL_FLAGS} ${KERNEL} && \ 770fff8eb57SJohn Baldwin make kernel-reinstall DESTDIR=${RD}/kernels && \ 771fff8eb57SJohn Baldwin [ -r ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ] && \ 772fff8eb57SJohn Baldwin cp ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ${RD}/kernels 773288fe4dbSPoul-Henning Kamp 774288fe4dbSPoul-Henning Kamp# 775288fe4dbSPoul-Henning Kamp# --==## Put a filesystem into a BOOTMFS kernel ##==-- 776288fe4dbSPoul-Henning Kamp# 777288fe4dbSPoul-Henning KampdoMFSKERN: 77892e86f99SJordan K. Hubbard @echo "Running doMFSKERN for ${FSIMAGE}" 779d50a3007SJordan K. Hubbard @rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE} 780a40915d7SYoshihiro Takahashi @cd ${.CURDIR}/../sys/${MACHINE}/conf && \ 781fff8eb57SJohn Baldwin sh ${.CURDIR}/scripts/dokern.sh ${BIGBOOT} < ${KERNCONF} > BOOTMFS && \ 782fff8eb57SJohn Baldwin [ -r ${KERNCONF}.hints ] && cp ${KERNCONF}.hints BOOTMFS.hints 783be68ea48SJordan K. Hubbard.if ${MACHINE_ARCH} == "i386" 784a40915d7SYoshihiro Takahashi @echo "options INTRO_USERCONFIG" >> \ 785a40915d7SYoshihiro Takahashi ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS 786be68ea48SJordan K. Hubbard.endif 787b5d01310SJordan K. Hubbard.if defined(BIGBOOT) 788fff8eb57SJohn Baldwin @echo "options MD_ROOT_SIZE=`cat mfsroot.size`" >> \ 789a40915d7SYoshihiro Takahashi ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS 790215eac6fSJordan K. Hubbard.endif 79192e86f99SJordan K. Hubbard @cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS 792643f7da0SJordan K. Hubbard @rm -rf ${RD}/image.${FSIMAGE} 793643f7da0SJordan K. Hubbard @mkdir ${RD}/image.${FSIMAGE} 794fff8eb57SJohn Baldwin @cd ${RD}/kernels && \ 795fff8eb57SJohn Baldwin chflags noschg BOOTMFS && \ 796fff8eb57SJohn Baldwin strip BOOTMFS && \ 797fff8eb57SJohn Baldwin cp BOOTMFS BOOTMFS.${FSIMAGE} && \ 798fff8eb57SJohn Baldwin [ -r BOOTMFS.hints ] && mv BOOTMFS.hints BOOTMFS.${FSIMAGE}.hints 79992e86f99SJordan K. Hubbard mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel 80092e86f99SJordan K. Hubbard @echo "Setting up /boot directory for ${FSIMAGE} floppy" 801643f7da0SJordan K. Hubbard @mkdir -p ${RD}/image.${FSIMAGE}/boot 802f248b387SJordan K. Hubbard @cp /boot/boot[12] /boot/loader ${RD}/image.${FSIMAGE}/boot 803fff8eb57SJohn Baldwin @[ -r ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints ] && \ 804fff8eb57SJohn Baldwin sed -e '/^hint/s/^/set /' -e '/^#/d' \ 805fff8eb57SJohn Baldwin ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints > \ 806fff8eb57SJohn Baldwin ${RD}/image.${FSIMAGE}/boot/device.hints && \ 807fff8eb57SJohn Baldwin echo "include /boot/device.hints" > ${RD}/image.${FSIMAGE}/boot/loader.rc 808873bfb63SDavid E. O'Brien.if !defined(BIGBOOT) 809fff8eb57SJohn Baldwin @echo "load /kernel" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 810f7a68483SMasafumi Max NAKANE @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 811c8fe5d2aSMike Smith @echo "echo Please insert MFS root floppy and press enter:" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 812c8fe5d2aSMike Smith @echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 813c8fe5d2aSMike Smith @echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 81496a3add7SMasafumi Max NAKANE.endif 81596a3add7SMasafumi Max NAKANE @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 81678e52c11SMasafumi Max NAKANE @echo "autoboot 10" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 817ce51a9fcSJordan K. Hubbard.if ${MACHINE_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT} 81896a3add7SMasafumi Max NAKANE @echo "-P" >> ${RD}/image.${FSIMAGE}/boot.config 8198198d9b0SJordan K. Hubbard.endif 820b5d01310SJordan K. Hubbard.if defined(BIGBOOT) 8219694e175SJordan K. Hubbard @echo "Writing MFS image into kernel for ${FSIMAGE} floppy" 82292e86f99SJordan K. Hubbard @./write_mfs_in_kernel ${RD}/image.${FSIMAGE}/kernel mfsroot 823643f7da0SJordan K. Hubbard @cp ${RD}/image.${FSIMAGE}/kernel ${RD}/kernels/MFSKERNEL.${FSIMAGE} 8249694e175SJordan K. Hubbard.endif 8257953e823SJordan K. Hubbard @gzip -9v ${RD}/image.${FSIMAGE}/kernel 826643f7da0SJordan K. Hubbard @rm -f ${RD}/floppies/${FSIMAGE}.flp 827b5d01310SJordan K. Hubbard.if defined(BIGBOOT) 82850895b89SJordan K. Hubbard sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/${FSIMAGE}.flp \ 829b5d01310SJordan K. Hubbard ${RD} ${MNT} ${BIGBOOTSIZE} ${RD}/image.${FSIMAGE} \ 830b5d01310SJordan K. Hubbard ${BOOTINODE} ${BIGBOOTLABEL} 83150895b89SJordan K. Hubbard.else 83250895b89SJordan K. Hubbard sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/${FSIMAGE}.flp \ 83392e86f99SJordan K. Hubbard ${RD} ${MNT} ${BOOTSIZE} ${RD}/image.${FSIMAGE} \ 83492e86f99SJordan K. Hubbard ${BOOTINODE} ${BOOTLABEL} 83550895b89SJordan K. Hubbard.endif 83692e86f99SJordan K. Hubbard @echo "Created ${RD}/floppies/${FSIMAGE}.flp" 837288fe4dbSPoul-Henning Kamp 8382469b9a2SPoul-Henning Kamp.include <bsd.prog.mk> 839