2 # $Id: Makefile,v 1.6 1997/07/22 02:51:00 julian Exp $
3 # If this is a RELEASE, then set
5 # Things which without too much trouble can be considered variables
7 # mountpoint for filesystems.
8 TOP=${.CURDIR}/../../../..
9 OBJTOP=${.OBJDIR}/../../../..
11 SCRIPTDIR=${.CURDIR}/../../bin
15 # other floppy parameters.
20 NEWFSARGS= -c 80 -b 4096 -f 512 -i 4000 -m 0 -t 0 -u 0 \
21 -o space -T ${FSLABEL}
24 # Upper size for the mfs in the boot.flp kernel.
25 # These are adjusted down to the minimum needed by doFS.sh.
29 # Things which will get you into trouble if you change them
30 MTREEFILES= ${.CURDIR}/../etc/mtree
35 # Now, just to get this picture down once and for all:
37 # +------------------------------------------------------------------------+
39 # +-----+-----+------------------------------------------------------------+
40 # |boot1|boot2|floppy filesystem "bootfd" |
41 # +-----+-----+-+--------------------------------------------------------+-+
43 # +------------+-----------------------------------------+-+
44 # |mfs filesystem "mfsfd" |
45 # +-----------------------------------------+
48 all: ${FS_BIN}/write_mfs_in_kernel
49 cd ${.CURDIR} && ${MAKE} doMFSKERN
54 # --==## Compile a kernel by name ${KERNEL} ##==--
56 # We don't erase the sys/compile/${KERNEL} directory, since somebody
57 # may want to reuse it (release.8 presently)
59 CONF=${TOP}/sys/i386/conf
60 COMPILE=${TOP}/sys/compile
62 cd ${CONF} && config ${KERNEL}
63 cd ${COMPILE}/${KERNEL} && \
68 # --==## Put a filesystem into a BOOTMFS kernel ##==--
70 LABELDIR=${OBJTOP}/sys/i386/boot/biosboot
72 ${COMPILE}/BOOTMFS/kernel:
73 rm -f ${COMPILE}/BOOTMFS/mfs_vfsops.o
79 -e 's/GENERIC/BOOTMFS/g' \
80 -e '/maxusers/s/10/4/' < GENERIC > BOOTMFS && \
81 echo "options MFS" >> BOOTMFS && \
82 echo "options NFS_NOSERVER" >> BOOTMFS && \
83 echo 'options "MAXCONS=4"' >> BOOTMFS && \
84 echo "options USERCONFIG_BOOT" >> BOOTMFS
85 echo "options \"MFS_ROOT=`cat ../mfs/fs-image.size`\"" >> \
87 cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS
89 doMFSKERN: ${COMPILE}/BOOTMFS/kernel
91 cp ${COMPILE}/BOOTMFS/kernel tree
92 ${FS_BIN}/write_mfs_in_kernel/write_mfs_in_kernel tree/kernel ../mfs/fs-image
94 mv tree/kernel.kz tree/kernel
95 cp ${COMPILE}/../i386/boot/biosboot/boot.help tree
96 touch tree/boot.config
97 @vnconfig /dev/vn0 ../mfs/fs-image
99 @mount /dev/vn0 /tmp/mnt_xx
100 ${FS_BIN}/dumpnlist/dumpnlist ${COMPILE}/BOOTMFS/kernel > /tmp/mnt_xx/stand/symbols
102 @vnconfig -u /dev/vn0
105 sh -e ${SCRIPTDIR}/doFS.sh ${LABELDIR} ${MNT} ${FSSIZE} tree \
109 rm -rf tree fs-image fs-image.size
111 .include <bsd.prog.mk>