Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 1999 09:58:51 +0200
From:      Marcel Moolenaar <marcel@scc.nl>
To:        dlombardo@excite.com
Cc:        marcel@FreeBSD.org, ports@FreeBSD.org
Subject:   Re: ports/12918: linux_base build fails on kernels built with  COMPAT_LINUX
Message-ID:  <37AE8A3B.1DFF5F0C@scc.nl>
References:  <934133127.18247.560@excite.com>

next in thread | previous in thread | raw e-mail | index | archive | help
dlombardo@excite.com wrote:
> 
> > Synopsis: linux_base build fails on kernels built with COMPAT_LINUX
> >
> > State-Changed-From-To: open->closed
> > State-Changed-By: marcel
> > State-Changed-When: Sun Aug 8 04:22:48 PDT 1999
> > State-Changed-Why:
> 
> > COMPAT_LINUX is deprecated for more than 3 years. Linux emulation is
> enabled
> > by loading the linux module.
> 
> God, why?!?  COMPAT_LINUX works on my latest -current, and I'm not going to
> change that.
> 
> Like with any other modules, it's really up to the individual to decide
> whether he/she wants it compiled in statically, or loaded dynamically -
> there's no "official method"!  A lot of things exist in both static and
> dynamic versions, and ports shouldn't break because they expect something to
> be one way or the other.

From src/sys/i385/conf/options.i386 commit logs:

revision 1.6:

COMPAT_LINUX is *GONE*.  Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself.  The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code.  All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first.  Like IBCS2, you can statically compile it in with "options LINUX".

revision 1.12:

Removed nonexistent option "LINUX" (what's that :-).

The fact that COMPAT_LINUX still works is "explained" in revision 1.13:

Hide options for emulators and static file systems in opt_dontuse.h.
These options only apply at config time.  Using them at compile time
would break the corresponding lkms.

Ok, so it doesn't break the lkm/kld. Lucky you :-)

On a different track: When you set linux_enable to "YES" in rc.conf it
loads the linux module iff it has checked if the module is not loaded
already. The logic for this is in /usr/bin/linux:

#!/bin/sh

# $Id: linux.sh,v 1.6 1998/11/05 04:19:26 peter Exp $

FOUND=`kldstat -v | egrep 'linux(aout|elf)'`

if [ "x$FOUND" != x ] ; then           
        echo Linux driver already loaded
        exit 1
else    
        kldload linux                                                
fi

By defining COMPAT_LINUX you knowingly divert from the only supported way
to enable the linuxulator. The port happens to give problems for you, but
that doesn't mean that the port is at fault. You're simply not supposed to
use COMPAT_LINUX anymore. Why? That I can't tell you...

-- 
Marcel Moolenaar                                  mailto:marcel@scc.nl
SCC Internetworking & Databases                     http://www.scc.nl/
Amsterdam, The Netherlands                         tel: +31 20 4200655


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




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