All of lore.kernel.org
 help / color / mirror / Atom feed
* Booting Linux on Sun3 machines
@ 2021-01-15 18:31 John Paul Adrian Glaubitz
  2021-01-15 18:52 ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-01-15 18:31 UTC (permalink / raw)
  To: linux-m68k

Hi!

Since Arnd has waved with the axe at the Sun3 port this week, I would like to start
testing the port to make sure it still boots and if not, we can fix the problems.

I have three Sun3 machines in my basement that I can test the kernel on. However,
I have zero experience booting these machines, so I was wondering whether anyone
has booted Linux on these machines in the past and can tell me how that works.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-15 18:31 Booting Linux on Sun3 machines John Paul Adrian Glaubitz
@ 2021-01-15 18:52 ` Geert Uytterhoeven
  2021-01-16  1:05   ` Sam Creasey
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-01-15 18:52 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: linux-m68k, Sam Creasey

CC sammy

On Fri, Jan 15, 2021 at 7:32 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> Since Arnd has waved with the axe at the Sun3 port this week, I would like to start
> testing the port to make sure it still boots and if not, we can fix the problems.
>
> I have three Sun3 machines in my basement that I can test the kernel on. However,
> I have zero experience booting these machines, so I was wondering whether anyone
> has booted Linux on these machines in the past and can tell me how that works.
>
> Thanks,
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaubitz@debian.org
> `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-15 18:52 ` Geert Uytterhoeven
@ 2021-01-16  1:05   ` Sam Creasey
  2021-01-16  5:09     ` Finn Thain
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sam Creasey @ 2021-01-16  1:05 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Geert Uytterhoeven, linux-m68k

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

My last round of notes is still here: https://sammy.net/sun3/

It does include links to a compiled bootloader to netboot a sun3, and
a very ancient debian userland (though if you get to trying to load
init, I'd call that a victory).

I don't believe I ever wrote up full boot instructions, but the
bootloader is a fork of the NetBSD one, so if you can get
rarp/tftp/nfs/etc working well enough to netboot that, you're in the
right place to try to netboot a Linux kernel.  I don't currently have
a boot server configured, but I might be able to find some time to
set something up and help you debug if you get that far.  I've
certainly still got hardware to test with.

-- Sam

On Fri, Jan 15, 2021 at 07:52:05PM +0100, Geert Uytterhoeven wrote:
> CC sammy
>
> On Fri, Jan 15, 2021 at 7:32 PM John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
> > Since Arnd has waved with the axe at the Sun3 port this week, I would like to start
> > testing the port to make sure it still boots and if not, we can fix the problems.
> >
> > I have three Sun3 machines in my basement that I can test the kernel on. However,
> > I have zero experience booting these machines, so I was wondering whether anyone
> > has booted Linux on these machines in the past and can tell me how that works.
> >
> > Thanks,
> > Adrian
> >
> > --
> >  .''`.  John Paul Adrian Glaubitz
> > : :' :  Debian Developer - glaubitz@debian.org
> > `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
> >   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-16  1:05   ` Sam Creasey
@ 2021-01-16  5:09     ` Finn Thain
  2021-01-16  9:04     ` John Paul Adrian Glaubitz
  2021-01-18 20:01     ` Thomas Bogendoerfer
  2 siblings, 0 replies; 7+ messages in thread
From: Finn Thain @ 2021-01-16  5:09 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, Sam Creasey; +Cc: Geert Uytterhoeven, linux-m68k


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-16  1:05   ` Sam Creasey
  2021-01-16  5:09     ` Finn Thain
@ 2021-01-16  9:04     ` John Paul Adrian Glaubitz
  2021-01-18 20:01     ` Thomas Bogendoerfer
  2 siblings, 0 replies; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-01-16  9:04 UTC (permalink / raw)
  To: Sam Creasey; +Cc: Geert Uytterhoeven, linux-m68k

Hi Sam!

On 1/16/21 2:05 AM, 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.

I guess then we have something to fix :-).

> My last round of notes is still here: https://sammy.net/sun3/

OK, thank you. I will have a look.

