Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/sparc Add sysinst setup for sparc, does not affect e...



details:   https://anonhg.NetBSD.org/src/rev/5dbcd26dac9f
branches:  trunk
changeset: 472467:5dbcd26dac9f
user:      abs <abs%NetBSD.org@localhost>
date:      Fri Apr 30 05:09:43 1999 +0000

description:
Add sysinst setup for sparc, does not affect existing script based install.
ramdisk.sysinst should work unchanged for i386 also. Would be good to merge
after 1.4.

diffstat:

 distrib/sparc/Makefile                              |    4 +-
 distrib/sparc/bootfs.sysinst/Makefile               |   73 ++++
 distrib/sparc/bootfs.sysinst/list                   |    4 +
 distrib/sparc/list2sh.awk                           |   55 +++
 distrib/sparc/ramdisk.sysinst/Makefile              |  100 ++++++
 distrib/sparc/ramdisk.sysinst/disktab.preinstall    |   31 +
 distrib/sparc/ramdisk.sysinst/dist/base_obsolete    |  137 ++++++++
 distrib/sparc/ramdisk.sysinst/dist/comp_obsolete    |  319 ++++++++++++++++++++
 distrib/sparc/ramdisk.sysinst/dist/games_obsolete   |    8 +
 distrib/sparc/ramdisk.sysinst/dist/man_obsolete     |   46 ++
 distrib/sparc/ramdisk.sysinst/dist/misc_obsolete    |   16 +
 distrib/sparc/ramdisk.sysinst/dist/secr_obsolete    |   23 +
 distrib/sparc/ramdisk.sysinst/dist/xbase_obsolete   |    2 +
 distrib/sparc/ramdisk.sysinst/dist/xserver_obsolete |    2 +
 distrib/sparc/ramdisk.sysinst/dot.profile.m4        |   75 ++++
 distrib/sparc/ramdisk.sysinst/list.m4               |  115 +++++++
 distrib/sparc/ramdisk.sysinst/mtree.conf            |   82 +++++
 distrib/sparc/ramdisk.sysinst/ramdiskbin.m4         |   46 ++
 distrib/sparc/ramdisk.sysinst/termcap.mini          |  202 ++++++++++++
 distrib/sparc/runlist.sh                            |   13 +
 20 files changed, 1351 insertions(+), 2 deletions(-)

diffs (truncated from 1436 to 300 lines):

diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/Makefile
--- a/distrib/sparc/Makefile    Fri Apr 30 04:46:50 1999 +0000
+++ b/distrib/sparc/Makefile    Fri Apr 30 05:09:43 1999 +0000
@@ -1,5 +1,5 @@
-#      $NetBSD: Makefile,v 1.2 1998/06/22 02:20:09 mrg Exp $
+#      $NetBSD: Makefile,v 1.3 1999/04/30 05:09:43 abs Exp $
 
-SUBDIR=        ramdisk bootfs
+SUBDIR=        ramdisk bootfs ramdisk.sysinst bootfs.sysinst
 
 .include <bsd.subdir.mk>
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/bootfs.sysinst/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/bootfs.sysinst/Makefile     Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,73 @@
+#      $NetBSD: Makefile,v 1.1 1999/04/30 05:11:46 abs 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}
+       gzip 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
+
+.include <bsd.obj.mk>
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/bootfs.sysinst/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/bootfs.sysinst/list Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,4 @@
+#      $NetBSD: list,v 1.1 1999/04/30 05:11:47 abs Exp $
+
+# copy the kernel
+COPY   ${OBJDIR}/netbsd.ram.gz netbsd.gz
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/list2sh.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/list2sh.awk Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,55 @@
+#      $NetBSD: list2sh.awk,v 1.3 1999/04/30 05:09:43 abs Exp $
+
+BEGIN {
+       printf("cd ${CURDIR}\n");
+       printf("\n");
+}
+/^$/ || /^#/ {
+       print $0;
+       next;
+}
+$1 == "COPY" {
+       printf("echo '%s'\n", $0);
+       printf("rm -f ${TARGDIR}/%s\n", $3);
+       printf("cp %s ${TARGDIR}/%s\n", $2, $3);
+       next;
+}
+$1 == "LINK" {
+       printf("echo '%s'\n", $0);
+       printf("rm -f ${TARGDIR}/%s\n", $3);
+       printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
+       next;
+}
+$1 == "SYMLINK" {
+       printf("echo '%s'\n", $0);
+       printf("rm -f ${TARGDIR}/%s\n", $3);
+       printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
+       next;
+}
+$1 == "COPYDIR" {
+       printf("echo '%s'\n", $0);
+       printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
+           $3);
+       printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
+           $3);
+       next;
+}
+$1 == "SPECIAL" {
+       printf("echo '%s'\n", $0);
+       printf("(cd ${TARGDIR};");
+       for (i = 2; i <= NF; i++)
+               printf(" %s", $i);
+       printf(")\n");
+       next;
+}
+{
+       printf("echo '%s'\n", $0);
+       printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
+       printf("exit 1\n");
+       exit 1;
+}
+END {
+       printf("\n");
+       printf("exit 0\n");
+       exit 0;
+}
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/ramdisk.sysinst/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/ramdisk.sysinst/Makefile    Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,100 @@
+#      $NetBSD: Makefile,v 1.1 1999/04/30 05:09:44 abs 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"
+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
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
+.include <bsd.sys.mk>
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/ramdisk.sysinst/disktab.preinstall
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/ramdisk.sysinst/disktab.preinstall  Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,31 @@
+#      $NetBSD: disktab.preinstall,v 1.1 1999/04/30 05:09:44 abs Exp $
+#
+# Disk geometry and partition layout tables. 
+# Key:
+#      dt      controller type
+#      ty      type of disk (fixed, removeable, simulated)
+#      d[0-4]  drive-type-dependent parameters
+#      ns      #sectors/track
+#      nt      #tracks/cylinder
+#      nc      #cylinders/disk
+#      sc      #sectors/cylinder, nc*nt default
+#      su      #sectors/unit, sc*nc default
+#      se      sector size, DEV_BSIZE default
+#      rm      rpm, 3600 default
+#      sf      supports bad144-style bad sector forwarding
+#      sk      sector skew per track, default 0
+#      cs      sector skew per cylinder, default 0
+#      hs      headswitch time, default 0
+#      ts      one-cylinder seek time, default 0
+#      il      sector interleave (n:1), 1 default
+#      bs      boot block size, default BBSIZE
+#      sb      superblock size, default SBSIZE
+#      o[a-h]  partition offsets in sectors
+#      p[a-h]  partition sizes in sectors
+#      b[a-h]  partition block sizes in bytes
+#      f[a-h]  partition fragment sizes in bytes
+#      t[a-h]  partition types (filesystem, swap, etc)
+#
+# All partition sizes reserve space for bad sector tables.
+# (5 cylinders needed for maintenance + replacement sectors)
+#
diff -r 7ff4fdb4418f -r 5dbcd26dac9f distrib/sparc/ramdisk.sysinst/dist/base_obsolete
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sparc/ramdisk.sysinst/dist/base_obsolete  Fri Apr 30 05:09:43 1999 +0000
@@ -0,0 +1,137 @@
+$NetBSD: base_obsolete,v 1.1 1999/04/30 05:09:45 abs Exp $
+/dev/vga



Home | Main Index | Thread Index | Old Index