Makefile revision 1.28
11.28Senami# $NetBSD: Makefile,v 1.28 2001/10/10 05:13:55 enami Exp $ 21.21Spk# 31.21Spk# ramdisk.fs is the microroot filesystem intended for use with 41.21Spk# the INSTALL kernel. It provides just enough tools to extract the 51.21Spk# miniroot-based `instfs' filesystem into an MFS mount point 61.21Spk# and start the installation scripts from there (see dot.profile). 71.21Spk# 81.1Smrg 91.1SmrgTOP= ${.CURDIR}/.. 101.6SmrgMINIROOT= ${.CURDIR}/../../miniroot 111.1Smrg 121.1Smrg.include "${TOP}/Makefile.inc" 131.1Smrg 141.1SmrgCBIN= ramdiskbin 151.1Smrg 161.1SmrgMOUNT_POINT?= /mnt 171.1Smrg# DEV/RDEV file system device, CDEV/RDEV vnconfig device 181.1SmrgVND?= vnd0 191.1SmrgVND_DEV= /dev/${VND}a 201.1SmrgVND_RDEV= /dev/r${VND}a 211.1SmrgVND_CDEV= /dev/${VND}c 221.1SmrgVND_CRDEV= /dev/r${VND}c 231.1SmrgMDEC= ${DESTDIR}/usr/mdec 241.15SpkIMAGE?= ramdisk.fs 251.1Smrg 261.1SmrgLISTS= list 271.28SenamiMTREECONF= mtree.conf 281.1Smrg 291.24SgarbledCRUNCHGEN?= crunchgen 301.24Sgarbled 311.21Spk# image size in 512-byte blocks 321.21SpkSIZE= 1360 331.21Spk#DISKTYPE= instfs 341.21SpkGEOM= 512/1/${SIZE}/1 351.26SpkINO_BYTES= 2752 361.1Smrg 371.11Smrgall: ${CBIN} 381.21Spk dd if=/dev/zero of=${IMAGE} bs=${SIZE}b count=1 391.17Scjs #vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 401.17Scjs vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM} 411.17Scjs #disklabel -rw ${VND_CDEV} ${DISKTYPE} 421.17Scjs #disklabel -W ${VND_CDEV} 431.17Scjs newfs -B be -m 0 -o space -i ${INO_BYTES} ${VND_RDEV} 441.1Smrg mount ${VND_DEV} ${MOUNT_POINT} 451.28Senami mtree -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u 461.6Smrg TOPDIR=${TOP} CURDIR=${MINIROOT} REALCURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 471.18Ssjg KERNOBJDIR=${KERNOBJDIR} \ 481.6Smrg TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${.CURDIR}/${LISTS} 491.1Smrg @echo "" 501.1Smrg @df -i ${MOUNT_POINT} 511.1Smrg @echo "" 521.1Smrg umount ${MOUNT_POINT} 531.1Smrg vnconfig -u ${VND_CDEV} 541.1Smrg 551.1Smrgunconfig: 561.1Smrg -umount -f ${MOUNT_POINT} 571.1Smrg -vnconfig -u ${VND_DEV} 581.1Smrg -/bin/rm -f ${IMAGE} 591.1Smrg 601.11Smrg${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf 611.24Sgarbled ${CRUNCHGEN} -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} 621.1Smrg 631.11Smrg${CBIN}.conf: ${LISTS} 641.13Smycroft awk -f ${MINIROOT}/makeconf.awk CBIN=${CBIN} ${.CURDIR}/${LISTS} > ${CBIN}.conf 651.11Smrg 661.1Smrg${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c 671.22Sgarbled ${MAKE} -f ${CBIN}.mk all 681.6Smrg 691.6Smrg# This is listed in ramdiskbin.conf but is built here. 701.6Smrg${CBIN}: libhack.o 711.6Smrg 721.6Smrg# Use stubs to eliminate some large stuff from libc 731.11SmrgNOLIBHACKOPENDIR=1 741.6SmrgHACKSRC=${TOP}/../utils/libhack 751.6Smrg.include "${HACKSRC}/Makefile.inc" 761.1Smrg 771.4Slukemclean cleandir distclean: 781.14Spk /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \ 791.14Spk ${CBIN}.conf *.o *.cro *.c 801.1Smrg 811.1Smrg.include <bsd.obj.mk> 821.27Schs.include <bsd.sys.mk> 831.1Smrg.include <bsd.subdir.mk> 84