Home | History | Annotate | Line # | Download | only in instkernel
      1 #	$NetBSD: Makefile,v 1.9 2020/06/14 05:10:33 tsutsui Exp $
      2 
      3 .include <bsd.own.mk>
      4 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
      5 
      6 RAMDISKDIR!=	cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
      7 RAMDISK=	${RAMDISKDIR}/ramdisk.fs
      8 
      9 MDSETTARGETS=		RAMDISK ${RAMDISK} -
     10 MDSET_RELEASEDIR=	binary/kernel
     11 MDSET_STRIPSECTIONS=	-R .MIPS.abiflags -R .gnu.attributes -R .pdr -R .reginfo
     12 
     13 .include "${DISTRIBDIR}/common/Makefile.mdset"
     14 
     15 BOOT_RAMDISK=		boot-RAMDISK
     16 BOOT_RELEASEDIR=	installation/boot
     17 
     18 all realall:	${BOOT_RAMDISK}.gz
     19 
     20 ${BOOT_RAMDISK}.gz:	netbsd-RAMDISK.gz ${DESTDIR}/usr/mdec/boot_kernel.gz
     21 	@echo "Creating a bootloader binary with embedded RAMDISK kernel"
     22 	gunzip -c ${DESTDIR}/usr/mdec/boot_kernel.gz > ${BOOT_RAMDISK}.tmp
     23 	${TOOL_MDSETIMAGE} -v ${BOOT_RAMDISK}.tmp netbsd-RAMDISK.gz
     24 	${MIPS_ELF2ECOFF} ${BOOT_RAMDISK}.tmp ${BOOT_RAMDISK}.coff
     25 	${TOOL_GZIP_N} -9c ${BOOT_RAMDISK}.coff > ${.TARGET}
     26 
     27 CLEANFILES+=	${BOOT_RAMDISK}.tmp ${BOOT_RAMDISK}.coff ${BOOT_RAMDISK}.gz
     28 
     29 release::	check_RELEASEDIR .WAIT ${BOOT_RAMDISK}.gz
     30 	${RELEASE_INSTALL} ${BOOT_RAMDISK}.gz \
     31 	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/${BOOT_RELEASEDIR}
     32 
     33 .include <bsd.prog.mk>
     34