From owner-freebsd-alpha Fri May 26 10:59:47 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id D3D0B37C15D for ; Fri, 26 May 2000 10:57:34 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA02881; Fri, 26 May 2000 13:57:30 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.9.3/8.9.1) id NAA30379; Fri, 26 May 2000 13:56:59 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 26 May 2000 13:56:59 -0400 (EDT) To: Holger Lamm Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Linux mode on Alpha In-Reply-To: References: X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14638.47514.302286.80088@grasshopper.cs.duke.edu> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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