Add code to read the disklabel and add the beginning offset for A. Add
support for booting off a RAID root parition.
This commit is contained in:
parent
fba0f63c68
commit
ab1d1ef33d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bootxx.c,v 1.11 2000/07/19 00:58:25 matt Exp $ */
|
||||
/* $NetBSD: bootxx.c,v 1.12 2000/11/02 17:01:47 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
|
@ -263,6 +263,8 @@ devopen(f, fname, file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern struct disklabel romlabel;
|
||||
|
||||
int
|
||||
romstrategy(sc, func, dblk, size, buf, rsize)
|
||||
void *sc;
|
||||
|
@ -275,6 +277,15 @@ romstrategy(sc, func, dblk, size, buf, rsize)
|
|||
int block = dblk;
|
||||
int nsize = size;
|
||||
|
||||
if (romlabel.d_magic == DISKLABEL && romlabel.d_magic2 == DISKLABEL) {
|
||||
if (romlabel.d_npartitions > 1) {
|
||||
block += romlabel.d_partitions[0].p_offset;
|
||||
if (romlabel.d_partitions[0].p_type == FS_RAID) {
|
||||
block += 64; /* XXX */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (from == FROMMV) {
|
||||
romread_uvax(block, size, buf, rpb);
|
||||
} else /* if (from == FROM750) */ {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: start.s,v 1.10 2000/07/19 00:58:25 matt Exp $ */
|
||||
/* $NetBSD: start.s,v 1.11 2000/11/02 17:01:47 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -79,6 +79,11 @@ from_0x08: # Any machine from VMB
|
|||
# disklabel(8) checks that before installing
|
||||
# the bootblocks over existing label.
|
||||
|
||||
.org LABELOFFSET
|
||||
.globl _C_LABEL(romlabel)
|
||||
_C_LABEL(romlabel):
|
||||
.long 0
|
||||
|
||||
.org LABELOFFSET + d_end_
|
||||
start_vmb:
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue