Subject: Re: I've got ELF - new snapshot
To: Michael R. Zucca <mrz5149@acm.org>
From: Space Case <wormey@eskimo.com>
List: port-mac68k
Date: 11/26/2001 18:13:20
On Nov 26,  8:56pm, "Michael R. Zucca" wrote:
>At 12:52 AM -0500 11/26/01, Space Case wrote:
>>I'm likely going to be doing ELF snapshots exclusively for a while, so now
>>would be a good time to hop aboard the bandwagon.  (If you're so brave. :-)
>
>So how does one roll their own ELF kernel?

The way I would do it:

- Install and boot the ELF snapshot
- Check out a fresh source tree
- Apply the following patches from Chuck
  (the first one did not apply cleanly, but
   it's obvious what needs to be done)
- Proceed to build as usual

There is probably a way to cross-compile from a m68k ELF platform, but
I wouldn't know about that... :(

~Steve


Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.own.mk,v
retrieving revision 1.214
diff -u -r1.214 bsd.own.mk
--- share/mk/bsd.own.mk	2001/11/12 23:16:21	1.214
+++ share/mk/bsd.own.mk	2001/11/21 13:57:22
@@ -235,6 +235,7 @@
     ${MACHINE} == "hp300" || \
     ${MACHINE} == "news68k" || \
     ${MACHINE} == "cesfic" || \
+    ${MACHINE} == "mac68k" || \
     ${MACHINE} == "arm26" || \
     ${MACHINE} == "atari"
 OBJECT_FMT?=ELF
Index: distrib/sets/makeflist
===================================================================
RCS file: /cvsroot/basesrc/distrib/sets/makeflist,v
retrieving revision 1.36
diff -u -r1.36 makeflist
--- distrib/sets/makeflist	2001/10/20 06:11:21	1.36
+++ distrib/sets/makeflist	2001/11/21 13:57:22
@@ -60,7 +60,7 @@
 arch=`echo $arch | sed s,^mipse.,mips, | sed s,^sh3e.,sh3,`
 
 # Compute toolchain  used on target cpu.
-if [ "$arch" = "mips" -o "$machine" = "alpha" -o "$arch" = "powerpc" -o "$arch" = "sparc" -o "$arch" = "sparc64" -o "$arch" = "i386" -o "$arch" = "arm26" -o "$machine" = "hp300" -o "$machine" = "mvme68k" -o "$machine" = "news68k" -o "$machine" = "sun3" -o "$machine" = "next68k" -o "$machine" = "cesfic" -o "$machine" = "atari" ]; then
+if [ "$arch" = "mips" -o "$machine" = "alpha" -o "$arch" = "powerpc" -o "$arch" = "sparc" -o "$arch" = "sparc64" -o "$arch" = "i386" -o "$arch" = "arm26" -o "$machine" = "hp300" -o "$machine" = "mvme68k" -o "$machine" = "news68k" -o "$machine" = "sun3" -o "$machine" = "next68k" -o "$machine" = "cesfic" -o "$machine" = "atari" -o "$machine" = "mac68k" ]; then
 	shlib=elf
 else
 	if [ "$arch" = "sh3" ]; then
Index: sys/arch/mac68k/conf/GENERIC
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mac68k/conf/GENERIC,v
retrieving revision 1.114
diff -u -r1.114 GENERIC
--- sys/arch/mac68k/conf/GENERIC	2001/11/20 08:43:27	1.114
+++ sys/arch/mac68k/conf/GENERIC	2001/11/21 13:57:23
@@ -60,11 +60,12 @@
 options 	COMPAT_43	# and 4.3BSD
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 
+options 	EXEC_AOUT	# a.out binary support
 options 	COMPAT_SUNOS	# compatibility with SunOS 4.x binaries
 #options 	COMPAT_SVR4	# compatibility with SVR4 binaries
 #options 	COMPAT_M68K4K	# compatibility with NetBSD/m68k4k binaries
 #options 	COMPAT_LINUX	# compatibility with Linux/m68k binaries
-#options 	EXEC_ELF32	# 32-bit ELF executables (Linux, SVR4)
+options 	COMPAT_AOUT_M68K # support for NetBSD a.out executables
 
 # File systems
 file-system 	FFS		# UFS
Index: sys/arch/mac68k/conf/GENERICSBC
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mac68k/conf/GENERICSBC,v
retrieving revision 1.6
diff -u -r1.6 GENERICSBC
--- sys/arch/mac68k/conf/GENERICSBC	2001/11/20 08:43:28	1.6
+++ sys/arch/mac68k/conf/GENERICSBC	2001/11/21 13:57:23
@@ -60,11 +60,12 @@
 options 	COMPAT_43	# and 4.3BSD
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 
+options 	EXEC_AOUT	# a.out binary support
 options 	COMPAT_SUNOS	# compatibility with SunOS 4.x binaries
 #options 	COMPAT_SVR4	# compatibility with SVR4 binaries
 #options 	COMPAT_M68K4K	# compatibility with NetBSD/m68k4k binaries
 #options 	COMPAT_LINUX	# compatibility with Linux/m68k binaries
-#options 	EXEC_ELF32	# 32-bit ELF executables (Linux, SVR4)
+options 	COMPAT_AOUT_M68K # support for NetBSD a.out executables
 
 # File systems
 file-system 	FFS		# UFS
Index: sys/arch/mac68k/conf/std.mac68k
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mac68k/conf/std.mac68k,v
retrieving revision 1.25
diff -u -r1.25 std.mac68k
--- sys/arch/mac68k/conf/std.mac68k	2000/06/22 20:27:53	1.25
+++ sys/arch/mac68k/conf/std.mac68k	2001/11/21 13:57:23
@@ -8,5 +8,5 @@
 options HZ=60			# mac clock runs at 60hz
 
 # Executable support
-options 	EXEC_AOUT	# a.out binary support
+options 	EXEC_ELF32	# 32-bit ELF executables
 options 	EXEC_SCRIPT	# shell script support



-- 
Steve Allen - wormey@eskimo.com   http://www.eskimo.com/~wormey/   ICQ 6709819

Faith is the quality that enables you to eat blackberry jam on a picnic
without looking to see whether the seeds move.

Contrary to popular belief, Unix is user friendly.  
It just happens to be selective about who it makes friends with.
	-Kyle Hearn  <kyle@intex.net>

The opposite of a profound truth may well be another profound truth.
		-- Bohr