Source-Changes-HG archive

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

[src/trunk]: src/distrib/sandpoint First cut at ramdisk image for sandpoint i...



details:   https://anonhg.NetBSD.org/src/rev/c13ac94dd338
branches:  trunk
changeset: 518866:c13ac94dd338
user:      briggs <briggs%NetBSD.org@localhost>
date:      Fri Dec 07 05:04:57 2001 +0000

description:
First cut at ramdisk image for sandpoint installation kernel.

diffstat:

 distrib/sandpoint/Makefile                            |   7 +
 distrib/sandpoint/floppies/Makefile                   |   7 +
 distrib/sandpoint/floppies/Makefile.inc               |   8 +
 distrib/sandpoint/floppies/list2sh.awk                |  55 +++++++++++
 distrib/sandpoint/floppies/md-kernel/Makefile         |  36 +++++++
 distrib/sandpoint/floppies/ramdisk/Makefile           |  71 ++++++++++++++
 distrib/sandpoint/floppies/ramdisk/disktab            |  36 +++++++
 distrib/sandpoint/floppies/ramdisk/disktab.preinstall |  29 ++++++
 distrib/sandpoint/floppies/ramdisk/dot.profile        |  91 +++++++++++++++++++
 distrib/sandpoint/floppies/ramdisk/list               |  90 ++++++++++++++++++
 distrib/sandpoint/floppies/ramdisk/mtree.conf         |  82 +++++++++++++++++
 distrib/sandpoint/floppies/ramdisk/ramdiskbin.conf    |  43 ++++++++
 distrib/sandpoint/floppies/ramdisk/termcap.src        |  61 ++++++++++++
 distrib/sandpoint/floppies/runlist.sh                 |  13 ++
 14 files changed, 629 insertions(+), 0 deletions(-)

diffs (truncated from 685 to 300 lines):

diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/Makefile        Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.1 2001/12/07 05:04:57 briggs Exp $
+
+SUBDIR=        floppies
+
+TARGETS+=release
+
+.include <bsd.subdir.mk>
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/Makefile       Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.1 2001/12/07 05:04:58 briggs Exp $
+
+SUBDIR=        ramdisk md-kernel
+
+TARGETS+=release
+
+.include <bsd.subdir.mk>
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/Makefile.inc   Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile.inc,v 1.1 2001/12/07 05:04:58 briggs Exp $
+
+.include "../../../Makefile.inc"
+
+# REV is revision without dots, as in "12C"
+# VER is revision with dots, as in "1.2C"
+REV!=sh ${KERNSRCDIR}/conf/osrelease.sh -s
+VER!=sh ${KERNSRCDIR}/conf/osrelease.sh 
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/list2sh.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/list2sh.awk    Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,55 @@
+#      $NetBSD: list2sh.awk,v 1.1 2001/12/07 05:04:58 briggs 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 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/md-kernel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/md-kernel/Makefile     Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,36 @@
+#      $NetBSD: Makefile,v 1.1 2001/12/07 05:04:59 briggs Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+.include <bsd.own.mk>
+.include <bsd.kernobj.mk>
+
+STRIP?= strip
+MDSETIMAGE?=   mdsetimage
+
+KERNELS= netbsd.INSTALL.gz
+CLEANFILES+= ${KERNELS} netbsd
+
+RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
+RAMDISK= ${RAMDISKDIR}/ramdisk.fs
+
+all dependall: ${KERNELS}
+
+netbsd.INSTALL.gz: ${KERNOBJDIR}/INSTALL/netbsd ${RAMDISK}
+       cp ${KERNOBJDIR}/INSTALL/netbsd .
+       ${MDSETIMAGE} -v netbsd ${RAMDISK}
+       ${STRIP} netbsd
+       gzip -9 netbsd
+       mv netbsd.gz ${.TARGET}
+
+release: ${KERNELS}
+       -mkdir -p ${RELEASEDIR}/binary/kernel
+       cp ${KERNELS} ${RELEASEDIR}/binary/kernel
+
+clean cleandir distclean:
+       rm -f *.core ${CLEANFILES}
+
+includes:
+
+.include <bsd.obj.mk>
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/ramdisk/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/ramdisk/Makefile       Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,71 @@
+#      $NetBSD: Makefile,v 1.1 2001/12/07 05:05:00 briggs Exp $
+
+TOP=           ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE=         ramdisk.fs
+
+AUXDEPENDS=    dot.profile disktab.preinstall termcap.src
+
+CBIN=          ramdiskbin
+
+MOUNT_POINT?=  /mnt
+VND?=          vnd0
+VND_DEV=       /dev/${VND}a
+VND_RDEV=      /dev/r${VND}a
+MDEC=          ${DESTDIR}/usr/mdec
+
+LISTS=         list
+CRUNCHCONF=    ${CBIN}.conf
+MTREECONF=     mtree.conf
+
+CRUNCHGEN?=    crunchgen
+MTREE?=                mtree
+
+DISKSIZE=      2048k
+DISKTYPE=      floppyinstfs
+DBG=           -Os -mmultiple
+
+realall: ${IMAGE}
+
+${IMAGE}: ${CBIN}  ${AUXDEPENDS} ${MTREECONF} ${LISTS}
+       dd if=/dev/zero of=${IMAGE} bs=${DISKSIZE} count=1
+       vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
+       disklabel -f ${.CURDIR}/disktab -rw ${VND} ${DISKTYPE}
+       newfs -B be -m 0 -o space -i 6144 -c 128 ${VND_RDEV}
+       mount ${VND_DEV} ${MOUNT_POINT}
+       ${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u
+       TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+           KERNOBJDIR=${KERNOBJDIR} \
+           TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
+       @echo ""
+       @df -i ${MOUNT_POINT}
+       @echo ""
+       umount ${MOUNT_POINT}
+       vnconfig -u ${VND}
+
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND}
+       -rm -f ${IMAGE}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+       ${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c libhack.o
+       ${MAKE} -f ${CBIN}.mk DBG="${DBG}" all
+
+HACKSRC=${TOP}/../../utils/libhack
+NOLIBHACKOPENDIR=
+.include "${HACKSRC}/Makefile.inc"
+
+release:
+
+clean cleandir distclean:
+       if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi;
+       rm -f ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
+       rm -f *.core *.o *.cro *.c
+
+.include <bsd.sys.mk>
+.include <bsd.obj.mk>
+.include <bsd.prog.mk>
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/ramdisk/disktab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/ramdisk/disktab        Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,36 @@
+#      $NetBSD: disktab,v 1.1 2001/12/07 05:05:00 briggs 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, ns*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)
+#
+
+floppyinstfs|NetBSD floppy install filesystem:\
+       :ty=floppy:se#512:nt#1:rm#300:ns#64:nc#64:\
+       :pa#4096:oa#0:ba#4096:fa#512:ta=4.2BSD:\
+       :pc#4096:oc#0:
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/ramdisk/disktab.preinstall
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/ramdisk/disktab.preinstall     Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,29 @@
+#      $NetBSD: disktab.preinstall,v 1.1 2001/12/07 05:05:00 briggs 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, ns*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)
+#
+
diff -r 7122d9ced20c -r c13ac94dd338 distrib/sandpoint/floppies/ramdisk/dot.profile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sandpoint/floppies/ramdisk/dot.profile    Fri Dec 07 05:04:57 2001 +0000
@@ -0,0 +1,91 @@
+# $NetBSD: dot.profile,v 1.1 2001/12/07 05:05:01 briggs Exp $
+#
+# Copyright (c) 1995 Jason R. Thorpe
+# Copyright (c) 1994 Christopher G. Demetriou
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software



Home | Main Index | Thread Index | Old Index