head	1.6;
access;
symbols
	perseant-exfatfs-base-20250801:1.6
	perseant-exfatfs-base-20240630:1.6
	perseant-exfatfs:1.6.0.48
	perseant-exfatfs-base:1.6
	cjep_sun2x:1.6.0.46
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	cjep_staticlib_x:1.6.0.44
	cjep_staticlib_x-base:1.6
	phil-wifi-20200421:1.6
	phil-wifi-20200411:1.6
	phil-wifi-20200406:1.6
	pgoyette-compat-merge-20190127:1.6
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.6
	pgoyette-compat-0906:1.6
	pgoyette-compat-0728:1.6
	pgoyette-compat-0625:1.6
	pgoyette-compat-0521:1.6
	pgoyette-compat-0502:1.6
	pgoyette-compat-0422:1.6
	pgoyette-compat-0415:1.6
	pgoyette-compat-0407:1.6
	pgoyette-compat-0330:1.6
	pgoyette-compat-0322:1.6
	pgoyette-compat-0315:1.6
	pgoyette-compat:1.6.0.42
	pgoyette-compat-base:1.6
	perseant-stdc-iso10646:1.6.0.40
	perseant-stdc-iso10646-base:1.6
	prg-localcount2-base3:1.6
	prg-localcount2-base2:1.6
	prg-localcount2-base1:1.6
	prg-localcount2:1.6.0.38
	prg-localcount2-base:1.6
	pgoyette-localcount-20170426:1.6
	bouyer-socketcan-base1:1.6
	pgoyette-localcount-20170320:1.6
	bouyer-socketcan:1.6.0.36
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	pgoyette-localcount-20161104:1.6
	localcount-20160914:1.6
	pgoyette-localcount-20160806:1.6
	pgoyette-localcount-20160726:1.6
	pgoyette-localcount:1.6.0.34
	pgoyette-localcount-base:1.6
	netbsd-5-2-3-RELEASE:1.6
	netbsd-5-1-5-RELEASE:1.6
	yamt-pagecache-base9:1.6
	yamt-pagecache-tag8:1.6
	tls-earlyentropy:1.6.0.30
	tls-earlyentropy-base:1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	netbsd-5-2-2-RELEASE:1.6
	netbsd-5-1-4-RELEASE:1.6
	netbsd-5-2-1-RELEASE:1.6
	netbsd-5-1-3-RELEASE:1.6
	agc-symver:1.6.0.32
	agc-symver-base:1.6
	tls-maxphys-base:1.6
	yamt-pagecache-base8:1.6
	netbsd-5-2:1.6.0.28
	yamt-pagecache-base7:1.6
	netbsd-5-2-RELEASE:1.6
	netbsd-5-2-RC1:1.6
	yamt-pagecache-base6:1.6
	yamt-pagecache-base5:1.6
	yamt-pagecache-base4:1.6
	netbsd-5-1-2-RELEASE:1.6
	netbsd-5-1-1-RELEASE:1.6
	yamt-pagecache-base3:1.6
	yamt-pagecache-base2:1.6
	yamt-pagecache:1.6.0.26
	yamt-pagecache-base:1.6
	bouyer-quota2-nbase:1.6
	bouyer-quota2:1.6.0.24
	bouyer-quota2-base:1.6
	matt-nb5-pq3:1.6.0.22
	matt-nb5-pq3-base:1.6
	netbsd-5-1:1.6.0.20
	netbsd-5-1-RELEASE:1.6
	netbsd-5-1-RC4:1.6
	netbsd-5-1-RC3:1.6
	netbsd-5-1-RC2:1.6
	netbsd-5-1-RC1:1.6
	netbsd-5-0-2-RELEASE:1.6
	netbsd-5-0-1-RELEASE:1.6
	jym-xensuspend-nbase:1.6
	netbsd-5-0:1.6.0.18
	netbsd-5-0-RELEASE:1.6
	netbsd-5-0-RC4:1.6
	netbsd-5-0-RC3:1.6
	netbsd-5-0-RC2:1.6
	jym-xensuspend:1.6.0.16
	jym-xensuspend-base:1.6
	netbsd-5-0-RC1:1.6
	netbsd-5:1.6.0.14
	netbsd-5-base:1.6
	yamt-pf42-base4:1.6
	yamt-pf42-base3:1.6
	hpcarm-cleanup-nbase:1.6
	yamt-pf42-base2:1.6
	yamt-pf42:1.6.0.12
	yamt-pf42-base:1.6
	mjf-devfs2:1.6.0.10
	mjf-devfs2-base:1.6
	keiichi-mipv6:1.6.0.8
	keiichi-mipv6-base:1.6
	mjf-devfs:1.6.0.6
	mjf-devfs-base:1.6
	cube-autoconf:1.6.0.4
	cube-autoconf-base:1.6
	hpcarm-cleanup:1.6.0.2
	hpcarm-cleanup-base:1.6
	netbsd-1-5-PATCH003:1.3.2.3
	netbsd-1-5-PATCH002:1.3.2.3
	netbsd-1-5-PATCH001:1.3.2.3
	netbsd-1-5-RELEASE:1.3.2.2
	netbsd-1-5-BETA2:1.3.2.2
	netbsd-1-5-BETA:1.3.2.2
	netbsd-1-5:1.3.0.2;
