- 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
This commit is contained in:
lukem 2002-05-13 01:04:18 +00:00
parent 075e474458
commit 18da51172f
19 changed files with 132 additions and 310 deletions

View File

@ -1,9 +1,7 @@
# $NetBSD: Makefile,v 1.9 2002/05/07 14:08:30 isaki Exp $
# $NetBSD: Makefile,v 1.10 2002/05/13 01:04:18 lukem Exp $
SUBDIR= ramdisk.sysinst instkernel.sysinst bootfloppy.sysinst
SUBDIR+= bootfloppy.generic inst
.PHONY: release
SUBDIR= bootfloppy.generic ramdisk .WAIT instkernel .WAIT
SUBDIR+= bootfloppy.sysinst
TARGETS+= release

View File

@ -1,9 +1,26 @@
# $NetBSD: Makefile,v 1.3 2002/05/07 14:08:31 isaki Exp $
# $NetBSD: Makefile,v 1.4 2002/05/13 01:04:19 lukem Exp $
TOP= ${.CURDIR}/..
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
BASENAME= kern
IMAGE1= ${BASENAME}.fs
INSTKERNEL= ${KERNOBJDIR}/GENERIC/netbsd
.include <bsd.kernobj.mk>
.include "${TOP}/common/Makefile.bootfloppy"
FLOPPYBASE= kern
FLOPPYSIZE= 2400
FLOPPYMETAFILE!=printf "USTAR.volsize.%o" ${FLOPPYSIZE}
FLOPPYFILES= boot ${FLOPPYMETAFILE} netbsd
FLOPPYSUFFIX= .fs
FLOPPY_RELEASEDIR= installation/floppy
MDEC= ${DESTDIR}/usr/mdec
KERNOBJ!= cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
FLOPPY_NETBSD= ${KERNOBJDIR}/GENERIC/netbsd
FLOPPY_BOOT= ${MDEC}/boot
# XXXDISTRIB: use MI installboot
FLOPPYINSTBOOT=\
"dd if=${MDEC}/fdboot_ustar of=@IMAGE@ bs=8k count=1 conv=sync,notrunc"
.include "${DISTRIBDIR}/common/Makefile.tarfloppy"
.include <bsd.prog.mk>

View File

@ -1,10 +1,26 @@
# $NetBSD: Makefile,v 1.8 2002/05/07 14:08:32 isaki Exp $
# $NetBSD: Makefile,v 1.9 2002/05/13 01:04:19 lukem Exp $
TOP= ${.CURDIR}/..
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
BASENAME= sysinst
IMAGE1= ${BASENAME}.fs
INSTKERNDIR= ${TOP}/instkernel.sysinst
INSTKERNNAME= netbsd.INSTALL.gz
.include <bsd.kernobj.mk>
.include "${TOP}/common/Makefile.bootfloppy"
FLOPPYBASE= sysinst
FLOPPYSIZE= 2400
FLOPPYMETAFILE!=printf "USTAR.volsize.%o" ${FLOPPYSIZE}
FLOPPYFILES= boot ${FLOPPYMETAFILE} netbsd
FLOPPYSUFFIX= .fs
FLOPPY_RELEASEDIR= installation/floppy
MDEC= ${DESTDIR}/usr/mdec
KERNOBJ!= cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
FLOPPY_NETBSD= ${KERNOBJ}/netbsd.INSTALL.gz
FLOPPY_BOOT= ${MDEC}/boot
# XXXDISTRIB: use MI installboot
FLOPPYINSTBOOT=\
"dd if=${MDEC}/fdboot_ustar of=@IMAGE@ bs=8k count=1 conv=sync,notrunc"
.include "${DISTRIBDIR}/common/Makefile.tarfloppy"
.include <bsd.prog.mk>

View File

@ -1,87 +0,0 @@
# $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>

View File

