head	1.3;
access;
symbols
	perseant-exfatfs-base-20250801:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.48
	perseant-exfatfs-base:1.3
	cjep_sun2x:1.3.0.46
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	cjep_staticlib_x:1.3.0.44
	cjep_staticlib_x-base:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	phil-wifi-20200406:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	pgoyette-compat-0728:1.3
	pgoyette-compat-0625:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	pgoyette-compat:1.3.0.42
	pgoyette-compat-base:1.3
	perseant-stdc-iso10646:1.3.0.40
	perseant-stdc-iso10646-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.38
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	bouyer-socketcan:1.3.0.36
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	pgoyette-localcount-20161104:1.3
	localcount-20160914:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.34
	pgoyette-localcount-base:1.3
	netbsd-5-2-3-RELEASE:1.3
	netbsd-5-1-5-RELEASE:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.3
	tls-earlyentropy:1.3.0.30
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-5-2-2-RELEASE:1.3
	netbsd-5-1-4-RELEASE:1.3
	netbsd-5-2-1-RELEASE:1.3
	netbsd-5-1-3-RELEASE:1.3
	agc-symver:1.3.0.32
	agc-symver-base:1.3
	tls-maxphys-base:1.3
	yamt-pagecache-base8:1.3
	netbsd-5-2:1.3.0.28
	yamt-pagecache-base7:1.3
	netbsd-5-2-RELEASE:1.3
	netbsd-5-2-RC1:1.3
	yamt-pagecache-base6:1.3
	yamt-pagecache-base5:1.3
	yamt-pagecache-base4:1.3
	netbsd-5-1-2-RELEASE:1.3
	netbsd-5-1-1-RELEASE:1.3
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.26
	yamt-pagecache-base:1.3
	bouyer-quota2-nbase:1.3
	bouyer-quota2:1.3.0.24
	bouyer-quota2-base:1.3
	matt-nb5-pq3:1.3.0.22
	matt-nb5-pq3-base:1.3
	netbsd-5-1:1.3.0.20
	netbsd-5-1-RELEASE:1.3
	netbsd-5-1-RC4:1.3
	netbsd-5-1-RC3:1.3
	netbsd-5-1-RC2:1.3
	netbsd-5-1-RC1:1.3
	netbsd-5-0-2-RELEASE:1.3
	netbsd-5-0-1-RELEASE:1.3
	jym-xensuspend-nbase:1.3
	netbsd-5-0:1.3.0.18
	netbsd-5-0-RELEASE:1.3
	netbsd-5-0-RC4:1.3
	netbsd-5-0-RC3:1.3
	netbsd-5-0-RC2:1.3
	jym-xensuspend:1.3.0.16
	jym-xensuspend-base:1.3
	netbsd-5-0-RC1:1.3
	netbsd-5:1.3.0.14
	netbsd-5-base:1.3
	yamt-pf42-base4:1.3
	yamt-pf42-base3:1.3
	hpcarm-cleanup-nbase:1.3
	yamt-pf42-base2:1.3
	yamt-pf42:1.3.0.12
	yamt-pf42-base:1.3
	mjf-devfs2:1.3.0.10
	mjf-devfs2-base:1.3
	keiichi-mipv6:1.3.0.8
	keiichi-mipv6-base:1.3
	mjf-devfs:1.3.0.6
	mjf-devfs-base:1.3
	cube-autoconf:1.3.0.4
	cube-autoconf-base:1.3
	hpcarm-cleanup:1.3.0.2
	hpcarm-cleanup-base:1.3;
locks; strict;
comment	@# @;


1.3
date	2002.05.13.01.04.20;	author lukem;	state dead;
branches;
next	1.2;

1.2
date	2002.05.07.14.08.32;	author isaki;	state Exp;
branches;
next	1.1;

1.1
date	2002.05.07.13.55.41;	author isaki;	state Exp;
branches;
next	;


desc
@@


