1 1.8.2.6 he # $NetBSD: Makefile,v 1.8.2.6 2000/09/25 16:18:10 he Exp $ 2 1.1 mrg 3 1.1 mrg TOP= ${.CURDIR}/.. 4 1.6 mrg MINIROOT= ${.CURDIR}/../../miniroot 5 1.1 mrg 6 1.1 mrg .include "${TOP}/Makefile.inc" 7 1.1 mrg 8 1.1 mrg CBIN= ramdiskbin 9 1.1 mrg 10 1.1 mrg MOUNT_POINT?= /mnt 11 1.1 mrg # DEV/RDEV file system device, CDEV/RDEV vnconfig device 12 1.1 mrg VND?= vnd0 13 1.1 mrg VND_DEV= /dev/${VND}a 14 1.1 mrg VND_RDEV= /dev/r${VND}a 15 1.1 mrg VND_CDEV= /dev/${VND}c 16 1.1 mrg VND_CRDEV= /dev/r${VND}c 17 1.1 mrg MDEC= ${DESTDIR}/usr/mdec 18 1.8.2.1 pk IMAGE?= ramdisk-${REV}.fs 19 1.1 mrg 20 1.8.2.5 he LISTS= ${.CURDIR}/list 21 1.1 mrg MTREE= mtree.conf 22 1.1 mrg 23 1.8.2.4 he CYLS= 90 24 1.8.2.3 he SECS= 18 25 1.8.2.3 he TRKS= 2 26 1.8.2.3 he TOTALSECT != expr ${CYLS} '*' ${SECS} '*' ${TRKS} 27 1.3 mrg DISKTYPE= instfs 28 1.8.2.3 he DISKTAB= ./instfs.disktab 29 1.8.2.3 he GEOM= 512/${SECS}/${TRKS}/${CYLS} 30 1.8.2.3 he INO_BYTES= 6144 31 1.8.2.3 he 32 1.1 mrg 33 1.8.2.2 perry all: ${CBIN} 34 1.8.2.3 he dd if=/dev/zero of=${IMAGE} bs=512 count=${TOTALSECT} 35 1.8.2.3 he vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM} 36 1.8.2.3 he echo "${DISKTYPE}:ty=floppy:se#512:nt#${TRKS}:rm#300:ns#${SECS}:nc#${CYLS}:pa#${TOTALSECT}:oa#0:ba#4096:fa#512:ta=4.2BSD:pc#${TOTALSECT}:oc#0:" > ${DISKTAB} 37 1.8.2.3 he disklabel -rw -f ${DISKTAB} ${VND_CDEV} ${DISKTYPE} 38 1.5 mrg disklabel -W ${VND_CDEV} 39 1.8.2.3 he newfs -B be -m 0 -o space -i ${INO_BYTES} -c ${CYLS} ${VND_RDEV} 40 1.1 mrg mount ${VND_DEV} ${MOUNT_POINT} 41 1.1 mrg mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u 42 1.6 mrg TOPDIR=${TOP} CURDIR=${MINIROOT} REALCURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 43 1.8.2.6 he TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${LISTS} 44 1.1 mrg @echo "" 45 1.1 mrg @df -i ${MOUNT_POINT} 46 1.1 mrg @echo "" 47 1.1 mrg umount ${MOUNT_POINT} 48 1.1 mrg vnconfig -u ${VND_CDEV} 49 1.8.2.5 he 50 1.8.2.5 he ${IMAGE}: all 51 1.1 mrg 52 1.1 mrg unconfig: 53 1.1 mrg -umount -f ${MOUNT_POINT} 54 1.1 mrg -vnconfig -u ${VND_DEV} 55 1.1 mrg -/bin/rm -f ${IMAGE} 56 1.1 mrg 57 1.8.2.2 perry ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf 58 1.2 mrg crunchgen -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} 59 1.1 mrg 60 1.8.2.2 perry ${CBIN}.conf: ${LISTS} 61 1.8.2.2 perry awk -f ${MINIROOT}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf 62 1.8.2.2 perry 63 1.1 mrg ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c 64 1.1 mrg make -f ${CBIN}.mk all 65 1.6 mrg 66 1.6 mrg # This is listed in ramdiskbin.conf but is built here. 67 1.6 mrg ${CBIN}: libhack.o 68 1.6 mrg 69 1.6 mrg # Use stubs to eliminate some large stuff from libc 70 1.8.2.2 perry NOLIBHACKOPENDIR=1 71 1.6 mrg HACKSRC=${TOP}/../utils/libhack 72 1.6 mrg .include "${HACKSRC}/Makefile.inc" 73 1.1 mrg 74 1.4 lukem clean cleandir distclean: 75 1.8.2.3 he /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \ 76 1.8.2.3 he ${CBIN}.conf *.o *.lo *.c ${DISKTAB} 77 1.8.2.3 he 78 1.8.2.3 he .ifndef RELEASEDIR 79 1.8.2.3 he release: 80 1.8.2.3 he @echo setenv RELEASEDIR first 81 1.8.2.3 he @false 82 1.8.2.3 he .else 83 1.8.2.3 he release: ${IMAGE} 84 1.8.2.3 he gzip -c -9 < $(.OBJDIR)/${IMAGE} \ 85 1.8.2.3 he > $(RELEASEDIR)/installation/ramdisk/${IMAGE}.gz 86 1.8.2.3 he .endif # RELEASEDIR check 87 1.1 mrg 88 1.1 mrg .include <bsd.obj.mk> 89 1.1 mrg .include <bsd.subdir.mk> 90