diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
commit | 90ff5a441368313fa226376473fea6908c2c3539 (patch) | |
tree | 38e1de6dcfb2805194734736d7209f51e06fa9e1 /sys/arch/mvme88k/stand/bootsd | |
parent | 7848f1c3b3e234584c90f67e60c6164590478f49 (diff) |
Third try at importing the mvme88k port. This is a working kernel
from nivas.
Userland and compiler still need to be worked on.
Make certain what directory the import is done from.
Diffstat (limited to 'sys/arch/mvme88k/stand/bootsd')
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/Makefile | 50 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/README | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/boot.c | 302 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/bootsd | bin | 0 -> 18432 bytes | |||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/bootsd.bin | bin | 0 -> 15616 bytes | |||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/bootsd.bug | bin | 0 -> 18165 bytes | |||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/bugdev.c | 244 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/filesystem.c | 42 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/sdboot | bin | 0 -> 512 bytes | |||
-rw-r--r-- | sys/arch/mvme88k/stand/bootsd/version.c | 8 |
10 files changed, 649 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/bootsd/Makefile b/sys/arch/mvme88k/stand/bootsd/Makefile new file mode 100644 index 00000000000..ebf141fb0e8 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/Makefile @@ -0,0 +1,50 @@ +# from: @(#)Makefile 8.1 (Berkeley) 6/10/93 +# $Id: Makefile,v 1.1 1997/03/03 19:30:29 rahnds Exp $ + +RELOC=0x3F0000 + +S= ${.CURDIR}/../../../.. +DEFS= -DSTANDALONE -DCOMPAT_NOLABEL # -DROMPRF +INCPATH=-I${.CURDIR} -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa +CFLAGS= ${INCPATH} ${DEFS} ${COPTS} +CLEANFILES+=sdboot bootsd bootsd.bug + +#.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +#.PATH: ${S}/lib/libsa + +.include "${S}/arch/${MACHINE}/stand/libsa/Makefile.inc" +.include "${S}/arch/${MACHINE}/stand/libbug/Makefile.inc" +.include "${S}/arch/${MACHINE}/stand/bugcrt/Makefile.inc" +.include "${S}/arch/${MACHINE}/stand/wrtvid/Makefile.inc" + +SRCS= boot.c filesystem.c bugdev.c version.c + +LIBS= ${LIBSA} ${LIBBUG} libgcc.a + +OBJS= ${SRCS:N*.h:R:S/$/.o/g} + +BOOTS= bootsd sdboot +ALL= ${BOOTS} + +all: ${ALL} + +devopen.o machdep.o: Makefile + +bootsd.bug: ${OBJS} ${BUGCRT} ${LIBS} + ${LD} -N -T ${RELOC} ${BUGCRT} ${OBJS} ${LIBS} -o $@ + @size bootsd.bug + +bootsd sdboot: bootsd.bug ${WRTVID} + cp bootsd.bug bootsd.bin + strip bootsd.bin + @if [ `size bootsd.bin | awk 'BEGIN {getline} {print $$1+$$2;}'` -gt 7168 ];\ + then\ + echo BOOTBLOCKS ARE TOO BIG;\ + fail;\ + fi + ${WRTVID} bootsd.bin + +install: + install -c -m 555 -g bin -o bin ${BOOTS} ${DESTDIR}${MDEC_DIR} + +.include <bsd.prog.mk> diff --git a/sys/arch/mvme88k/stand/bootsd/README b/sys/arch/mvme88k/stand/bootsd/README new file mode 100644 index 00000000000..f3a503eb63e --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/README @@ -0,0 +1,3 @@ +In short: stick the the bootblocks into a partition with +something like: + cat sdboot bootsd > /dev/rsd0c diff --git a/sys/arch/mvme88k/stand/bootsd/boot.c b/sys/arch/mvme88k/stand/bootsd/boot.c new file mode 100644 index 00000000000..70385ffde5f --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/boot.c @@ -0,0 +1,302 @@ +/* $Id: boot.c,v 1.1 1997/03/03 19:30:29 rahnds Exp $ */ + +/*- + * Copyright (c) 1995 Theo de Raadt + * + * 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 + * must display the following acknowledgement: + * This product includes software developed under OpenBSD by + * Theo de Raadt for Willowglen Singapore. + * 4. 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. + * + * Copyright (c) 1982, 1986, 1990, 1993 + * The Regents of the University of California. 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 + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * + * from: @(#)boot.c 8.1 (Berkeley) 6/10/93 + */ + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/reboot.h> +#include <a.out.h> +#include <machine/prom.h> +#include "stand.h" + +void copyunix __P((int io, char *addr)); +void parse_args __P((void)); + +int debug; +int netif_debug; +#define RB_NOSYM 0x400 + +/* + * Boot device is derived from ROM provided information. + */ +extern char *version; +u_long esym; +char *strtab; +int strtablen; +#if 0 +struct nlist *nlp, *enlp; +#endif + +struct kernel { + void *entry; + void *symtab; + void *esym; + int bflags; + int bdev; + char *kname; + void *smini; + void *emini; + u_int end_loaded; +} kernel; + +extern struct mvmeprom_args bugargs; + +int +main() +{ + struct exec x; + char *file; + void *addr; + int io, i; + + printf(">> OpenBSD sdboot [%s]\n", version); + + parse_args(); + file = kernel.kname; + + io = open(file, 0); + if (io < 0) { + printf("Can't open %s: %s\n", file, strerror(errno)); + mvmeprom_return(); + } + i = read(io, (char *)&x, sizeof(x)); + if (i != sizeof(x) || N_BADMAG(x)) { + printf("Bad format\n"); + return (0); + } + /* Make load address start of page which containes "start" */ + addr = (void *)(x.a_entry & ~0x0FFF); + lseek(io, 0, SEEK_SET); + + printf("load %s to 0x%x\n", file, addr); + copyunix(io, addr); + return (0); +} + +/*ARGSUSED*/ +void +copyunix(io, addr) + int io; + char *addr; +{ + void (*entry)() = (void (*)())addr; + struct exec x; + int i, cnt; + + i = read(io, (char *)&x, sizeof(x)); + if (i != sizeof(x) || N_BADMAG(x)) { + printf("Bad format\n"); + return; + } + + printf("%x", x.a_text); + if (N_GETMAGIC(x) == ZMAGIC) { + kernel.entry = entry = (void *)x.a_entry; + lseek(io, 0, SEEK_SET); + } + if (read(io, (char *)addr, x.a_text) != x.a_text) + goto shread; + addr += x.a_text; + if (N_GETMAGIC(x) == NMAGIC) + while ((int)addr & CLOFSET) + *addr++ = 0; + printf("+%x", x.a_data); + if (read(io, addr, x.a_data) != x.a_data) + goto shread; + addr += x.a_data; + printf("+%x", x.a_bss); + for (i = 0; i < x.a_bss; i++) + *addr++ = 0; + if (x.a_syms != 0 && !(kernel.bflags & RB_NOSYM)) { + bcopy(&x.a_syms, addr, sizeof(x.a_syms)); + addr += sizeof(x.a_syms); +#if 0 + nlp = (struct nlist *)addr; +#endif + printf("+[%x+", x.a_syms); + if (read(io, addr, x.a_syms) != x.a_syms) + goto shread; + addr += x.a_syms; +#if 0 + enlp = (struct nlist *)(strtab = addr); +#endif + + if (read(io, &strtablen, sizeof(int)) != sizeof(int)) + goto shread; + + bcopy(&strtablen, addr, sizeof(int)); + if (i = strtablen) { + i -= sizeof(int); + addr += sizeof(int); + cnt = read(io, addr, i); + if (cnt != i) + printf("symwarn"); /* goto shread; */ + addr += i; + } + printf("%x]", i); + esym = KERNBASE + + (((int)addr + sizeof(int) - 1) & ~(sizeof(int) - 1)); + kernel.symtab = (void *) x.a_syms; + kernel.esym = addr; + } else { + kernel.symtab = 0; + kernel.esym = 0; + } + +#if 0 + while (nlp < enlp) { + register int strx = nlp->n_un.n_strx; + if (strx > strtablen) + continue; + if (strcmp(strtab+strx, "_esym") == 0) { + *(int*)(nlp->n_value - KERNBASE) = esym; + break; + } + nlp++; + } +#endif + + kernel.bdev = 0; + kernel.end_loaded = (u_int)addr; + kernel.smini = 0; + kernel.emini = 0; + kernel.kname = 0; + + printf("=%x\n", (u_int)addr - (u_int)entry); /* XXX wrong? */ + +#if 0 +printf("entry %x\n",kernel.entry); +printf("symtab %x\n",kernel.symtab); +printf("esym %x\n",kernel.esym); +printf("bflags %x\n",kernel.bflags); +printf("bdev %x\n",kernel.bdev); +printf("kname %x\n",kernel.kname); +printf("smini %x\n",kernel.smini); +printf("emini %x\n",kernel.emini); +printf("end_loaded %x\n",kernel.end_loaded); +#endif + + printf("start at 0x%x\n", (int)entry); + if (((u_long)entry &0xf) == 0x2) { + (entry)(&bugargs, &kernel); + } else { + /* is type fixing anything like price fixing? */ + typedef (* kernel_start) __P((int, int, void *,void *, void *)); + kernel_start addr; + addr = (void *)entry; + (addr)(kernel.bflags, 0, kernel.esym, kernel.smini, kernel.emini); + } + return; + +shread: + printf("short read\n"); +} + +struct flags { + char c; + short bit; +} bf[] = { + { 'a', RB_ASKNAME }, + { 'b', RB_HALT }, + { 'y', RB_NOSYM }, + { 'd', RB_KDB }, + { 'm', RB_MINIROOT }, + { 'r', RB_DFLTROOT }, + { 's', RB_SINGLE }, +}; + +void +parse_args() +{ + char *name = "/netbsd", *ptr; + int i, howto = 0; + char c; + + if (bugargs.arg_start != bugargs.arg_end) { + ptr = bugargs.arg_start; + while (c = *ptr) { + while (c == ' ') + c = *++ptr; + if (c == '\0') + return; + if (c != '-') { + name = ptr; + while ((c = *++ptr) && c != ' ') + ; + if (c) + *ptr++ = 0; + continue; + } + while ((c = *++ptr) && c != ' ') { + for (i = 0; i < sizeof(bf)/sizeof(bf[0]); i++) + if (bf[i].c == c) { + howto |= bf[i].bit; + } + } + } + } + kernel.bflags = howto; + kernel.kname = name; +} diff --git a/sys/arch/mvme88k/stand/bootsd/bootsd b/sys/arch/mvme88k/stand/bootsd/bootsd Binary files differnew file mode 100644 index 00000000000..5289b6e0087 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/bootsd diff --git a/sys/arch/mvme88k/stand/bootsd/bootsd.bin b/sys/arch/mvme88k/stand/bootsd/bootsd.bin Binary files differnew file mode 100644 index 00000000000..4ea194d6a22 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/bootsd.bin diff --git a/sys/arch/mvme88k/stand/bootsd/bootsd.bug b/sys/arch/mvme88k/stand/bootsd/bootsd.bug Binary files differnew file mode 100644 index 00000000000..52ba1e9769b --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/bootsd.bug diff --git a/sys/arch/mvme88k/stand/bootsd/bugdev.c b/sys/arch/mvme88k/stand/bootsd/bugdev.c new file mode 100644 index 00000000000..def0241f77b --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/bugdev.c @@ -0,0 +1,244 @@ +/* $Id: bugdev.c,v 1.1 1997/03/03 19:30:29 rahnds Exp $ */ + +/* + * Copyright (c) 1993 Paul Kranenburg + * 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 + * must display the following acknowledgement: + * This product includes software developed by Paul Kranenburg. + * 4. 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/disklabel.h> +#include <machine/prom.h> +#include "stand.h" + +int bugscopen __P((struct open_file *, ...)); +int bugscclose __P((struct open_file *)); +int bugscioctl __P((struct open_file *, u_long, void *)); +int bugscstrategy __P((void *, int, daddr_t, size_t, void *, size_t *)); + +void cputobsdlabel __P((struct disklabel *lp, struct cpu_disklabel *clp)); + +struct devsw devsw[] = { + { "bugsc", bugscstrategy, bugscopen, bugscclose, bugscioctl }, +}; +int ndevs = (sizeof(devsw)/sizeof(devsw[0])); + +extern struct mvmeprom_args bugargs; +int errno; + +struct bugsc_softc { + int fd; /* Prom file descriptor */ + int poff; /* Partition offset */ + int psize; /* Partition size */ + short ctrl; + short dev; +} bugsc_softc[1]; + +int +devopen(f, fname, file) + struct open_file *f; + const char *fname; + char **file; +{ + register struct bugsc_softc *pp = &bugsc_softc[0]; + int error, i, dn = 0, pn = 0; + char *dev, *cp; + static char iobuf[MAXBSIZE]; + struct disklabel sdlabel; + + dev = bugargs.arg_start; + + /* + * Extract partition # from boot device string. + */ + for (cp = dev; *cp; cp++) /* void */; + while (*cp != '/' && cp > dev) { + if (*cp == ':') + pn = *(cp+1) - 'a'; + --cp; + } + + pp->fd = bugscopen(f); + + if (pp->fd < 0) { + printf("Can't open device `%s'\n", dev); + return (ENXIO); + } + error = bugscstrategy(pp, F_READ, LABELSECTOR, DEV_BSIZE, iobuf, &i); + if (error) + return (error); + if (i != DEV_BSIZE) + return (EINVAL); + + cputobsdlabel(&sdlabel, (struct cpu_disklabel *)iobuf); + pp->poff = sdlabel.d_partitions[pn].p_offset; + pp->psize = sdlabel.d_partitions[pn].p_size; + + f->f_dev = devsw; + f->f_devdata = (void *)pp; + *file = (char *)fname; + return (0); +} + +/* silly block scale factor */ +#define BUG_BLOCK_SIZE 256 +#define BUG_SCALE (512/BUG_BLOCK_SIZE) +int +bugscstrategy(devdata, func, dblk, size, buf, rsize) + void *devdata; + int func; + daddr_t dblk; + size_t size; + void *buf; + size_t *rsize; +{ + struct mvmeprom_dskio dio; + register struct bugsc_softc *pp = (struct bugsc_softc *)devdata; + daddr_t blk = dblk + pp->poff; + + twiddle(); + + dio.ctrl_lun = pp->ctrl; + dio.dev_lun = pp->dev; + dio.status = 0; + dio.pbuffer = buf; + dio.blk_num = blk * BUG_SCALE; + dio.blk_cnt = size / BUG_BLOCK_SIZE; /* assumed size in bytes */ + dio.flag = 0; + dio.addr_mod = 0; +#ifdef 0 + printf("bugscstrategy: size=%d blk=%d buf=%x\n", size, blk, buf); + printf("ctrl %d dev %d\n", dio.ctrl_lun, dio.dev_lun); +#endif + mvmeprom_diskrd(&dio); + + *rsize = dio.blk_cnt * BUG_BLOCK_SIZE; +#ifdef 0 +printf("rsize %d status %x\n", *rsize, dio.status); +#endif + + if (dio.status) + return (EIO); + return (0); +} + +int +bugscopen(f) + struct open_file *f; +{ +#ifdef DEBUG + printf("bugscopen:\n"); +#endif + + f->f_devdata = (void *)bugsc_softc; + bugsc_softc[0].ctrl = (short)bugargs.ctrl_lun; + bugsc_softc[0].dev = (short)bugargs.dev_lun; + printf("using mvmebug ctrl %d dev %d\n", + bugsc_softc[0].ctrl, bugsc_softc[0].dev); + return (0); +} + +int +bugscclose(f) + struct open_file *f; +{ + return (EIO); +} + +int +bugscioctl(f, cmd, data) + struct open_file *f; + u_long cmd; + void *data; +{ + return (EIO); +} + +void +cputobsdlabel(lp, clp) + struct disklabel *lp; + struct cpu_disklabel *clp; +{ + int i; + + lp->d_magic = clp->magic1; + lp->d_type = clp->type; + lp->d_subtype = clp->subtype; + bcopy(clp->vid_vd, lp->d_typename, 16); + bcopy(clp->packname, lp->d_packname, 16); + lp->d_secsize = clp->cfg_psm; + lp->d_nsectors = clp->cfg_spt; + lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */ + lp->d_ntracks = clp->cfg_hds; + + lp->d_secpercyl = clp->secpercyl; + lp->d_secperunit = clp->secperunit; + lp->d_secpercyl = clp->secpercyl; + lp->d_secperunit = clp->secperunit; + lp->d_sparespertrack = clp->sparespertrack; + lp->d_sparespercyl = clp->sparespercyl; + lp->d_acylinders = clp->acylinders; + lp->d_rpm = clp->rpm; + lp->d_interleave = clp->cfg_ilv; + lp->d_trackskew = clp->cfg_sof; + lp->d_cylskew = clp->cylskew; + lp->d_headswitch = clp->headswitch; + + /* this silly table is for winchester drives */ + switch (clp->cfg_ssr) { + case 0: + lp->d_trkseek = 0; + break; + case 1: + lp->d_trkseek = 6; + break; + case 2: + lp->d_trkseek = 10; + break; + case 3: + lp->d_trkseek = 15; + break; + case 4: + lp->d_trkseek = 20; + break; + default: + lp->d_trkseek = 0; + break; + } + lp->d_flags = clp->flags; + for (i = 0; i < NDDATA; i++) + lp->d_drivedata[i] = clp->drivedata[i]; + for (i = 0; i < NSPARE; i++) + lp->d_spare[i] = clp->spare[i]; + lp->d_magic2 = clp->magic2; + lp->d_checksum = clp->checksum; + lp->d_npartitions = clp->partitions; + lp->d_bbsize = clp->bbsize; + lp->d_sbsize = clp->sbsize; + bcopy(clp->vid_4, &(lp->d_partitions[0]), sizeof (struct partition) * 4); + bcopy(clp->cfg_4, &(lp->d_partitions[4]), sizeof (struct partition) * 12); +} diff --git a/sys/arch/mvme88k/stand/bootsd/filesystem.c b/sys/arch/mvme88k/stand/bootsd/filesystem.c new file mode 100644 index 00000000000..1f1574a93f2 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/filesystem.c @@ -0,0 +1,42 @@ +/* $Id: filesystem.c,v 1.1 1997/03/03 19:30:29 rahnds Exp $ */ + +/* + * Copyright (c) 1993 Philip A. Nelson. + * 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 + * must display the following acknowledgement: + * This product includes software developed by Philip A. Nelson. + * 4. The name of Philip A. Nelson may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY PHILIP NELSON ``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 PHILIP NELSON 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 <stand.h> +#include <ufs.h> + +struct fs_ops file_system[] = { + { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat }, +}; + +int nfsys = sizeof(file_system)/sizeof(struct fs_ops); + diff --git a/sys/arch/mvme88k/stand/bootsd/sdboot b/sys/arch/mvme88k/stand/bootsd/sdboot Binary files differnew file mode 100644 index 00000000000..a79942fc568 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/sdboot diff --git a/sys/arch/mvme88k/stand/bootsd/version.c b/sys/arch/mvme88k/stand/bootsd/version.c new file mode 100644 index 00000000000..2332e37eb22 --- /dev/null +++ b/sys/arch/mvme88k/stand/bootsd/version.c @@ -0,0 +1,8 @@ +/* $Id: version.c,v 1.1 1997/03/03 19:30:29 rahnds Exp $ */ + +/* + * make a random change to this file when you want the bootblock + * revision to increase. like change this x to a y, or something. + */ + +char *version = "$Revision: 1.1 $"; |