Display debug messages before loading the kernel.

It makes easy to read.
This commit is contained in:
isaki 2016-06-19 09:42:28 +00:00
parent 01a30830e3
commit fed1bd4c95
1 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.25 2016/06/19 09:23:16 isaki Exp $ */
/* $NetBSD: boot.c,v 1.26 2016/06/19 09:42:28 isaki Exp $ */
/*
* Copyright (c) 2001 Minoura Makoto
@ -142,17 +142,6 @@ doboot(const char *file, int flags)
printf("Starting %s, flags 0x%x\n", file, flags);
loadflag = LOAD_KERNEL;
if (file[0] == 'f')
loadflag &= ~LOAD_BACKWARDS;
marks[MARK_START] = 0x100000;
if ((fd = loadfile(file, marks, loadflag)) == -1) {
printf("loadfile failed\n");
return;
}
close(fd);
if (devparse(file, &dev, &unit, &part, &name) != 0) {
printf("XXX: unknown corruption in /boot.\n");
}
@ -195,6 +184,17 @@ doboot(const char *file, int flags)
#endif
#endif
loadflag = LOAD_KERNEL;
if (file[0] == 'f')
loadflag &= ~LOAD_BACKWARDS;
marks[MARK_START] = 0x100000;
if ((fd = loadfile(file, marks, loadflag)) == -1) {
printf("loadfile failed\n");
return;
}
close(fd);
p = ((short*) marks[MARK_ENTRY]) - 1;
#ifdef DEBUG
printf("Kernel Version: 0x%x\n", *p);