Makefile revision 1.32
11.32Sthorpej# $NetBSD: Makefile,v 1.32 2002/03/05 21:16:52 thorpej Exp $ 21.25Spk# 31.25Spk# boot.fs is the image for disk 1 of the two-set floppy based installation 41.25Spk# method. 51.25Spk# 61.25Spk# It is constructed by injecting the microroot filesystem `ramdisk.fs' 71.25Spk# into the md based kernel built from the INSTALL kernel configuration file. 81.25Spk# 91.1Smrg 101.1SmrgTOP= ${.CURDIR}/.. 111.8SmrgMINIROOT= ${.CURDIR}/../../miniroot 121.1Smrg 131.1Smrg.include "${TOP}/Makefile.inc" 141.16Scjs 151.16Scjs.include <bsd.own.mk> # So we use /etc/mk.conf. 161.18Ssjg.include <bsd.kernobj.mk> 171.19Ssjg 181.18SsjgKERN?= ${KERNOBJDIR}/INSTALL/netbsd 191.1Smrg 201.1SmrgMOUNT_POINT?= /mnt 211.1SmrgVND?= vnd0 221.1SmrgVND_DEV= /dev/${VND}a 231.1SmrgVND_RDEV= /dev/r${VND}a 241.1SmrgVND_CDEV= /dev/${VND}c 251.1SmrgVND_CRDEV= /dev/r${VND}c 261.1SmrgFD?= fd0 271.1SmrgFD_RDEV= /dev/r${FD}a 281.13SpkIMAGE?= boot.fs 291.1SmrgMDEC= ${DESTDIR}/usr/mdec 301.29SjmcMDSETIMAGE?= mdsetimage 311.28SjmcOBJCOPY?= objcopy 321.1Smrg 331.1SmrgLISTS= ${.CURDIR}/list 341.32Sthorpej 351.32SthorpejRAMDISKDIR!= cd ${TOP}/ramdisk && ${PRINTOBJDIR} 361.32SthorpejRAMDISK= ${RAMDISKDIR}/ramdisk.fs 371.1Smrg 381.1Smrg# Some reasonable values for the -i parameter to newfs are: 391.1Smrg# 401.1Smrg# 6144 1147k, 189 inodes free 411.1Smrg# 16384 1159k, 93 inodes free 421.1Smrg# 204800 1167k, 29 inodes free 431.11SpkINO_BYTES= 204800 441.1Smrg 451.20SsjgBLOCKSIZE=512 461.25SpkFSSIZE!= expr ${BLOCKSIZE} \* 18 \* 2 \* 80 471.25Spk 481.25SpkGEOM=${BLOCKSIZE}/18/2/80 491.1Smrg 501.26SpkCLEANFILES+= netbsd.ram netbsd.ram.aout netbsd.tmp 511.20Ssjg 521.25Spk.MAIN: all 531.25Spk 541.26Spkall: netbsd.ram netbsd.ram.aout 551.25Spk dd if=/dev/zero of=${IMAGE} bs=${FSSIZE} count=1 561.31Stron vnconfig -v -c ${VND} ${IMAGE} ${GEOM} 571.10Swrstuden newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} 581.1Smrg mount ${VND_DEV} ${MOUNT_POINT} 591.26Spk gzip -9 < netbsd.ram > ${MOUNT_POINT}/netbsd 601.1Smrg @echo "" 611.1Smrg @df -i ${MOUNT_POINT} 621.1Smrg @echo "" 631.1Smrg @echo "installing new bootblocks" 641.1Smrg -rm -f ${MOUNT_POINT}/boot 651.27Sjmc ${MDEC}/binstall -m ${MDEC} -f ${IMAGE} -v ffs ${MOUNT_POINT} 661.1Smrg umount ${MOUNT_POINT} 671.31Stron vnconfig -u ${VND} 681.1Smrg 691.1Smrgunconfig: 701.1Smrg -umount -f ${MOUNT_POINT} 711.31Stron -vnconfig -u ${VND} 721.20Ssjg 731.26Spknetbsd.ram: ${KERN} ${RAMDISK} 741.1Smrg cp ${KERN} netbsd.tmp 751.29Sjmc ${MDSETIMAGE} -v netbsd.tmp ${RAMDISK} 761.25Spk strip netbsd.tmp 771.26Spk mv netbsd.tmp ${.TARGET} 781.26Spk 791.26Spk 801.26Spk# conjure up a magic header that is accepted by all Sun PROMS; 811.26Spk# see sys/arch/sparc/stand/installboot/installboot.c for details. 821.26SpkSUN_MAGIC_HEADER='\01\03\01\07\060\200\0\07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' 831.26Spk 841.26Spknetbsd.ram.aout: netbsd.ram 851.28Sjmc ${OBJCOPY} -O binary ${.ALLSRC} netbsd.ram.raw 861.26Spk (printf ${SUN_MAGIC_HEADER}; cat netbsd.ram.raw) > ${.TARGET} 871.26Spk rm -f netbsd.ram.raw 881.1Smrg 891.6Slukemclean cleandir distclean: 901.1Smrg /bin/rm -f *.core ${IMAGE} ${CLEANFILES} 911.5Smrg 921.5Smrgdepend install: 931.1Smrg 941.1Smrgreal-floppy: 951.1Smrg dd if=${IMAGE} of=${FD_RDEV} bs=32k 961.12Spk 971.12Spk.ifndef RELEASEDIR 981.12Spkrelease: 991.12Spk @echo setenv RELEASEDIR first 1001.12Spk @false 1011.12Spk.else 1021.12Spkrelease: $(IMAGE) 1031.25Spk gzip -c -9 < $(.OBJDIR)/boot.fs \ 1041.25Spk > $(RELEASEDIR)/installation/bootfs/boot.fs.gz 1051.26Spk gzip -c -9 < $(.OBJDIR)/netbsd.ram.aout \ 1061.26Spk > $(RELEASEDIR)/installation/bootfs/netbsd.ram.aout.gz 1071.12Spk.endif # RELEASEDIR check 1081.1Smrg 1091.1Smrg.include <bsd.obj.mk> 1101.30Stv.include <bsd.subdir.mk> 111