Subject: Re: SVR4 emulation using Solaris 2.6?
To: None <port-i386@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-i386
Date: 10/16/1998 18:17:49
In article <706sip$mv8$1@news.missouri.edu> c716128@showme.missouri.edu (Ryan Woodsmall) writes:
>Hello all,
>
>I just installed NetBSD 1.3.2 on a machine and was trying to get the
>emulation going.  Linux was a snap - simply copy and uncompress some files
>from a CD and it was working in no time.  However, I'm having trouble with
>SVR4 emulation - I'm using a Solaris 2.6 CD, with the entire distribution
>installed.  Every time I run a program, I get:
>
>    Bus error (core dumped).
>
>and that's it.  No matter what the program is, it's always the same thing.
>Has anyone managed to get SVR4 emulation up and running with Solaris 2.6?
>Thanks in advance, and if you need anything else (like configuration, etc.),
>please feel free to email me.
>

Yes, I have. Only you have to upgrade to /current. I could just say pick
up the segments.h machdep.c differences and that would fix your immediate
problem, but I have fixed quite a few other bugs since then...
The patches are pretty simple to just get going.

christos

Index: segments.h
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/include/segments.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- segments.h	1998/01/23 00:44:11	1.28
+++ segments.h	1998/10/03 18:05:25	1.29
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.28 1998/01/23 00:44:11 mycroft Exp $	*/
+/*	$NetBSD: segments.h,v 1.29 1998/10/03 18:05:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1997
@@ -235,6 +235,7 @@
 #define	LSYS5SIGR_SEL	1	/* iBCS sigreturn gate */
 #define	LUCODE_SEL	2	/* User code descriptor */
 #define	LUDATA_SEL	3	/* User data descriptor */
+#define	LSOL26CALLS_SEL	4	/* Solaris 2.6 system call gate */
 #define	LBSDICALLS_SEL	16	/* BSDI system call gate */
 #define	NLDT		17
 
Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.323
retrieving revision 1.324
diff -u -r1.323 -r1.324
--- machdep.c	1998/09/21 22:58:56	1.323
+++ machdep.c	1998/10/03 18:08:39	1.324
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.323 1998/09/21 22:58:56 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.324 1998/10/03 18:08:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -1863,7 +1863,7 @@
 	    SDT_SYS386CGT, SEL_UPL);
 	ldt[LUCODE_SEL] = gdt[GUCODE_SEL];
 	ldt[LUDATA_SEL] = gdt[GUDATA_SEL];
-	ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL];
+	ldt[LSOL26CALLS_SEL] = ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL];
 
 	/* exceptions */
 	for (x = 0; x < 32; x++)