locks; strict;
comment	@# @;


1.6
date	2001.01.07.09.30.12;	author mrg;	state dead;
branches;
next	1.5;

1.5
date	2000.11.01.07.58.01;	author garbled;	state Exp;
branches;
next	1.4;

1.4
date	2000.10.26.04.53.57;	author garbled;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.20.14.46.03;	author mrg;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2000.08.19.13.17.38;	author mrg;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.10.14.38.53;	author mrg;	state Exp;
branches;
next	;

1.3.2.1
date	2000.08.20.14.46.03;	author mrg;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2000.08.26.01.07.06;	author mrg;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2001.02.03.20.21.09;	author he;	state dead;
branches;
next	;


desc
@@


1.6
log
@rename sparc64 "ramdisk" to "xminiroot" to avoid confusion about what it actually does.
@
text
@#	$NetBSD: Makefile,v 1.5 2000/11/01 07:58:01 garbled Exp $

TOP=		${.CURDIR}/..
MINIROOT=	${TOP}/../miniroot
HACKSRC=	${TOP}/../utils/libhack
SRCROOT=	${TOP}/../..
WARNS=1

.if ${MACHINE_ARCH} == "i386"
RAW_PART=	d
.else
RAW_PART=	c
.endif

# Need to add more cases
.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "m68k" || \
    ${MACHINE_ARCH} == "sparc64"
FS_END=		be
.else		# i386, pmax
FS_END=		le
.endif

AUXDEPENDS= 	dot.profile disktab.preinstall termcap.mini \
		dist/base_obsolete dist/comp_obsolete \
		dist/games_obsolete dist/man_obsolete dist/misc_obsolete \
		dist/secr_obsolete dist/xbase_obsolete dist/xserver_obsolete
AUXCLEAN=	list ${CBIN}.conf dot.profile

CBIN=		ramdiskbin

.if ${MACHINE_ARCH} == "sparc64"
CSIZE?=		10240
.endif

MOUNT_POINT?=	/mnt
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
VND?=		vnd0
VND_DEV=	/dev/${VND}c
VND_RDEV=	/dev/r${VND}c
VND_CDEV=	/dev/${VND}${RAW_PART}
VND_CRDEV=	/dev/r${VND}${RAW_PART}
IMAGE?=		ramdisk.fs
CSIZE?=         3312
MDEC=		${DESTDIR}/usr/mdec

LISTS=		list
CRUNCHCONF=	${CBIN}.conf
MTREE=		mtree.conf

CRUNCHGEN?=	crunchgen
DISKTYPE?=	miniroot

all: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} dot.profile
	dd if=/dev/zero of=${IMAGE} count=${CSIZE}
	vnconfig -v -c ${VND_CDEV} ${IMAGE}
	disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE}
	newfs -B ${FS_END} -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
	mount ${VND_DEV} ${MOUNT_POINT}
	mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
	    KERNOBJDIR=${KERNOBJDIR} \
	    TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
	@@echo ""
	@@df -i ${MOUNT_POINT}
	@@echo ""
	@@echo "installing new bootblocks"
	${MDEC}/binstall -m ${DESTDIR}/usr/mdec -u -v ffs ${MOUNT_POINT}
	umount ${MOUNT_POINT}
	vnconfig -u ${VND_CDEV}

unconfig:
	-umount -f ${MOUNT_POINT}
	-vnconfig -u ${VND_DEV}
	-/bin/rm -f ${IMAGE}

dot.profile: dot.profile.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
				${.ALLSRC} > ${.TARGET}

${LISTS}: ${LISTS}.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
			-DSRCROOT=${SRCROOT} ${.ALLSRC} > ${.TARGET}

${CBIN}.conf: ${CBIN}.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
				${.ALLSRC} > ${.TARGET}