> It does include links to a compiled bootloader to netboot a sun3, and
> a very ancient debian userland (though if you get to trying to load
> init, I'd call that a victory).

Great. I will probably try the old stuff first, then switch to a newer kernel
and report any issues I run into to the list.

> I don't believe I ever wrote up full boot instructions, but the
> bootloader is a fork of the NetBSD one, so if you can get
> rarp/tftp/nfs/etc working well enough to netboot that, you're in the
> right place to try to netboot a Linux kernel.  I don't currently have
> a boot server configured, but I might be able to find some time to
> set something up and help you debug if you get that far.  I've
> certainly still got hardware to test with.

Sounds good. Let's get this back into working state!

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-16  1:05   ` Sam Creasey
  2021-01-16  5:09     ` Finn Thain
  2021-01-16  9:04     ` John Paul Adrian Glaubitz
@ 2021-01-18 20:01     ` Thomas Bogendoerfer
  2021-01-18 21:03       ` John Paul Adrian Glaubitz
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-18 20:01 UTC (permalink / raw)
  To: Sam Creasey; +Cc: John Paul Adrian Glaubitz, Geert Uytterhoeven, linux-m68k

On Fri, Jan 15, 2021 at 08:05:03PM -0500, 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.

I just checked and my latest running kernel was 3.8.0-rc2 and the local
changes don't look too scary. Bootlog on a 3/160 emulated by TME below.

Thomas.

Linux version 3.8.0-rc2-sun3-84527-g5b3da89-dirty (tsbogend@solo.franken.de) (gcc version 4.3.5 (Debian 4.3.5-4) ) #238 Sun Jan 6 17:25:46 CET 2013
ARCH: SUN3
TYPE: Sun 3/160 Series
Ethernet address: 8:0:20:1:2:3
mapped: vaddr=fe00000 [fe] pte=d7000000 [0000000 vw-xam io]
mapped: vaddr=fe20000 [fd] pte=db07fa00 [ff400000 vw-xam vme16]
mapped: vaddr=fe40000 [fc] pte=d007f810 [ff020000 vw-x-- memory]
mapped: vaddr=fe60000 [fb] pte=d30007ff [0ffe000 vw-xam memory]
mapped: vaddr=fe80000 [fa] pte=20000000 [0000000 --s--- memory]
mapped: vaddr=fea0000 [f9] pte=d007fb00 [ff600000 vw-x-- memory]
mapped: vaddr=fee0000 [f7] pte=f0000f70 [1ee0000 vwsx-- memory]
mapped: vaddr=ff00000 [10] pte=d3000100 [0200000 vw-xam memory]
mapped: vaddr=ff20000 [11] pte=d3000110 [0220000 vw-xam memory]
mapped: vaddr=ff40000 [12] pte=d3000120 [0240000 vw-xam memory]
mapped: vaddr=ff60000 [13] pte=d0000130 [0260000 vw-x-- memory]
mapped: vaddr=ff80000 [14] pte=d3000140 [0280000 vw-xam memory]
mapped: vaddr=ffa0000 [15] pte=d0000150 [02a0000 vw-x-- memory]
mapped: vaddr=ffc0000 [16] pte=d0000160 [02c0000 vw-x-- memory]
mapped: vaddr=ffe0000 [f8] pte=f0000f80 [1f00000 vwsx-- memory]
On node 0 totalpages: 2046
free_area_init_node: node 0, pgdat 0e2465fc, node_mem_map 0e25e020
  DMA zone: 8 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 2038 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 2038
Kernel command line: console=ttyS0,9600 root=/dev/nfs ip=dhcp debug init=/bin/sh
PID hash table entries: 64 (order: -5, 256 bytes)
Dentry cache hash table entries: 2048 (order: 0, 8192 bytes)
Inode-cache hash table entries: 2048 (order: 0, 8192 bytes)
Memory: 13816k/13816k available (2112k kernel code, 360k data, 80k init)
Virtual kernel memory layout:
    vector  : 0x0e2461f8 - 0x0e2465f8   (   1 KiB)
    kmap    : 0x0dc00000 - 0x0e000000   (   4 MiB)
    vmalloc : 0x0f800000 - 0x0fe00000   (   6 MiB)
    lowmem  : 0x0e000000 - 0x0effc000   (  15 MiB)
      .init : 0x0e232000 - 0x0e246000   (  80 KiB)
      .text : 0x0e004000 - 0x0e214000   (2112 KiB)
      .data : 0x0e216268 - 0x0e230ee0   ( 108 KiB)
      .bss  : 0x0e246000 - 0x0e2563a8   (  65 KiB)
NR_IRQS:200
unexpected interrupt from 124
Calibrating delay loop... 18.94 BogoMIPS (lpj=94720)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 8192 bytes)
TCP bind hash table entries: 1024 (order: -1, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 512 (order: 0, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 0, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
fe02000.zs: ttyS0 at MMIO 0xfe02000 (irq = 6) is a zs (ESCC)
Console: ttyS0 (SunZilog zs0)
console [ttyS0] enabled
fe02000.zs: ttyS1 at MMIO 0xfe02004 (irq = 6) is a zs (ESCC)
eth0: SUN3 Intel 82586 found at f800000, Memaddr: 0xffd8000, Memsize: 32768, IRQ 3
TCP: cubic registered
NET: Registered protocol family 17
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.11.100
IP-Config: Complete:
     device=eth0, hwaddr=08:00:20:01:02:03, ipaddr=192.168.11.100, mask=255.255.255.0, gw=192.168.11.1
     host=192.168.11.100, domain=franken.de, nis-domain=(none)
     bootserver=0.0.0.0, rootserver=192.168.11.1, rootpath=/export/sun3
     nameserver0=192.168.7.254VFS: Mounted root (nfs filesystem) readonly on device 0:7.
sh-2.03# uname -a
Linux 192.168.11.100 3.8.0-rc2-sun3-84527-g5b3da89-dirty #238 Sun Jan 6 17:25:46 CET 2013 m68k unknown
sh-2.03# cat /proc/cpuinfo
CPU:		68020
MMU:		Sun-3
FPU:		68881
Clocking:	75.7MHz
BogoMips:	18.94
Calibration:	94720 loops



-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Booting Linux on Sun3 machines
  2021-01-18 20:01     ` Thomas Bogendoerfer
@ 2021-01-18 21:03       ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-01-18 21:03 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Sam Creasey; +Cc: Geert Uytterhoeven, linux-m68k

Hi Thomas!

On 1/18/21 9:01 PM, Thomas Bogendoerfer wrote:
> On Fri, Jan 15, 2021 at 08:05:03PM -0500, 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.
> 
> I just checked and my latest running kernel was 3.8.0-rc2 and the local
> changes don't look too scary. Bootlog on a 3/160 emulated by TME below.

OK, we'll see how it goes with real hardware. I will hopefully hurl one or
two Sun3 up from my basement and see how far I'll get.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-18 21:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 18:31 Booting Linux on Sun3 machines John Paul Adrian Glaubitz
2021-01-15 18:52 ` Geert Uytterhoeven
2021-01-16  1:05   ` Sam Creasey
2021-01-16  5:09     ` Finn Thain
2021-01-16  9:04     ` John Paul Adrian Glaubitz
2021-01-18 20:01     ` Thomas Bogendoerfer
2021-01-18 21:03       ` John Paul Adrian Glaubitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.