linux-mips-fnet
[Top] [All Lists]

Re: yet another DECstation kernel

To: linux-mips@fnet.fr
Subject: Re: yet another DECstation kernel
From: Harald Koerfgen <harald.koerfgen@netcologne.de>
Date: Mon, 09 Feb 1998 19:29:25 +0100 (MET)
In-reply-to: <199802090843.AA25069@mailfw2.ford.com>
Organization: none
Reply-to: "Harald Koerfgen" <harald.koerfgen@netcologne.de>
Sender: harry@franz.netcologne.de
Hello again,

On 09-Feb-98 Harald Koerfgen wrote:
> 
> I assume you meant "No kernel code should ever include non kernel header
> files" and I totally agree. Actually the DECstation kernel contains code
> borrowed from milo and it looks like an #include <stdio.h> slipped into
> the kernel. I'll fix this ASAP.
> 

On 08-Feb-98 Stuart Auchterlonie wrote:

> With the lastest test kernel (and the previous one) I get
>
> -Got the following for the console env. variable: 1
>
> And then complains it doesn't know what it should talk to and 
> I see no further messages.

Ok, here's the patch. IMHO it's small enough to be posted here, hope you don't
mind.

---
regards,
Harald

--- cut here ---
diff -rubN linux-2.1.14.2.dec.mine.orig/arch/mips/Makefile
linux-2.1.14.2.dec.mine/arch/mips /Makefile
--- linux-2.1.14.2.dec.mine.orig/arch/mips/Makefile     Mon Feb  9 19:10:05 1998
+++ linux-2.1.14.2.dec.mine/arch/mips/Makefile  Mon Feb  9 18:30:20 1998
@@ -136,20 +136,8 @@
 ARCHIVES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(ARCHIVES)
 LIBS := arch/mips/lib/lib.a $(LIBS) arch/mips/lib/lib.a
 
-MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
-
-zImage: vmlinux
-       @$(MAKEBOOT) zImage
-
-compressed: zImage
-
-zdisk: vmlinux
-       @$(MAKEBOOT) zdisk
-
 archclean:
-       @$(MAKEBOOT) clean
        $(MAKE) -C arch/$(ARCH)/kernel clean
        $(MAKE) -C arch/$(ARCH)/tools clean
 
 archdep:
-       @$(MAKEBOOT) dep
diff -rubN linux-2.1.14.2.dec.mine.orig/arch/mips/dec/bitags.c
linux-2.1.14.2.dec.mine/arch/mips/dec/bitags.c
--- linux-2.1.14.2.dec.mine.orig/arch/mips/dec/bitags.c Mon Feb  9 19:10:05 1998
+++ linux-2.1.14.2.dec.mine/arch/mips/dec/bitags.c      Mon Feb  9 18:25:46 1998
@@ -8,9 +8,8 @@
  * This file is subject to the terms and conditions of the GNU General Public
  * License. See the file COPYING in the main directory of this archive for more
  */
-#include <stdio.h>
 #include <asm/bootinfo.h>
-/* #include <stand/debug.h> */
+#include <linux/string.h>
 
 static unsigned int debuglevel = 0;
 
diff -rubN linux-2.1.14.2.dec.mine.orig/arch/mips/dec/decstation.c
linux-2.1.14.2.dec.mine/arch/mips/dec/decstation.c
--- linux-2.1.14.2.dec.mine.orig/arch/mips/dec/decstation.c     Mon Feb  9
19:11:39 1998
+++ linux-2.1.14.2.dec.mine/arch/mips/dec/decstation.c  Mon Feb  9 18:55:38 1998
@@ -213,28 +213,29 @@
      *
      * FIXME: Is "osconsole" the same variable on the DS2100/3100's??
      */
-    console_type = prom_getenv("console");
-    if (console_type != NULL)
-    {
-           prom_printf("Got the following for the console env. variable: %s\n",
-                       console_type);
            /* Big case statement goes here to set dec_console_type to the
             * appropriate value for initialisation in con_type_init() in
             * drivers/dec/char/deccons.c  In the meantime...
             */
+       console_type = prom_getenv("console");
+       if (console_type[0] == 's') {
+               prom_printf("Got the following for the console env. variable:
%s\n",
+                       console_type);
+               prom_printf("Switching to serial console for DS5000\n");
+               /* register_console(serial_puts); */
+               register_console(prom_printf);
+               serial_console = 1;     /* assume first serial port */
+       }
+       else {
+               console_type = prom_getenv("osconsole");
+               prom_printf("Got the following for the osconsole env. variable:
%s\n",
+                       console_type);
            serial_console = 0;         /* assume graphics for the moment */
-           if ((console_type[1] == ',') || (console_type[0] == '*'))
-           {
+               if ((console_type[1] == ',') || (console_type[0] == '*')) {
                    prom_printf("Should set graphics console for DS5000 in slot
%c, kbd/mouse in slot:%c\n",
                                console_type[0], console_type[2]);
                    dec_console_type = "GraphicsConsole";
-           }
-           else if (console_type[0] == 's')
-           {
-                   prom_printf("Switching to serial console for DS5000\n");
-                   /* register_console(serial_puts); */
                    register_console(prom_printf);
-                   serial_console = 1; /* assume first serial port */
            }
            else
                    prom_printf("No idea what console to use!\n");

<Prev in Thread] Current Thread [Next in Thread>