Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src Apply patch (requested by toddpw):
details: https://anonhg.NetBSD.org/src/rev/d813ebffb5fe
branches: netbsd-1-4
changeset: 470448:d813ebffb5fe
user: he <he%NetBSD.org@localhost>
date: Wed Mar 01 00:22:41 2000 +0000
description:
Apply patch (requested by toddpw):
Fix build errors in distrib/sparc, support ``release'' target,
increase size of ramdisk while removing dependency on /etc/disktab,
and notifying kernel.
diffstat:
distrib/sparc/bootfs.sysinst/Makefile | 84 ++++++++++++++++++++++++
distrib/sparc/bootfs/Makefile | 15 +++-
distrib/sparc/ramdisk.sysinst/Makefile | 113 +++++++++++++++++++++++++++++++++
distrib/sparc/ramdisk/Makefile | 35 +++++++--
sys/arch/sparc/conf/INSTALL | 6 +-
5 files changed, 239 insertions(+), 14 deletions(-)
diffs (truncated from 319 to 300 lines):
diff -r f9fc9d983c87 -r d813ebffb5fe distrib/sparc/bootfs.sysinst/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/bootfs.sysinst/Makefile Wed Mar 01 00:22:41 2000 +0000
@@ -0,0 +1,84 @@
+# $NetBSD: Makefile,v 1.1.2.2 2000/03/01 00:22:41 he Exp $
+
+TOP= ${.CURDIR}/..
+MINIROOT= ${.CURDIR}/../../miniroot
+
+.include "${TOP}/Makefile.inc"
+
+KERN= ${TOP}/../../sys/arch/${MACHINE}/compile/INSTALL/netbsd
+
+MOUNT_POINT?= /mnt
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CDEV= /dev/${VND}${RAW_PART}
+VND_CRDEV= /dev/r${VND}${RAW_PART}
+FD?= fd0
+FD_RDEV= /dev/r${FD}a
+IMAGE?= syboot-${REV}.fs
+MDEC= ${DESTDIR}/usr/mdec
+
+LISTS= ${.CURDIR}/list
+RAMDISK!= cd ${TOP}/ramdisk.sysinst/; \
+ printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/syramdisk-${REV}.fs\n" |\
+ ${MAKE} -s -f-
+
+DISKTYPE= floppy
+
+# Some reasonable values for the -i parameter to newfs are:
+#
+# 6144 1147k, 189 inodes free
+# 16384 1159k, 93 inodes free
+# 204800 1167k, 29 inodes free
+INO_BYTES= 204800
+
+CLEANFILES+= netbsd.ram.gz netbsd.tmp
+
+all: netbsd.ram.gz
+ dd if=/dev/zero of=${IMAGE} bs=1440k count=1
+ vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
+ disklabel -rw ${VND_CDEV} ${DISKTYPE}
+ disklabel -W ${VND_CDEV}
+ newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+ TOPDIR=${TOP} CURDIR=${MINIROOT} OBJDIR=${.OBJDIR} \
+ TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${LISTS}
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ @echo "installing new bootblocks"
+ -rm -f ${MOUNT_POINT}/boot
+ /usr/mdec/binstall -v ffs ${MOUNT_POINT}
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND_CDEV}
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND_DEV}
+
+netbsd.ram.gz: ${KERN} ${RAMDISK}
+ cp ${KERN} netbsd.tmp
+ mdsetimage -v netbsd.tmp ${RAMDISK}
+ strip netbsd.tmp
+ gzip -9 netbsd.tmp
+ mv netbsd.tmp.gz ${.TARGET}
+
+clean cleandir distclean:
+ /bin/rm -f *.core ${IMAGE} ${CLEANFILES}
+
+depend install:
+
+real-floppy:
+ dd if=${IMAGE} of=${FD_RDEV} bs=32k
+
+.ifndef RELEASEDIR
+release:
+ @echo setenv RELEASEDIR first
+ @false
+.else
+release: $(IMAGE)
+ gzip -c -9 < $(.OBJDIR)/${IMAGE} \
+ > $(RELEASEDIR)/installation/bootfs/${IMAGE}.gz
+.endif # RELEASEDIR check
+
+.include <bsd.obj.mk>
diff -r f9fc9d983c87 -r d813ebffb5fe distrib/sparc/bootfs/Makefile
--- a/distrib/sparc/bootfs/Makefile Wed Mar 01 00:15:09 2000 +0000
+++ b/distrib/sparc/bootfs/Makefile Wed Mar 01 00:22:41 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10.2.2 2000/02/22 23:07:07 he Exp $
+# $NetBSD: Makefile,v 1.10.2.3 2000/03/01 00:23:07 he Exp $
TOP= ${.CURDIR}/..
MINIROOT= ${.CURDIR}/../../miniroot
@@ -59,7 +59,8 @@
netbsd.ram.gz: ${KERN} ${RAMDISK}
cp ${KERN} netbsd.tmp
mdsetimage -v netbsd.tmp ${RAMDISK}
- gzip netbsd.tmp
+ strip netbsd.tmp
+ gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
clean cleandir distclean:
@@ -70,4 +71,14 @@
real-floppy:
dd if=${IMAGE} of=${FD_RDEV} bs=32k
+.ifndef RELEASEDIR
+release:
+ @echo setenv RELEASEDIR first
+ @false
+.else
+release: $(IMAGE)
+ gzip -c -9 < $(.OBJDIR)/${IMAGE} \
+ > $(RELEASEDIR)/installation/bootfs/${IMAGE}.gz
+.endif # RELEASEDIR check
+
.include <bsd.obj.mk>
diff -r f9fc9d983c87 -r d813ebffb5fe distrib/sparc/ramdisk.sysinst/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/ramdisk.sysinst/Makefile Wed Mar 01 00:22:41 2000 +0000
@@ -0,0 +1,113 @@
+# $NetBSD: Makefile,v 1.1.2.2 2000/03/01 00:23:40 he Exp $
+
+TOP= ${.CURDIR}/..
+MINIROOT= ${TOP}/../miniroot
+
+.include "${TOP}/Makefile.inc"
+
+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"
+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
+
+MOUNT_POINT?= /mnt
+# DEV/RDEV file system device, CDEV/RDEV vnconfig device
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CDEV= /dev/${VND}${RAW_PART}
+VND_CRDEV= /dev/r${VND}${RAW_PART}
+IMAGE?= syramdisk-${REV}.fs
+CSIZE?= 2880
+MDEC= ${DESTDIR}/usr/mdec
+
+LISTS= list
+CRUNCHCONF= ${CBIN}.conf
+MTREE= mtree.conf
+
+DISKTYPE?= floppy3
+
+all: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} dot.profile
+ dd if=/dev/zero of=${IMAGE} count=${CSIZE}
+ vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
+ disklabel -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} \
+ TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ 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 *.c
+
+.ifndef RELEASEDIR
+release:
+ @echo setenv RELEASEDIR first
+ @false
+.else
+release: ${IMAGE}
+ gzip -c -9 < $(.OBJDIR)/${IMAGE} \
+ > $(RELEASEDIR)/installation/ramdisk/${IMAGE}.gz
+.endif # RELEASEDIR check
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
+.include <bsd.sys.mk>
diff -r f9fc9d983c87 -r d813ebffb5fe distrib/sparc/ramdisk/Makefile
--- a/distrib/sparc/ramdisk/Makefile Wed Mar 01 00:15:09 2000 +0000
+++ b/distrib/sparc/ramdisk/Makefile Wed Mar 01 00:22:41 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8.2.2 1999/07/01 19:29:55 perry Exp $
+# $NetBSD: Makefile,v 1.8.2.3 2000/03/01 00:24:02 he Exp $
TOP= ${.CURDIR}/..
MINIROOT= ${.CURDIR}/../../miniroot
@@ -20,17 +20,23 @@
LISTS= list
MTREE= mtree.conf
-SIZE= 1656k
+CYLS= 98
+SECS= 18
+TRKS= 2
+TOTALSECT != expr ${CYLS} '*' ${SECS} '*' ${TRKS}
DISKTYPE= instfs
-GEOM= 512/18/2/92
-INO_BYTES= 4096
+DISKTAB= ./instfs.disktab
+GEOM= 512/${SECS}/${TRKS}/${CYLS}
+INO_BYTES= 6144
+
all: ${CBIN}
- dd if=/dev/zero of=${IMAGE} bs=${SIZE} count=1
- vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
- disklabel -rw ${VND_CDEV} ${DISKTYPE}
+ dd if=/dev/zero of=${IMAGE} bs=512 count=${TOTALSECT}
+ vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM}
+ echo "${DISKTYPE}:ty=floppy:se#512:nt#${TRKS}:rm#300:ns#${SECS}:nc#${CYLS}:pa#${TOTALSECT}:oa#0:ba#4096:fa#512:ta=4.2BSD:pc#${TOTALSECT}:oc#0:" > ${DISKTAB}
+ disklabel -rw -f ${DISKTAB} ${VND_CDEV} ${DISKTYPE}
disklabel -W ${VND_CDEV}
- newfs -B be -m 0 -o space -i ${INO_BYTES} -c 92 ${VND_RDEV}
+ newfs -B be -m 0 -o space -i ${INO_BYTES} -c ${CYLS} ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${MINIROOT} REALCURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
@@ -64,7 +70,18 @@
.include "${HACKSRC}/Makefile.inc"
clean cleandir distclean:
- /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
+ /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
+ ${CBIN}.conf *.o *.lo *.c ${DISKTAB}
+
+.ifndef RELEASEDIR
+release:
+ @echo setenv RELEASEDIR first
+ @false
+.else
+release: ${IMAGE}
+ gzip -c -9 < $(.OBJDIR)/${IMAGE} \
+ > $(RELEASEDIR)/installation/ramdisk/${IMAGE}.gz
+.endif # RELEASEDIR check
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
diff -r f9fc9d983c87 -r d813ebffb5fe sys/arch/sparc/conf/INSTALL
Home |
Main Index |
Thread Index |
Old Index