Makefile revision 1.34
11.34Slukem# $NetBSD: Makefile,v 1.34 2002/05/02 18:02:53 lukem 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.34Slukem.include <bsd.own.mk> 111.34Slukem.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 121.34Slukem 131.34Slukem.include <bsd.kernobj.mk> 141.34Slukem 151.1SmrgTOP= ${.CURDIR}/.. 161.8SmrgMINIROOT= ${.CURDIR}/../../miniroot 171.1Smrg 181.19Ssjg 191.18SsjgKERN?= ${KERNOBJDIR}/INSTALL/netbsd 201.1Smrg 211.1SmrgMOUNT_POINT?= /mnt 221.1SmrgVND?= vnd0 231.1SmrgVND_DEV= /dev/${VND}a 241.1SmrgVND_RDEV= /dev/r${VND}a 251.1SmrgVND_CDEV= /dev/${VND}c 261.1SmrgVND_CRDEV= /dev/r${VND}c 271.1SmrgFD?= fd0 281.1SmrgFD_RDEV= /dev/r${FD}a 291.13SpkIMAGE?= boot.fs 301.1SmrgMDEC= ${DESTDIR}/usr/mdec 311.29SjmcMDSETIMAGE?= mdsetimage 321.28SjmcOBJCOPY?= objcopy 331.1Smrg 341.1SmrgLISTS= ${.CURDIR}/list 351.32Sthorpej 361.32SthorpejRAMDISKDIR!= cd ${TOP}/ramdisk && ${PRINTOBJDIR} 371.32SthorpejRAMDISK= ${RAMDISKDIR}/ramdisk.fs 381.1Smrg 391.1Smrg# Some reasonable values for the -i parameter to newfs are: 401.1Smrg# 411.1Smrg# 6144 1147k, 189 inodes free 421.1Smrg# 16384 1159k, 93 inodes free 431.1Smrg# 204800 1167k, 29 inodes free 441.11SpkINO_BYTES= 204800 451.1Smrg 461.20SsjgBLOCKSIZE=512 471.25SpkFSSIZE!= expr ${BLOCKSIZE} \* 18 \* 2 \* 80 481.25Spk 491.25SpkGEOM=${BLOCKSIZE}/18/2/80 501.1Smrg 511.26SpkCLEANFILES+= netbsd.ram netbsd.ram.aout netbsd.tmp 521.20Ssjg 531.25Spk.MAIN: all 541.25Spk 551.26Spkall: netbsd.ram netbsd.ram.aout 561.25Spk dd if=/dev/zero of=${IMAGE} bs=${FSSIZE} count=1 571.31Stron vnconfig -v -c ${VND} ${IMAGE} ${GEOM} 581.10Swrstuden newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} 591.1Smrg mount ${VND_DEV} ${MOUNT_POINT} 601.26Spk gzip -9 < netbsd.ram > ${MOUNT_POINT}/netbsd 611.1Smrg @echo "" 621.1Smrg @df -i ${MOUNT_POINT} 631.1Smrg @echo "" 641.1Smrg @echo "installing new bootblocks" 651.1Smrg -rm -f ${MOUNT_POINT}/boot 661.27Sjmc ${MDEC}/binstall -m ${MDEC} -f ${IMAGE} -v ffs ${MOUNT_POINT} 671.1Smrg umount ${MOUNT_POINT} 681.31Stron vnconfig -u ${VND} 691.1Smrg 701.1Smrgunconfig: 711.1Smrg -umount -f ${MOUNT_POINT} 721.31Stron -vnconfig -u ${VND} 731.20Ssjg 741.26Spknetbsd.ram: ${KERN} ${RAMDISK} 751.1Smrg cp ${KERN} netbsd.tmp 761.29Sjmc ${MDSETIMAGE} -v netbsd.tmp ${RAMDISK} 771.25Spk strip netbsd.tmp 781.26Spk mv netbsd.tmp ${.TARGET} 791.26Spk 801.26Spk 811.26Spk# conjure up a magic header that is accepted by all Sun PROMS; 821.26Spk# see sys/arch/sparc/stand/installboot/installboot.c for details. 831.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' 841.26Spk 851.26Spknetbsd.ram.aout: netbsd.ram 861.28Sjmc ${OBJCOPY} -O binary ${.ALLSRC} netbsd.ram.raw 871.26Spk (printf ${SUN_MAGIC_HEADER}; cat netbsd.ram.raw) > ${.TARGET} 881.26Spk rm -f netbsd.ram.raw 891.1Smrg 901.6Slukemclean cleandir distclean: 911.1Smrg /bin/rm -f *.core ${IMAGE} ${CLEANFILES} 921.5Smrg 931.5Smrgdepend install: 941.1Smrg 951.1Smrgreal-floppy: 961.1Smrg dd if=${IMAGE} of=${FD_RDEV} bs=32k 971.12Spk 981.34Slukemrelease: check_RELEASEDIR .WAIT boot.fs netbsd.ram.aout 991.34Slukem gzip -c -9 boot.fs > $(RELEASEDIR)/installation/bootfs/boot.fs.gz 1001.34Slukem gzip -c -9 netbsd.ram.aout > \ 1011.34Slukem $(RELEASEDIR)/installation/bootfs/netbsd.ram.aout.gz 1021.1Smrg 1031.34Slukem.include <bsd.prog.mk> 104