1.3
log
@- reorganise to be more consistent with other distrib/* directories
  (no need for a "common" subdir which contains stuff only really
  referenced by one other directory)
- use Makefile.tarfloppy instead of local code to build floppies
- use .WAIT in the top-level Makefile appropriately
- install inst.fs directly from ramdisk/Makefile rather than providing
  separate inst/Makefile
@
text
@#	$NetBSD: Makefile.bootfloppy,v 1.2 2002/05/07 14:08:32 isaki Exp $

.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"

.include <bsd.kernobj.mk>

# TOP is assumed to be defined by Makefile including this one.

COMMONDIR=	${TOP}/common


IMAGE?=		xxx-${DISTRIBREV}.fs
.ifndef INSTKERNEL
INSTKERNNAME?=	netbsd.xxx.gz
INSTKERNODIR!=	cd ${INSTKERNDIR} ; ${MAKE} print-objdir
INSTKERNEL=	${INSTKERNODIR}/${INSTKERNNAME}
.endif
BOOTNAME?=	USTAR.volsize.4540
BASENAME?=	boot
IMAGE1?=	${BASENAME}1.fs

MDEC=		${DESTDIR}/usr/mdec
FSTMP=		ustar.fs

DISKSIZE?=	2400
BLOCK8K?=	149


CLEANFILES+=	netbsd ${BOOTNAME} ${FSTMP}

realall: netbsd ${BOOTNAME}
	tar cvf ${FSTMP} ${BOOTNAME} netbsd
	@@echo
	@@echo Making disk number one
	-mv -f ${IMAGE1} ${IMAGE1}.tmp
	cat ${MDEC}/fdboot_ustar /dev/zero | dd of=${IMAGE1}.tmp bs=1k count=8
	dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${IMAGE1}.tmp
	@@ls -l ${FSTMP} | (read mode links uid gid size junk; \
		dksize=$$((${DISKSIZE} * 512 - 8 * 1024)); \
		disks=$$(($$size / $$dksize + 1)); \
		if test $$size -gt $$dksize; then \
			d=2; \
			while test $$d -le $$disks; do \
				echo; \
				echo Making disk number $$d.; \
				IMAGE=${BASENAME}$${d}.fs; \
				echo USTARFS $$d > $${IMAGE}; \
				skip=$$((($$d - 1) * ${BLOCK8K})); \
				if test $$d -eq $$disks; then \
					dd bs=8k seek=1 skip=$${skip} \
						conv=sync \
						if=${FSTMP} of=$${IMAGE}; \
				else \
					dd bs=8k seek=1 skip=$${skip} \
						conv=sync count=${BLOCK8K} \
						if=${FSTMP} of=$${IMAGE}; \
				fi; \
				d=$$(($$d + 1)); \
			done; \
		else \
			dd seek=$$(($${size} / 512 + 15)) count=1 \
				if=/dev/zero of=${IMAGE1}; \
		fi; \
		echo; \
                bytes=$$(($$dksize * $$disks - $$size));    \
                echo "There are $$bytes ($$(($$bytes / 1024))K) bytes free\
                        on disk $$disks."; \
	)
	mv -f ${IMAGE1}.tmp ${IMAGE1}

${BOOTNAME}:
	cp -fp ${MDEC}/boot ${BOOTNAME}

netbsd:
	cp -fp ${INSTKERNEL} netbsd

release: check_RELEASEDIR
	${RELEASE_INSTALL} ${BASENAME}*.fs ${RELEASEDIR}/installation/floppy
	# XXX: do we want this?
	for f in ${RELEASEDIR}/installation/floppy/${BASENAME}*.fs; do \
		gzip -9v <$$f >$$f.gz; \
	done

CLEANFILES+=	${IMAGE1} ${IMAGE1}.tmp ${BASENAME}?.fs

.include <bsd.prog.mk>
@


1.2
log
@Rewrite with MI distrib. based on Minoura-san's work.
it makes x68k port cross buildable.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootfloppy,v 1.1 2002/05/07 13:55:41 isaki Exp $
@


1.1
log
@Move common files into floppies/common directory.
 bootfloppy-common/Makefile.inc    -> common/Makefile.bootfloppy
 instkernel-common/Makefile.inc    -> common/Makefile.instkernel
 ramdisk-common/Makefile.inc       -> common/Makefile.ramdisk
 ramdisk-common/*                  -> common/*
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.22 2002/05/02 18:03:02 lukem Exp $
d10 1
a10 1
COMMONDIR=	${TOP}/bootfloppy-common
a22 3
VND?=		vnd0
VND_DEV=	/dev/${VND}a
VND_RDEV=	/dev/r${VND}a
a25 1
DISKTYPE?=	floppy5
d37 2
a38 7
	dd if=/dev/zero of=${IMAGE1}.tmp count=${DISKSIZE}
	vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE1}.tmp
	disklabel -rw ${VND} ${DISKTYPE}
	dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${VND_RDEV}
	@@echo "installing new bootblocks"
	${MDEC}/installboot.new -v ${MDEC}/fdboot_ustar ${VND_RDEV}
	vnconfig -u ${VND}
a71 3
unconfig:
	-vnconfig -u ${VND}

d82 1
a82 1
		gzip <$$f >$$f.gz; \
d85 1
a85 1
CLEANFILES+=	${IMAGE1}.tmp ${BASENAME}?.fs
@

