From 2401487ebec8b01c355ee7f1012469a029d5c20f Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 6 Jul 2014 05:31:02 +0000 Subject: [PATCH] Reduce diffs to prepare to merge these files. --- sys/arch/x68k/stand/boot/boot.c | 15 ++++++++++----- sys/arch/x68k/stand/netboot/boot.c | 20 +++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/sys/arch/x68k/stand/boot/boot.c b/sys/arch/x68k/stand/boot/boot.c index 6ac95a127b0c..c317ebf8c9b7 100644 --- a/sys/arch/x68k/stand/boot/boot.c +++ b/sys/arch/x68k/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.18 2012/03/20 12:37:01 minoura Exp $ */ +/* $NetBSD: boot.c,v 1.19 2014/07/06 05:31:02 tsutsui Exp $ */ /* * Copyright (c) 2001 Minoura Makoto @@ -45,8 +45,10 @@ #define EXSCSI_BDID ((void*) 0x00ea0001) #define SRAM_MEMSIZE (*((long*) 0x00ed0008)) -char default_kernel[20] = "sd0a:netbsd"; -int mpu, hostadaptor; +char default_kernel[20] = + "sd0a:netbsd"; +int mpu; +int hostadaptor; int console_device = -1; static void help(void); @@ -262,14 +264,16 @@ bootmenu(void) printf("> "); gets(input); - for (p = &input[0]; p - &input[0] < 80 && *p == ' '; p++); + for (p = &input[0]; p - &input[0] < 80 && *p == ' '; p++) + ; options = gettrailer(p); if (strcmp("boot", p) == 0) boot(options); else if (strcmp("help", p) == 0 || strcmp("?", p) == 0) help(); - else if ((strcmp("halt", p) == 0) ||(strcmp("reboot", p) == 0)) + else if (strcmp("halt", p) == 0 || + strcmp("reboot", p) == 0) exit(0); else if (strcmp("ls", p) == 0) cmd_ls(options); @@ -290,6 +294,7 @@ extern const char bootprog_name[]; void bootmain(int bootdev) { + hostadaptor = get_scsi_host_adapter(); mpu = detectmpu(); diff --git a/sys/arch/x68k/stand/netboot/boot.c b/sys/arch/x68k/stand/netboot/boot.c index 3ae40de48de8..f6e31ffbf05e 100644 --- a/sys/arch/x68k/stand/netboot/boot.c +++ b/sys/arch/x68k/stand/netboot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.2 2012/11/01 14:46:26 isaki Exp $ */ +/* $NetBSD: boot.c,v 1.3 2014/07/06 05:31:03 tsutsui Exp $ */ /* * Copyright (c) 2001 Minoura Makoto @@ -46,7 +46,8 @@ #define EXSCSI_BDID ((void*) 0x00ea0001) #define SRAM_MEMSIZE (*((long*) 0x00ed0008)) -char default_kernel[20] = "nfs:netbsd"; +char default_kernel[20] = + "nfs:netbsd"; int mpu; int console_device = -1; @@ -100,17 +101,23 @@ doboot(const char *file, int flags) printf("XXX: unknown corruption in /boot.\n"); } +#ifdef DEBUG printf("dev = %x, unit = %d, name = %s\n", dev, unit, name); +#endif dev = X68K_MAKEBOOTDEV(X68K_MAJOR_NE, unit, 0); +#ifdef DEBUG printf("boot device = %x\n", dev); printf("if = %d, unit = %d\n", B_X68K_SCSI_IF(dev), B_X68K_SCSI_IF_UN(dev)); +#endif p = ((short*) marks[MARK_ENTRY]) - 1; +#ifdef DEBUG printf("Kernel Version: 0x%x\n", *p); +#endif if (*p != 0x4e73 && *p != 0) { /* * XXX temporary solution; compatibility loader @@ -206,9 +213,11 @@ bootmenu(void) options = gettrailer(p); if (strcmp("boot", p) == 0) boot(options); - else if (strcmp("help", p) == 0 || strcmp("?", p) == 0) + else if (strcmp("help", p) == 0 || + strcmp("?", p) == 0) help(); - else if (strcmp("halt", p) == 0 || strcmp("reboot", p) == 0) + else if (strcmp("halt", p) == 0 || + strcmp("reboot", p) == 0) exit(0); else printf("Unknown command %s\n", p); @@ -227,9 +236,10 @@ extern const char bootprog_name[]; void bootmain(int bootdev) { - mpu = detectmpu(); + rtc_offset = RTC_OFFSET; try_bootp = 1; + mpu = detectmpu(); if (mpu < 3) { /* not tested on 68020 */ printf("This MPU cannot run NetBSD.\n");