-# $OpenBSD: DISKLESS,v 1.11 1997/02/10 06:43:26 downsj Exp $
+# $OpenBSD: DISKLESS,v 1.12 1997/02/16 10:42:14 downsj Exp $
# $NetBSD: GENERIC,v 1.23 1997/01/31 06:12:57 thorpej Exp $
#
# Generic kernel - one size fits all.
machine hp300 m68k
-# Include all GENERIC option
+# Include all GENERIC options
include "../../../conf/GENERIC"
# Support for various CPU types
-# $OpenBSD: GENERIC,v 1.15 1997/02/10 06:43:28 downsj Exp $
+# $OpenBSD: GENERIC,v 1.16 1997/02/16 10:42:16 downsj Exp $
# $NetBSD: GENERIC,v 1.23 1997/01/31 06:12:57 thorpej Exp $
#
# Generic kernel - one size fits all.
machine hp300 m68k
-# Include all GENERIC option
+# Include all GENERIC options
include "../../../conf/GENERIC"
# Support for various CPU types
--- /dev/null
+# $OpenBSD: MINIROOT,v 1.1 1997/02/16 10:42:17 downsj Exp $
+#
+# Ram disk kernel for the miniroot.
+#
+
+machine hp300 m68k
+
+# Include all GENERIC options
+include "../../../conf/GENERIC"
+
+# Support for various CPU types
+option HP320
+option HP330 # includes 318, 319
+option HP340
+option HP350
+option HP360
+option HP370
+option HP375 # includes 345, 400t, 400s
+option HP380 # includes 425t, 425s, 433s
+
+# Need to set locally
+maxusers 16
+
+# Options for HP hardware
+option FPSP # floating point interface for 68040
+option USELEDS # make the lights twinkle
+#option PANICBUTTON # two fast <reset>s on HIL dump kernel
+#option CONSCODE="9" # force console at this select code
+option UK_KEYBOARD # include United Kingdom HIL keymap
+option SE_KEYBOARD # include Swedish HIL keymap
+
+# This option enables a different copyin/copyout that uses page
+# mapping for large copies.
+#option MAPPEDCOPY # different copyin/copyout for large copies
+
+#
+# HP-UX binary compatibility.
+# NOTE: THIS IS STILL VERY EXPERIMENTAL. YOUR MILEAGE MAY VARY.
+#
+#option COMPAT_HPUX # HP-UX binary compatibility
+
+#option COMPAT_M68K4K # compat. with NetBSD/m68k4k binaries
+
+# Verbose descriptions of unconfigured DIO devices
+# (Warning: this compiles in a large string table)
+option DIOVERBOSE # recognize "unknown" DIO devices
+
+config bsd swap generic
+
+mainbus0 at root # root "bus"
+
+intio0 at mainbus0 # internal i/o space
+dio0 at mainbus0 # DIO/DIO-II bus
+
+# Davinci framebuffer
+dvbox* at intio?
+dvbox* at dio? scode ?
+
+# Gatorbox framebuffer
+gbox* at intio?
+gbox* at dio? scode ?
+
+# Hyperion framebuffer
+hyper* at dio? scode ?
+
+# Renaissance framebuffer
+rbox* at intio?
+rbox* at dio? scode ?
+
+# Topcat/catseye framebuffers
+topcat* at intio?
+topcat* at dio? scode ?
+
+# Framebuffer abstraction
+grf* at dvbox?
+grf* at gbox?
+grf* at hyper?
+grf* at rbox?
+grf* at topcat?
+
+# Internal Terminal Emulator
+ite* at grf?
+
+dca0 at dio? scode 9 flags 1 # DCA serial interfaces
+dca* at dio? scode ?
+
+dcm* at dio? scode ? flags 0xe # DCM 4- or 8-port serial interfaces
+
+le* at dio? scode ? # LANCE ethernet interfaces
+
+nhpib0 at dio? scode 7 # slow internal HP-IB
+nhpib* at dio? scode ?
+
+fhpib* at dio? scode ? # `fast' HP-IB
+
+hpibbus0 at nhpib0
+hpibbus* at nhpib?
+hpibbus* at fhpib?
+
+hd* at hpibbus? slave ? punit ? # HP-IB disks
+ct* at hpibbus? slave ? punit ? # HP-IB cartridge tapes
+mt* at hpibbus? slave ? punit ? # HP-IB 9-track tape
+ppi0 at hpibbus0 slave 5 punit 0 # HP-IB plotter
+
+oscsi* at dio? scode ? # Old HP SCSI
+
+sd* at oscsi? target ? lun ? # SCSI disks
+st* at oscsi? target ? lun ? # SCSI tapes
+ac* at oscsi? target ? lun ? # SCSI changers
+
+option MINIROOTSIZE=4096
+option RAMDISK_HOOKS
+pseudo-device rd 2
-# $OpenBSD: files.hp300,v 1.5 1997/02/10 06:43:29 downsj Exp $
+# $OpenBSD: files.hp300,v 1.6 1997/02/16 10:42:18 downsj Exp $
# $NetBSD: files.hp300,v 1.22 1997/01/30 22:11:19 scottr Exp $
#
# hp300-specific configuration info
attach ppi at hpibbus
file arch/hp300/dev/ppi.c ppi needs-flag
+# RAM disk
+pseudo-device rd
+file dev/ramdisk.c rd needs-flag
+file arch/hp300/dev/rd_root.c ramdisk_hooks
+major {rd = 8}
+
# Old HP SCSI layer
device oscsi { target = -1, lun = -1 }
attach oscsi at dio
--- /dev/null
+/* $OpenBSD: rd_root.c,v 1.1 1997/02/16 10:42:20 downsj Exp $ */
+/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
+
+/*
+ * Copyright (c) 1995 Gordon W. Ross
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/param.h>
+#include <sys/reboot.h>
+
+#include <dev/ramdisk.h>
+
+extern int boothowto;
+
+#ifndef MINIROOTSIZE
+#define MINIROOTSIZE 512
+#endif
+
+#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
+
+/*
+ * This array will be patched to contain a file-system image.
+ * See the program: src/distrib/sun3/common/rdsetroot.c
+ */
+int rd_root_size = ROOTBYTES;
+char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
+
+/*
+ * This is called during autoconfig.
+ */
+void
+rd_attach_hook(unit, rd)
+ int unit;
+ struct rd_conf *rd;
+{
+ if (unit == 0) {
+ /* Setup root ramdisk */
+ rd->rd_addr = (caddr_t) rd_root_image;
+ rd->rd_size = (size_t) rd_root_size;
+ rd->rd_type = RD_KMEM_FIXED;
+ printf(" fixed, %d blocks", MINIROOTSIZE);
+ }
+}
+
+/*
+ * This is called during open (i.e. mountroot)
+ */
+void
+rd_open_hook(unit, rd)
+ int unit;
+ struct rd_conf *rd;
+{
+ if (unit == 0) {
+ /* The root ramdisk only works single-user. */
+ boothowto |= RB_SINGLE;
+ }
+}
-/* $OpenBSD: conf.c,v 1.12 1997/02/03 08:12:00 downsj Exp $ */
+/* $OpenBSD: conf.c,v 1.13 1997/02/16 10:42:22 downsj Exp $ */
/* $NetBSD: conf.c,v 1.34 1996/12/17 08:41:20 thorpej Exp $ */
/*-
bdev_decl(vnd);
#include "st.h"
bdev_decl(st);
+#include "rd.h"
+bdev_decl(rd);
struct bdevsw bdevsw[] =
{
bdev_disk_init(NCCD,ccd), /* 5: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 6: vnode disk driver */
bdev_tape_init(NST,st), /* 7: SCSI tape */
- bdev_lkm_dummy(), /* 8 */
+ bdev_disk_init(NRD,rd), /* 8: RAM disk */
bdev_lkm_dummy(), /* 9 */
bdev_lkm_dummy(), /* 10 */
bdev_lkm_dummy(), /* 11 */
bdev_lkm_dummy(), /* 12 */
bdev_lkm_dummy(), /* 13 */
+ bdev_lkm_dummy(), /* 14 */
};
int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include "tun.h"
cdev_decl(tun);
cdev_decl(random);
+cdev_decl(rd);
cdev_decl(ipl);
#ifdef IPFILTER
cdev_lkm_dummy(), /* 31 */
cdev_random_init(1,random), /* 32: random generator */
cdev_gen_ipf(NIPF,ipl), /* 33: ip filtering */
+ cdev_disk_init(NRD,rd), /* 34: RAM disk */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);