* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
static char sccsid
[] = "@(#)boot.c 7.5 (Berkeley) %G%";
* Boot program... arguments from lower-level bootstrap determine
* whether boot stops to ask for system name and which device
extern int opendev
, bootdev
, cyloffset
;
extern jmp_buf exception
;
if((dev
&B_MAGICMASK
) == B_DEVMAGIC
) {
printf("- load aborted\n");
howto
= RB_SINGLE
|RB_ASKNAME
;
if (howto
& RB_ASKNAME
) {
/* process additional flags if any */
if(cp
= (char *)index(line
, ' ')) {
howto
= strtol (cp
, 0, 0);
printf("Boot: %s\n", line
);
printf("Boot: %s\n", line
);
i
= read(io
, (char *)&x
, sizeof x
);
(x
.a_magic
!= 0407 && x
.a_magic
!= 0413 && x
.a_magic
!= 0410)) {
if (x
.a_magic
== 0413 && lseek(io
, 0x400, 0) == -1)
if (read(io
, (char *)0, x
.a_text
) != x
.a_text
)
if (x
.a_magic
== 0413 || x
.a_magic
== 0410)
while ((int)addr
& CLOFSET
)
if (read(io
, addr
, x
.a_data
) != x
.a_data
)
x
.a_bss
+= 128*512; /* slop */
for (i
= 0; i
< x
.a_bss
; i
++)
/* mask high order bits corresponding to relocated system base */
printf(" start 0x%x\n", x
.a_entry
);
i
= (*((int (*)()) x
.a_entry
))(howto
, opendev
, 0, cyloffset
);
if (i
) printf("exit %d\n", i
) ;