Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2000 13:56:59 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Holger Lamm <holger@eit.uni-kl.de>
Cc:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: Linux mode on Alpha
Message-ID:  <14638.47514.302286.80088@grasshopper.cs.duke.edu>
In-Reply-To: <Pine.LNX.4.21.0005252257540.29129-100000@ernie.eit.uni-kl.de>
References:  <Pine.LNX.4.21.0005252257540.29129-100000@ernie.eit.uni-kl.de>

next in thread | previous in thread | raw e-mail | index | archive | help

Holger Lamm writes:
 > Hi,
 > 
 > I just wonder about Linux emu on Alpha. The ports tree
 > (/usr/ports/emulators/linux_base) tries to install linux-alpha, but I have
 > found no kernel that supports Linux mode.
 > 
 > Where is the point I missed? Do the ports anticipate kernel abilities?
 > 
 > The background behind this is that I try to get the Compaq compiler
 > running (http://www.unix.digital.com/linux/compaq_c/). 
 > Maybe someone can tell me more about making it work on FreeBSD?

Its more challenging than you might think because linux is a bigger
hack than you might think.  In linux there are a lot of should-be MI
interfaces that differ from platform to platform.  These differences
are glossed over in userland libraries, but the system call interface
is different from platform to platform (different syscall numbers,
flags have different meanings, etc, etc).

I started working on it a few months back.  Another developer is
currently looking into it.  If he doesn't make progress, I'll probably 
get a chance to look into it sometime this summer.

You can get what I've done from:

o http://www.freebsd.org/~gallatin/linux-alpha.diff.gz
o http://www.freebsd.org/~gallatin/linux-alpha.tar.gz

The diff is diffs to the kernel module build directory and
sys/i386/linux to support alpha.  The tar file is sys/alpha/linux.
This was done in mid-late March against a pre-release 4.0.  It should
apply to 4.0-RELEASE w/o too much effort.

You'll need to pull linux-base version 5.2 out of CVS to do anything
useful.  I'm using 5.2 for two reasons:

One, I'd like to be able to run em86 -- the fx!32 equiv for
Linux/alpha that allows running Linux/i386 binaries like Acroread. 
This supposedly only works with 5.2.  It doesn't work yet under
emulation.  The x86 app makes about 4 system calls & segvs.  Sigh.
I'm also using 5.2 because of a really bizzare problem I'm having.
For some reason, when a linux signal handler returns, it calls #344 &
then exits rather than calling #103 (#103 is their sigreturn too,
because it is osf's).  I'm using our sigcode.. This has me totally
stumped.  I'm looking for help here.

Rather than tracking it down, I've changed #344 (linux_getresgid) to
call sigreturn().  This means we cannot run any RH 6.1 until this is
tracked down.

If you make any progress, please let me know.

Cheers,

Drew

------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer  http://www.cs.duke.edu/~gallatin
Duke University                         Email: gallatin@cs.duke.edu
Department of Computer Science          Phone: (919) 660-6590


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14638.47514.302286.80088>