xref: /netbsd-src/distrib/sparc/bootfs/Makefile (revision 87ec68588660971149dafc460f0f85834ce49919)
1#	$NetBSD: Makefile,v 1.40 2012/03/14 13:26:43 martin Exp $
2#
3# boot.fs is the image for disk 1 of the two-set floppy based installation
4# method.
5#
6# It is constructed by injecting the microroot filesystem `ramdisk.fs'
7# into the md based kernel built from the INSTALL kernel configuration file.
8#
9
10.include <bsd.own.mk>
11.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
12
13.include <bsd.kernobj.mk>
14
15IMAGE=		boot.fs
16IMAGESIZE=	2880k
17LISTS=		${.CURDIR}/list
18MTREECONF=	${DISTRIBDIR}/common/mtree.dot
19IMAGEENDIAN=	be
20PRIMARYBOOT=	${DESTDIR}/usr/mdec/bootxx
21IMAGEDEPENDS=	netbsd.ram.gz ${DESTDIR}/usr/mdec/boot ${PRIMARYBOOT}
22IMAGEPOSTBUILD=	\
23	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${PRIMARYBOOT} /boot && \
24	printf 'V nhead 2\nV pcyl 80\nV ncyl 80\nV nsect 18\na 0 80/0/0\nW\n' \
25	    | ${TOOL_SUNLABEL} -nq ${IMAGE}
26
27RAMDISKDIR!=	cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
28RAMDISK=	${RAMDISKDIR}/ramdisk.fs
29
30IMAGE_RELEASEDIR=	installation/bootfs
31
32MDSETTARGETS=		INSTALL ${RAMDISK} netbsd.ram
33MDSET_RELEASEDIR=	installation/bootfs
34MDSET_SUFFIXES.netbsd.ram=  aout create-aout
35
36# conjure up a magic header that is accepted by all Sun PROMS;
37# see src/usr.sbin/installboot/arch/sparc.c for details.
38#
39SUN_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'
40
41create-aout=\
42	${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET}.raw && \
43	( printf ${SUN_MAGIC_HEADER}; cat ${.TARGET}.raw ) > ${.TARGET}
44
45CLEANFILES+=	netbsd.ram.aout.raw
46
47.include "${DISTRIBDIR}/common/Makefile.image"
48.include "${DISTRIBDIR}/common/Makefile.mdset"
49
50.include <bsd.prog.mk>
51