${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
	${CRUNCHGEN} -D ${SRCROOT} -L ${DESTDIR}/usr/lib ${.ALLSRC}

${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
	${MAKE} -f ${CBIN}.mk all

# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o

# Use stubs to eliminate some large stuff from libc
.include "${HACKSRC}/Makefile.inc"

# turn off small gethostby* temporarily
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o

clean cleandir distclean:
	/bin/rm -f *.core ${AUXCLEAN} ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.cro *.c

.ifndef RELEASEDIR
release:
	@@echo setenv RELEASEDIR first
	@@false
.else
release: $(IMAGE)
	@@mkdir -p $(RELEASEDIR)/installation/ramdisk
	gzip -c -9 < $(.OBJDIR)/ramdisk.fs \
		> $(RELEASEDIR)/installation/ramdisk/ramdisk.fs.gz
.endif	# RELEASEDIR check

.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
@


1.5
log
@Change all ocurrences of "crunchgen" to ${CRUNCHGEN}
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2000/10/26 04:53:57 garbled Exp $
@


1.4
log
@Find a bunch of places where we call "make" and replace it with ${MAKE}
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2000/08/20 14:46:03 mrg Exp $
d50 1
d89 1
a89 1
	crunchgen -D ${SRCROOT} -L ${DESTDIR}/usr/lib ${.ALLSRC}
@


1.3
log
@add "make release" support
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2000/08/19 13:17:38 mrg Exp $
d91 1
a91 1
	make -f ${CBIN}.mk all
@


1.3.2.1
log
@file Makefile was added on branch netbsd-1-5 on 2000-08-26 01:07:06 +0000
@
text
@d1 119
@


1.3.2.2
log
@pull up from trunk.  approved by thorpej:
>first cut sysinst for sparc64.  seems to work OK.
@
text
@a0 119
#	$NetBSD: Makefile,v 1.3.2.1 2000/08/26 01:07:06 mrg Exp $

TOP=		${.CURDIR}/..
MINIROOT=	${TOP}/../miniroot
HACKSRC=	${TOP}/../utils/libhack
SRCROOT=	${TOP}/../..
WARNS=1

.if ${MACHINE_ARCH} == "i386"
RAW_PART=	d
.else
RAW_PART=	c
.endif

# Need to add more cases
.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "m68k" || \
    ${MACHINE_ARCH} == "sparc64"
FS_END=		be
.else		# i386, pmax
FS_END=		le
.endif

AUXDEPENDS= 	dot.profile disktab.preinstall termcap.mini \
		dist/base_obsolete dist/comp_obsolete \
		dist/games_obsolete dist/man_obsolete dist/misc_obsolete \
		dist/secr_obsolete dist/xbase_obsolete dist/xserver_obsolete
AUXCLEAN=	list ${CBIN}.conf dot.profile

CBIN=		ramdiskbin

.if ${MACHINE_ARCH} == "sparc64"
CSIZE?=		10240
.endif

MOUNT_POINT?=	/mnt
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
VND?=		vnd0
VND_DEV=	/dev/${VND}c
VND_RDEV=	/dev/r${VND}c
VND_CDEV=	/dev/${VND}${RAW_PART}
VND_CRDEV=	/dev/r${VND}${RAW_PART}
IMAGE?=		ramdisk.fs
CSIZE?=         3312
MDEC=		${DESTDIR}/usr/mdec

LISTS=		list
CRUNCHCONF=	${CBIN}.conf
MTREE=		mtree.conf

DISKTYPE?=	miniroot

all: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} dot.profile
	dd if=/dev/zero of=${IMAGE} count=${CSIZE}
	vnconfig -v -c ${VND_CDEV} ${IMAGE}
	disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE}
	newfs -B ${FS_END} -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
	mount ${VND_DEV} ${MOUNT_POINT}
	mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
	    KERNOBJDIR=${KERNOBJDIR} \
	    TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
	@@echo ""
	@@df -i ${MOUNT_POINT}
	@@echo ""
	@@echo "installing new bootblocks"
	${MDEC}/binstall -m ${DESTDIR}/usr/mdec -u -v ffs ${MOUNT_POINT}
	umount ${MOUNT_POINT}
	vnconfig -u ${VND_CDEV}

unconfig:
	-umount -f ${MOUNT_POINT}
	-vnconfig -u ${VND_DEV}
	-/bin/rm -f ${IMAGE}

dot.profile: dot.profile.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
				${.ALLSRC} > ${.TARGET}

${LISTS}: ${LISTS}.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
			-DSRCROOT=${SRCROOT} ${.ALLSRC} > ${.TARGET}

${CBIN}.conf: ${CBIN}.m4
	m4 -DMACHINE_ARCH=${MACHINE_ARCH} -DMACHINE=${MACHINE} \
				${.ALLSRC} > ${.TARGET}

${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
	crunchgen -D ${SRCROOT} -L ${DESTDIR}/usr/lib ${.ALLSRC}

${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
	make -f ${CBIN}.mk all

# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o

# Use stubs to eliminate some large stuff from libc
.include "${HACKSRC}/Makefile.inc"

# turn off small gethostby* temporarily
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o

clean cleandir distclean:
	/bin/rm -f *.core ${AUXCLEAN} ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.cro *.c

.ifndef RELEASEDIR
release:
	@@echo setenv RELEASEDIR first
	@@false
.else
release: $(IMAGE)
	@@mkdir -p $(RELEASEDIR)/installation/ramdisk
	gzip -c -9 < $(.OBJDIR)/ramdisk.fs \
		> $(RELEASEDIR)/installation/ramdisk/ramdisk.fs.gz
.endif	# RELEASEDIR check

.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
@


1.3.2.3
log
@Pull up file removal (requested by mrg):
  Rename sparc64 ``ramdisk'' to ``xminiroot'' to avoid confusion
  about what it actually does.
@
text
@d1 119
@


1.2
log
@correct ramdisk size.  sparc64 is big-endian.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2000/08/10 14:38:53 mrg Exp $
d104 11
@


1.1
log
@first cut sysinst installer.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2000/05/02 16:06:55 sjg Exp $
d16 2
a17 1
.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "m68k"
d31 4
d66 1
a66 1
	${MDEC}/binstall -u -v ffs ${MOUNT_POINT}
@
