Home | History | Annotate | Line # | Download | only in ramdisk
Makefile revision 1.18.4.2
      1  1.18.4.2       tv #	$NetBSD: Makefile,v 1.18.4.2 2000/11/01 03:06:26 tv Exp $
      2  1.18.4.1       tv #
      3  1.18.4.1       tv # ramdisk.fs is the microroot filesystem intended for use with
      4  1.18.4.1       tv # the INSTALL kernel. It provides just enough tools to extract the
      5  1.18.4.1       tv # miniroot-based `instfs' filesystem into an MFS mount point
      6  1.18.4.1       tv # and start the installation scripts from there (see dot.profile).
      7  1.18.4.1       tv #
      8       1.1      mrg 
      9       1.1      mrg TOP=		${.CURDIR}/..
     10       1.6      mrg MINIROOT=	${.CURDIR}/../../miniroot
     11       1.1      mrg 
     12       1.1      mrg .include "${TOP}/Makefile.inc"
     13       1.1      mrg 
     14       1.1      mrg CBIN=		ramdiskbin
     15       1.1      mrg 
     16       1.1      mrg MOUNT_POINT?=	/mnt
     17       1.1      mrg # DEV/RDEV file system device, CDEV/RDEV vnconfig device
     18       1.1      mrg VND?=		vnd0
     19       1.1      mrg VND_DEV=	/dev/${VND}a
     20       1.1      mrg VND_RDEV=	/dev/r${VND}a
     21       1.1      mrg VND_CDEV=	/dev/${VND}c
     22       1.1      mrg VND_CRDEV=	/dev/r${VND}c
     23       1.1      mrg MDEC=		${DESTDIR}/usr/mdec
     24      1.15       pk IMAGE?=		ramdisk.fs
     25       1.1      mrg 
     26       1.1      mrg LISTS=		list
     27       1.1      mrg MTREE=		mtree.conf
     28       1.1      mrg 
     29  1.18.4.1       tv # image size in 512-byte blocks
     30  1.18.4.1       tv SIZE=		1360
     31  1.18.4.1       tv #DISKTYPE=	instfs
     32  1.18.4.1       tv GEOM=		512/1/${SIZE}/1
     33  1.18.4.1       tv INO_BYTES=	2048
     34       1.1      mrg 
     35      1.11      mrg all: ${CBIN}
     36  1.18.4.1       tv 	dd if=/dev/zero of=${IMAGE} bs=${SIZE}b count=1
     37      1.17      cjs 	#vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
     38      1.17      cjs 	vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM}
     39      1.17      cjs 	#disklabel -rw ${VND_CDEV} ${DISKTYPE}
     40      1.17      cjs 	#disklabel -W ${VND_CDEV}
     41      1.17      cjs 	newfs -B be -m 0 -o space -i ${INO_BYTES} ${VND_RDEV}
     42       1.1      mrg 	mount ${VND_DEV} ${MOUNT_POINT}
     43       1.1      mrg 	mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
     44       1.6      mrg 	TOPDIR=${TOP} CURDIR=${MINIROOT} REALCURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
     45      1.18      sjg 	    KERNOBJDIR=${KERNOBJDIR} \
     46       1.6      mrg 	    TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${.CURDIR}/${LISTS}
     47       1.1      mrg 	@echo ""
     48       1.1      mrg 	@df -i ${MOUNT_POINT}
     49       1.1      mrg 	@echo ""
     50       1.1      mrg 	umount ${MOUNT_POINT}
     51       1.1      mrg 	vnconfig -u ${VND_CDEV}
     52       1.1      mrg 
     53       1.1      mrg unconfig:
     54       1.1      mrg 	-umount -f ${MOUNT_POINT}
     55       1.1      mrg 	-vnconfig -u ${VND_DEV}
     56       1.1      mrg 	-/bin/rm -f ${IMAGE}
     57       1.1      mrg 
     58      1.11      mrg ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
     59       1.2      mrg 	crunchgen -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
     60       1.1      mrg 
     61      1.11      mrg ${CBIN}.conf: ${LISTS}
     62      1.13  mycroft 	awk -f ${MINIROOT}/makeconf.awk CBIN=${CBIN} ${.CURDIR}/${LISTS} > ${CBIN}.conf
     63      1.11      mrg 
     64       1.1      mrg ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
     65       1.1      mrg 	make -f ${CBIN}.mk all
     66       1.6      mrg 
     67       1.6      mrg # This is listed in ramdiskbin.conf but is built here.
     68       1.6      mrg ${CBIN}: libhack.o
     69       1.6      mrg 
     70       1.6      mrg # Use stubs to eliminate some large stuff from libc
     71      1.11      mrg NOLIBHACKOPENDIR=1
     72       1.6      mrg HACKSRC=${TOP}/../utils/libhack
     73       1.6      mrg .include "${HACKSRC}/Makefile.inc"
     74       1.1      mrg 
     75       1.4    lukem clean cleandir distclean:
     76      1.14       pk 	/bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
     77      1.14       pk 	${CBIN}.conf *.o *.cro *.c
     78       1.1      mrg 
     79       1.1      mrg .include <bsd.obj.mk>
     80       1.1      mrg .include <bsd.subdir.mk>
     81