@ -1,42 +0,0 @@
# $NetBSD: Makefile.instkernel,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>
RAMDISKDIR?= ${.CURDIR}/../ramdisk/
KERN?= netbsd-xxx
KERNNAME?= netbsd.xxx
GZNAME?= ${KERNNAME}.gz
MDSETIMAGE?= mdsetimage
.if ${RAMDISKDIR} != ""
RAMDISK !=cd ${RAMDISKDIR}; ${MAKE} echoimage
.endif
CLEANFILES+= ${KERNNAME} ${GZNAME} netbsd.tmp*
realall: ${GZNAME}
.if defined(RAMDISK)
${GZNAME}: ${KERN} ${RAMDISK}
-/bin/rm -f netbsd.tmp*
cp ${KERN} netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
mv -f netbsd.tmp ${KERNNAME}
.else
${KERNNAME}: ${KERN}
cp ${KERN} ${.TARGET}
.endif
gzip -v9 ${KERNNAME}
depend:
release: check_RELEASEDIR .WAIT ${GZNAME}
.ifndef NOKERNCOPY
${RELEASE_INSTALL} ${GZNAME} ${RELEASEDIR}/binary/kernel
.endif
.include <bsd.prog.mk>

View File

@ -1,30 +0,0 @@
# $NetBSD: Makefile.ramdisk,v 1.2 2002/05/07 14:08:32 isaki Exp $
WARNS=1
CRUNCHBIN?= ramdiskbin
IMAGEENDIAN= be
IMAGEDEPENDS+= ${CRUNCHBIN} ${AUXDEPENDS}
POPULATEENV+= COMMONDIR=${COMMONDIR:Q}
realall: ${IMAGE}
# Use size-reduced libhack.
${CRUNCHBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC= ${DISTRIBDIR}/utils/libhack
.include "${HACKSRC}/Makefile.inc"
#${CBIN}: libhack.o
# Used in building bootfloppy
echoimage:
@echo ${.OBJDIR}/${IMAGE}
.include "${DISTRIBDIR}/common/Makefile.crunch"
.include "${DISTRIBDIR}/common/Makefile.makedev"
.include "${DISTRIBDIR}/common/Makefile.image"
release:
.include <bsd.prog.mk>

View File

@ -1,30 +0,0 @@
#! /bin/sh
#
# size-reduced installboot for the install floppy.
# supports only SCSI disks.
#
# requires /bin/sh /bin/dd (x_dd) /bin/mkdir /bin/rm /bin/test
# /sbin/disklabel
#
# $NetBSD: installboot.sh,v 1.1 2002/05/07 13:55:43 isaki Exp $
#
#
# originally from:
# do like as disklabel -B
#
# usage: installboot <boot_file> <boot_device(raw)>
#
# requires /bin/sh /bin/dd /bin/mkdir /bin/rm /bin/test
# /sbin/disklabel /usr/bin/sed /usr/bin/od
#
# Public domain --written by Yasha (ITOH Yasufumi)
#
# NetBSD: installboot.sh,v 1.1 1998/09/01 20:02:34 itohy Exp
PATH=/bin:/sbin:/usr/bin
echo "$0: THIS VERSION OF $0 DOES NO ERROR CHECK!"
echo "$0: Sleeping for 5 seconds; press ^C to abort."
echo "===> cat $1 /dev/zero | dd ibs=1 count=8192 obs=512 of=$2"
sleep 5
cat $1 /dev/zero | dd ibs=1 count=8192 obs=512 of=$2

View File

@ -1,22 +0,0 @@
# $NetBSD: Makefile,v 1.12 2002/05/07 14:08:33 isaki Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
realall: inst.fs
RAMDISKDIR!= cd ${.CURDIR}/../ramdisk.sysinst && ${MAKE} print-objdir
inst.fs: ${RAMDISKDIR}/ramdisk.fs
cp ${RAMDISKDIR}/ramdisk.fs inst.fs
CLEANFILES+= inst.fs inst.fs.gz
${RAMDISKDIR}/ramdisk.fs:
cd ${.CURDIR}/../ramdisk.sysinst ; ${MAKE}
release: check_RELEASEDIR .WAIT inst.fs
${RELEASE_INSTALL} inst.fs ${RELEASEDIR}/installation/floppy
gzip -9v <${RELEASEDIR}/installation/floppy/inst.fs >${RELEASEDIR}/installation/floppy/inst.fs.gz
.include <bsd.prog.mk>

View File

@ -1,13 +0,0 @@
# $NetBSD: Makefile,v 1.2 2002/05/07 14:08:33 isaki Exp $
TOP= ${.CURDIR}/..
.include <bsd.kernobj.mk>
.include <bsd.own.mk>
KERNDIR= ${KERNOBJDIR}/INSTALL
KERN= ${KERNDIR}/netbsd
KERNNAME= netbsd.INSTALL
RAMDISKDIR= ${TOP}/ramdisk.sysinst/
.include "${TOP}/common/Makefile.instkernel"

View File

@ -0,0 +1,16 @@
# $NetBSD: Makefile,v 1.1 2002/05/13 01:04:22 lukem Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
.include <bsd.kernobj.mk>
RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
RAMDISK= ${RAMDISKDIR}/inst.fs
MDSETTARGETS= INSTALL ${RAMDISK} -
MDSET_RELEASEDIR= binary/kernel
.include "${DISTRIBDIR}/common/Makefile.mdset"
.include <bsd.prog.mk>

View File

@ -1,33 +0,0 @@
# $NetBSD: Makefile,v 1.16 2002/05/07 14:08:34 isaki Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
TOP= ${.CURDIR}/..
COMMONDIR= ${TOP}/common
IMAGE= ramdisk.fs
IMAGESIZE= 1228800
CRUNCHBIN= ramdiskbin
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common ${.CURDIR}/mtree.conf
MAKEDEVTARGETS= std md0 fd0 sd0 sd1 sd2 sd3 sd4 sd5 cd0 ttye0 tty00 opty
AUXDEPENDS= \
dot.profile \
dot.hdprofile \
services \
${NETBSDSRCDIR}/etc/master.passwd \
${NETBSDSRCDIR}/etc/group \
${NETBSDSRCDIR}/etc/protocols \
${NETBSDSRCDIR}/etc/netconfig \
${DESTDIR}/usr/mdec/sdboot_ufs \
${DESTDIR}/usr/mdec/boot \
${DESTDIR}/usr/mdec/mboot \
${COMMONDIR}/termcap.vt \
${COMMONDIR}/disktab.preinstall
includes:
.include "${COMMONDIR}/Makefile.ramdisk"

View File

@ -1,2 +0,0 @@
# $NetBSD: mtree.conf,v 1.3 2002/05/07 14:08:34 isaki Exp $

View File

@ -0,0 +1,38 @@
# $NetBSD: Makefile,v 1.21 2002/05/13 01:04:23 lukem Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
IMAGE= inst.fs
IMAGESIZE= 1200k
IMAGE_RELEASEDIR= installation/floppy
MAKEFS_FLAGS= -f 10
WARNS= 1
DBG= -Os
CRUNCHBIN= ramdiskbin
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
MAKEDEVTARGETS= std md0 fd0 sd0 sd1 sd2 sd3 sd4 sd5 cd0 ttye0 tty00 opty
IMAGEDEPENDS+= ${CRUNCHBIN} \
disktab.preinstall dot.profile dot.hdprofile \
services termcap.vt \
${DESTDIR}/usr/mdec/boot ${DESTDIR}/usr/mdec/mboot \
${DESTDIR}/usr/mdec/sdboot_ufs \
${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
${NETBSDSRCDIR}/etc/netconfig ${NETBSDSRCDIR}/etc/protocols
# Use stubs to eliminate some large stuff from libc
HACKSRC= ${DISTRIBDIR}/utils/libhack
.include "${HACKSRC}/Makefile.inc"
${CRUNCHBIN}: libhack.o
.include "${DISTRIBDIR}/common/Makefile.crunch"
.include "${DISTRIBDIR}/common/Makefile.makedev"
.include "${DISTRIBDIR}/common/Makefile.image"
release::
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: disktab.preinstall,v 1.1 2002/05/07 13:55:42 isaki Exp $
# $NetBSD: disktab.preinstall,v 1.3 2002/05/13 01:04:23 lukem Exp $
#
# Disk geometry and partition layout tables.
# Key:

View File

@ -1,4 +1,4 @@
# $NetBSD: dot.hdprofile,v 1.3 2000/06/14 17:24:51 cgd Exp $
# $NetBSD: dot.hdprofile,v 1.10 2002/05/13 01:04:23 lukem Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.

View File

@ -1,4 +1,4 @@
# $NetBSD: dot.profile,v 1.8 2001/04/01 13:09:37 minoura Exp $
# $NetBSD: dot.profile,v 1.13 2002/05/13 01:04:23 lukem Exp $
#
# Copyright (c) 1997 Perry E. Metzger
# Copyright (c) 1994 Christopher G. Demetriou

View File

@ -1,4 +1,4 @@
# $NetBSD: list,v 1.11 2002/05/07 14:08:34 isaki Exp $
# $NetBSD: list,v 1.15 2002/05/13 01:04:23 lukem Exp $
SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/x68k/stand
@ -14,14 +14,13 @@ PROG bin/ls
PROG bin/mkdir
#PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rm
PROG bin/sh
#PROG bin/sleep
PROG bin/stty
PROG bin/sync
PROG bin/test bin/[
PROG sbin/disklabel
PROG sbin/dmesg
@ -30,11 +29,11 @@ PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mknod
PROG sbin/mount sbin/mount_cd9660 sbin/mount_ffs sbin/mount_kernfs sbin/mount_msdos sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/mount sbin/mount_cd9660 sbin/mount_ffs sbin/mount_kernfs sbin/mount_msdos sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/ping6
PROG sbin/reboot sbin/halt
PROG sbin/reboot sbin/halt
PROG sbin/route
PROG sbin/rtsol
PROG sbin/shutdown
@ -43,39 +42,36 @@ PROG sbin/swapctl
PROG sbin/umount
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more usr/bin/less
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more usr/bin/less
PROG usr/mdec/newdisk
PROG usr/mdec/installboot usr/mdec/installboot.new
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chown usr/bin/chgrp
#PROG usr/sbin/chroot
PROG usr/sbin/memswitch
ARGVLN sh -sh
SPECIAL init srcdir distrib/utils/init_s
SPECIAL dd srcdir distrib/utils/x_dd
SPECIAL dmesg srcdir distrib/utils/x_dmesg
#SPECIAL ed srcdir distrib/utils/x_ed
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL gzip srcdir distrib/utils/x_gzip
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL ping6 srcdir distrib/utils/x_ping6
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL installboot srcdir sys/arch/x68k/stand/installboot
SPECIAL dmesg srcdir distrib/utils/x_dmesg
#SPECIAL ed srcdir distrib/utils/x_ed
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL gzip srcdir distrib/utils/x_gzip
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL ping6 srcdir distrib/utils/x_ping6
SPECIAL route srcdir distrib/utils/x_route
SPECIAL installboot srcdir sys/arch/x68k/stand/installboot
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lz -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm
LIBS libhack.o -lz -lutil -lcurses -ltermcap -lcrypt -ll -lm
# various files that we need in /etc for the install
COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd
COPY ${NETBSDSRCDIR}/etc/group etc/group
COPY ${NETBSDSRCDIR}/etc/protocols etc/protocols
COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig
COPY ${CURDIR}/services etc/services
COPY ${NETBSDSRCDIR}/etc/protocols etc/protocols
COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig
COPY ${CURDIR}/services etc/services
# we need the boot blocks in /usr/mdec
COPY ${DESTDIR}/usr/mdec/xxboot_ufs usr/mdec/xxboot_ufs
@ -85,10 +81,10 @@ COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot
COPY ${DESTDIR}/usr/mdec/mboot usr/mdec/mboot
# and the common installation tools
COPY ${CURDIR}/../common/termcap.vt /usr/share/misc/termcap
COPY ${CURDIR}/termcap.vt usr/share/misc/termcap
# the disktab explanation file
COPY ${CURDIR}/../common/disktab.preinstall etc/disktab.preinstall
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
# and the installation tools
COPY ${CURDIR}/dot.profile .profile

View File

@ -1,6 +1,6 @@
#
# etc/services (ramdisk version)
# $NetBSD: services,v 1.1 2002/05/07 14:08:35 isaki Exp $
# $NetBSD: services,v 1.1 2002/05/13 01:04:23 lukem Exp $
#
tcpmux 1/tcp
echo 7/tcp

View File

@ -1,5 +1,5 @@
#
# $NetBSD: termcap.vt,v 1.1 2002/05/07 13:55:43 isaki Exp $
# $NetBSD: termcap.vt,v 1.3 2002/05/13 01:04:24 lukem Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.