Re: Booting Linux on Sun3 machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 15 Jan 2021, Sam Creasey wrote:

Honestly, it probably doesn't boot.  The last kernel I knew to boot
successfully was 2.6.16, and that required patches.


Here's a patch that might help with debugging. It enables the 
'earlyprintk' kernel parameter for Sun 3. (Sun 3x builds already support 
that and don't need this patch.)

Note that this patch is untested and may make things worse. I have a few 
more Sun 3 patches that need testing (refactoring of DMA code in NCR5380).

diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug
index 11b306bdd788..cf3f8442c839 100644
--- a/arch/m68k/Kconfig.debug
+++ b/arch/m68k/Kconfig.debug
@@ -10,7 +10,7 @@ config BOOTPARAM_STRING
 
 config EARLY_PRINTK
 	bool "Early printk"
-	depends on !(SUN3 || M68000 || COLDFIRE)
+	depends on !(M68000 || COLDFIRE)
 	help
 	  Write kernel log output directly to a serial port.
 	  Where implemented, output goes to the framebuffer as well.
diff --git a/arch/m68k/kernel/early_printk.c b/arch/m68k/kernel/early_printk.c
index 7d3fe08a48eb..4b06fb32298a 100644
--- a/arch/m68k/kernel/early_printk.c
+++ b/arch/m68k/kernel/early_printk.c
@@ -11,6 +11,9 @@
 #include <linux/init.h>
 #include <linux/string.h>
 #include <asm/setup.h>
+#ifdef CONFIG_SUN3
+#include <asm/oplib.h>
+#endif
 
 extern void mvme16x_cons_write(struct console *co,
 			       const char *str, unsigned count);
@@ -20,8 +23,14 @@ asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
 static void __ref debug_cons_write(struct console *c,
 				   const char *s, unsigned n)
 {
-#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
-      defined(CONFIG_COLDFIRE))
+#if defined(CONFIG_SUN3)
+	while (n-- && *s) {
+		if (*s == '\n')
+			prom_putchar('\r');
+		prom_putchar(*s);
+		s++;
+	}
+#elif !(defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE))
 	if (MACH_IS_MVME16x)
 		mvme16x_cons_write(c, s, n);
 	else



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux