1 # $NetBSD: Makefile.inc,v 1.18 2008/10/19 22:05:20 apb Exp $
3 # etc.sgimips/Makefile.inc -- sgimips-specific etc Makefile targets
6 # If you change the list of distributed kernels, don't forget
7 # to update the release documentation in distrib/notes/common/contents
9 .if ${MACHINE_ARCH} == "mipseb"
15 KERNEL_SETS= GENERIC${SFX}_IP2x GENERIC${SFX}_IP3x
16 .if ${MACHINE_ARCH} == "mipseb"
17 KERNEL_SETS= GENERIC32_IP12
18 KERNEL_SUFFIXES= ecoff
21 #EXTRA_KERNELS= NETBOOT
23 BUILD_KERNELS= INSTALL${SFX}_IP2x INSTALL${SFX}_IP3x
25 INSTALLATION_DIRS+= installation/netboot \
26 installation/diskimage
29 cp ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-INSTALL${SFX}_IP2x.gz ${RELEASEDIR}/ip2x
30 cp ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-INSTALL${SFX}_IP3x.gz ${RELEASEDIR}/ip3x
31 echo "ip2x/=${RELEASEDIR}/ip2x/" >> ${CDROM.pathlist}
32 echo "ip3x/=${RELEASEDIR}/ip3x/" >> ${CDROM.pathlist}
34 SGI.image= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom/netbsd-sgimips.img
37 @SEEK=`${TOOL_AWK} '/SGI_BOOT_BLOCK_SIZE_VOLHDR/{print $$3}' \
38 ${DESTDIR}/usr/include/sys/bootblock.h` ; \
39 EST=`ls -l ${CDROM.image} \
40 | ${TOOL_AWK} '{ s += $$5 } \
41 END { print int(('$${SEEK}'*512+s)/1024/1024/32+1)*32 \
43 echo "Estimated image size: $${EST} MB"; \
44 dd if=/dev/zero of=${SGI.image} bs=1024k count=$${EST}; \
45 ${TOOLDIR}/bin/nbsgivol -f -i ${SGI.image}; \
46 ${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${DESTDIR}/usr/mdec/aoutboot \
48 ${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${DESTDIR}/usr/mdec/ip2xboot \
50 ${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${DESTDIR}/usr/mdec/ip3xboot \
52 dd if=${CDROM.image} of=${SGI.image} bs=512 seek=$${SEEK}
53 mv ${SGI.image} ${CDROM.image}
54 rm -f ${RELEASEDIR}/ip2x ${RELEASEDIR}/ip3x