Subject: Re: NetBSD mac68k ELF
To: None <port-mac68k@netbsd.org>
From: Martin Espinoza <mespinoza41@mchsi.com>
List: port-mac68k
Date: 03/22/2002 09:33:54
Emile Schwarz wrote:
> Hi all,
>
> at last, it seems that I'm not alone (on that subject).
>
> Martin, see the document (html, < 20 KB) at:
>
> <http://www.netbsd.org/Documentation/elf.html>
This is excellent. Thank you for finding that for me. I am currently in
the process of CVS getting the full sources - I already have kernel
source of course, and I'm doing a make depend on my new config right now.
In /sys/arch/mac68k/conf you have the following file:
# $NetBSD: std.mac68k,v 1.26 2001/11/20 12:56:32 lukem Exp $
#
# standard Macintosh information.
# roughly copied from std.sparc 14 Oct 1993.
machine mac68k m68k
options HZ=60 # mac clock runs at 60hz
# Executable support
options EXEC_AOUT # a.out binary support
options EXEC_SCRIPT # shell script support
Note the lack of options EXEC_ELF.
As per step 4 (Configure, install, and boot a kernel with EXEC_ELF,
EXEC_AOUT, and COMPAT_AOUT all defined.) in the elf.html, I created a
new file, elf.mac68k:
# $NetBSD: std.mac68k,v 1.26 2001/11/20 12:56:32 lukem Exp $
#
# standard Macintosh information.
# roughly copied from std.sparc 14 Oct 1993.
machine mac68k m68k
options HZ=60 # mac clock runs at 60hz
# Executable support
options EXEC_ELF # time to go elf
options EXEC_AOUT # a.out binary support
options COMPAT_AOUT # needed for elf kernel
options EXEC_SCRIPT # shell script support
Then I changed my config file thusly:
include "arch/mac68k/conf/std.mac68k"
becomes:
include "arch/mac68k/conf/elf.mac68k"
In theory, this should provide for the appropriate kernel changes. You
might also need to uncomment the below options line, but who knows?:
# The following is needed to run pre-NetBSD 1.6 binaries under ELF.
#options COMPAT_AOUT_M68K # compatibility with NetBSD/m68k a.out
I did, just to hedge my bets. It takes an agonizingly long time to build
a kernel (let alone the whole OS) on my IIci and I don't have another
netbsd system on which I can build a cross-compiler - the closest thing
I have is cygwin, and I don't trust it that far - So I'm doing all of my
compilation natively.
Before this is all over I may run out of disk space, so it might be a
long time before you hear about anything further on this front from me.
If that happens, I guess I just have to tar up all my sources, save off
my new kernel and config files and whatnot, and repartition and
reinstall. sigh. I did go ahead and delete my mac68k/a.out X11R6 tree
since it wasn't working for me anyway, so maybe I'll be okay. More on
that later :)
Wish me luck! And if there's anyone who's already done this with
-current, please let me know what else I should be doing.