Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/boot/boot Switch to loadfile instead of exec. ...
details: https://anonhg.NetBSD.org/src/rev/b2f56be8f59e
branches: trunk
changeset: 494988:b2f56be8f59e
user: matt <matt%NetBSD.org@localhost>
date: Wed Jul 19 02:39:11 2000 +0000
description:
Switch to loadfile instead of exec. Now we can load a.out or ELF kernels.
diffstat:
sys/arch/vax/boot/boot/Makefile | 4 ++--
sys/arch/vax/boot/boot/boot.c | 14 ++++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r 2a5f2e78952d -r b2f56be8f59e sys/arch/vax/boot/boot/Makefile
--- a/sys/arch/vax/boot/boot/Makefile Wed Jul 19 01:02:52 2000 +0000
+++ b/sys/arch/vax/boot/boot/Makefile Wed Jul 19 02:39:11 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2000/07/19 00:58:24 matt Exp $
+# $NetBSD: Makefile,v 1.13 2000/07/19 02:39:11 matt Exp $
S= ${.CURDIR}/../../../..
@@ -17,7 +17,7 @@
MDEC_DIR=/usr/mdec
SA_AS= library
-SAMISCMAKEFLAGS=SA_USE_CREAD=yes SA_INCLUDE_NET=yes
+SAMISCMAKEFLAGS=SA_USE_CREAD=yes SA_INCLUDE_NET=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
diff -r 2a5f2e78952d -r b2f56be8f59e sys/arch/vax/boot/boot/boot.c
--- a/sys/arch/vax/boot/boot/boot.c Wed Jul 19 01:02:52 2000 +0000
+++ b/sys/arch/vax/boot/boot/boot.c Wed Jul 19 02:39:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.11 2000/07/13 03:13:40 matt Exp $ */
+/* $NetBSD: boot.c,v 1.12 2000/07/19 02:39:11 matt Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -37,6 +37,7 @@
#include "sys/param.h"
#include "sys/reboot.h"
#include "lib/libsa/stand.h"
+#include "lib/libsa/loadfile.h"
#include "lib/libkern/libkern.h"
#define V750UCODE(x) ((x>>8)&255)
@@ -96,6 +97,7 @@
{
int io;
int j, nu;
+ u_long marks[MARK_MAX];
io = 0;
skip = 1;
@@ -132,10 +134,18 @@
int fileindex;
for (fileindex = 0; filelist[fileindex].name[0] != '\0';
fileindex++) {
+ int err;
errno = 0;
if (!filelist[fileindex].quiet)
printf("> boot %s\n", filelist[fileindex].name);
- exec(filelist[fileindex].name, 0, 0);
+ marks[MARK_START] = 0;
+ err = loadfile(filelist[fileindex].name, marks, LOAD_KERNEL|COUNT_KERNEL);
+ if (err == 0) {
+ machdep_start((char *)marks[MARK_ENTRY], 0,
+ (void *)marks[MARK_START],
+ (void *)marks[MARK_SYM],
+ (void *)marks[MARK_END]);
+ }
if (!filelist[fileindex].quiet)
printf("%s: boot failed: %s\n",
filelist[fileindex].name, strerror(errno));
Home |
Main Index |
Thread Index |
Old Index