Subject: Is -Ttext address changeable - booter interactions?
To: NetBSD/next68k developers list <port-next68k@netbsd.org>
From: Timm Wetzel <twetzel@gwdg.de>
List: port-next68k
Date: 02/22/2000 13:57:35
Hello all,

I'm proud to announce that I'm again able load (and immediately crash)
NetBSD kernels on turbo hardware. :-)

However, it's not crashing the way I'd like it to.

Currently I solved the loading problem for turbo hardware as follows:

- link the kernel with -N (like NetBSD boot) to get an OMAGIC image. 

- There's a NS utility atom (a.out-to-MachO) which can convert [OZ]MAGIC
  images to Mach-O. I modified the Darwin source to have it produce
  MH_EXECUTE Mach-O images from OMAGIC kernels.

- The resulting Mach-O image can simply be netbooted by the NeXT booter.

However, the system immediately crashes with a register dump (exception
2/3), even before displaying a single character either on console or via
serial line. (I saw at least some greetings back when I still had the
semi-working NetBSD booter).

I _think_ that the register dump is not from the booter but from some part
of the NetBSD kernel, and it shows some 0x438xxxx addresses (isn't this
where the NeXT booter gets loaded?). 

I know there are multiple highly dubious parts in my build system:

- The -N ld option, 

- the a.out to Mach-O conversion,

- my cross toolchain and current kernel source (from late January, some
  small local mods).

Assuming for a moment all this was working correctly, is loading a `-Ttext
0' image with the NS booter expected to work at all?

Would it perhaps make sense to link the kernel with the start address used 
by NS and probably expected by the NS booter (0x4000000), and could the
NetBSD kernel cope with that?


Timm
-- 
Timm Wetzel     	<twetzel@gwdg.de>
Biomed. NMR GmbH        Tel +49 551 201-1091    FAX +49 551 201-1307
Am Fassberg 11, D-37077 Goettingen, Germany