Make and install a bootloader binary with embedded RAMDISK kernel image.

This commit is contained in:
tsutsui 2006-01-09 07:24:29 +00:00
parent 98d3b4882a
commit 89d726eb46
1 changed files with 18 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2005/12/29 16:01:31 tsutsui Exp $
# $NetBSD: Makefile,v 1.2 2006/01/09 07:24:29 tsutsui Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -11,4 +11,21 @@ MDSET_RELEASEDIR= binary/kernel
.include "${DISTRIBDIR}/common/Makefile.mdset"
BOOT_RAMDISK= boot-RAMDISK
BOOT_RELEASEDIR= installation/boot
all realall: ${BOOT_RAMDISK}.gz
${BOOT_RAMDISK}.gz: netbsd-RAMDISK.gz ${DESTDIR}/usr/mdec/boot_kernel.gz
gunzip -c ${DESTDIR}/usr/mdec/boot_kernel.gz > ${BOOT_RAMDISK}.tmp
${TOOL_MDSETIMAGE} ${BOOT_RAMDISK}.tmp netbsd-RAMDISK.gz
${ELF2ECOFF} ${BOOT_RAMDISK}.tmp ${BOOT_RAMDISK}.coff
gzip -9c ${BOOT_RAMDISK}.coff > ${.TARGET}
CLEANFILES+= ${BOOT_RAMDISK}.tmp ${BOOT_RAMDISK}.coff ${BOOT_RAMDISK}.gz
release:: check_RELEASEDIR .WAIT ${BOOT_RAMDISK}.gz
${RELEASE_INSTALL} ${BOOT_RAMDISK}.gz \
${RELEASEDIR}/${MACHINE}/${BOOT_RELEASEDIR}
.include <bsd.prog.mk>