]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/floppies/boot/floppy/Makefile
Switch to using ".So" as the extension for PIC object files rather
[FreeBSD/FreeBSD.git] / release / floppies / boot / floppy / Makefile
1
2 #       $Id: Makefile,v 1.6 1997/07/22 02:51:00 julian Exp $
3 # If this is a RELEASE, then set
4
5 # Things which without too much trouble can be considered variables
6
7 # mountpoint for filesystems.
8 TOP=${.CURDIR}/../../../..
9 OBJTOP=${.OBJDIR}/../../../..
10 FS_BIN=../../bin
11 SCRIPTDIR=${.CURDIR}/../../bin
12
13 MNT=                    /mnt
14
15 # other floppy parameters.
16 FSSIZE=                 1440
17 FSLABEL=                fd1440
18 FSINODE=                4300
19
20 NEWFSARGS=              -c 80 -b 4096 -f 512 -i 4000 -m 0 -t 0 -u 0 \
21                                 -o space -T ${FSLABEL}
22
23
24 # Upper size for the mfs in the boot.flp kernel.
25 # These are adjusted down to the minimum needed by doFS.sh.
26 BOOTMFSSIZE=            1200
27 MFSINODE=               40000
28
29 # Things which will get you into trouble if you change them
30 MTREEFILES=             ${.CURDIR}/../etc/mtree
31
32
33 # Complete the bootfd
34 #
35 # Now, just to get this picture down once and for all:
36 #
37 # +------------------------------------------------------------------------+
38 # |boot.flp                                                                |
39 # +-----+-----+------------------------------------------------------------+
40 # |boot1|boot2|floppy filesystem "bootfd"                                  |
41 # +-----+-----+-+--------------------------------------------------------+-+
42 #               |kernel                                                  |
43 #               +------------+-----------------------------------------+-+
44 #                            |mfs filesystem "mfsfd"                   |
45 #                            +-----------------------------------------+
46 #
47
48 all: ${FS_BIN}/write_mfs_in_kernel
49         cd ${.CURDIR} && ${MAKE} doMFSKERN 
50
51
52
53 #
54 # --==## Compile a kernel by name ${KERNEL} ##==--
55 #
56 # We don't erase the sys/compile/${KERNEL} directory, since somebody
57 # may want to reuse it (release.8 presently)
58 #
59 CONF=${TOP}/sys/i386/conf
60 COMPILE=${TOP}/sys/compile
61 doKERNEL:
62         cd ${CONF} && config ${KERNEL}
63         cd ${COMPILE}/${KERNEL} && \
64                         make  depend && \
65                         make  kernel && \
66
67 #
68 # --==## Put a filesystem into a BOOTMFS kernel ##==--
69 #
70 LABELDIR=${OBJTOP}/sys/i386/boot/biosboot
71
72 ${COMPILE}/BOOTMFS/kernel:
73         rm -f ${COMPILE}/BOOTMFS/mfs_vfsops.o
74         cd ${CONF} && \
75           sed   -e '/SYSV/d' \
76                 -e '/pty/d' \
77                 -e '/PROCFS/d' \
78                 -e '/KTRACE/d' \
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`\"" >> \
86                 ${CONF}/BOOTMFS
87         cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS
88
89 doMFSKERN: ${COMPILE}/BOOTMFS/kernel
90         -mkdir tree
91         cp ${COMPILE}/BOOTMFS/kernel tree
92         ${FS_BIN}/write_mfs_in_kernel/write_mfs_in_kernel tree/kernel ../mfs/fs-image
93         kzip -v tree/kernel
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
98         @mkdir -p /tmp/mnt_xx
99         @mount /dev/vn0 /tmp/mnt_xx 
100         ${FS_BIN}/dumpnlist/dumpnlist ${COMPILE}/BOOTMFS/kernel > /tmp/mnt_xx/stand/symbols
101         @umount /tmp/mnt_xx
102         @vnconfig -u /dev/vn0
103         @rmdir /tmp/mnt_xx
104
105         sh -e ${SCRIPTDIR}/doFS.sh ${LABELDIR} ${MNT} ${FSSIZE} tree \
106                 10000 ${FSLABEL}
107
108 clean:
109         rm -rf tree fs-image fs-image.size
110
111 .include <bsd.prog.mk>
112