From owner-freebsd-ports@FreeBSD.ORG Tue Dec 6 10:54:19 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E071065670 for ; Tue, 6 Dec 2011 10:54:19 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 86F368FC16 for ; Tue, 6 Dec 2011 10:54:19 +0000 (UTC) Received: by eekc1 with SMTP id c1so1688061eek.13 for ; Tue, 06 Dec 2011 02:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vZeQiiGe8cfQxPiGMzOtVCwuWlykQ9nqBeTy1b2qG0M=; b=fefzuXsBl84iEQuYckcWdIgQMYWw+rMlYN6UecWpQY5dTy98aSwX8dVqAm7vpxvWDJ SqhEUPgmTr+NZDa6zD4wXO+urxmL1bZTuhpnLj8i5/QyZc+F3FptyfSCunhU0QKGFhSi Db11kvVFrmMUq9MFi5w65iygP7CVCdfQzxci8= MIME-Version: 1.0 Received: by 10.213.13.68 with SMTP id b4mr2245421eba.49.1323168858140; Tue, 06 Dec 2011 02:54:18 -0800 (PST) Received: by 10.14.47.194 with HTTP; Tue, 6 Dec 2011 02:54:18 -0800 (PST) In-Reply-To: <20111206095325.66342106566C@hub.freebsd.org> References: <20111206095325.66342106566C@hub.freebsd.org> Date: Tue, 6 Dec 2011 04:54:18 -0600 Message-ID: From: Zhihao Yuan To: Thomas Mueller Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Alexander Leidinger , freebsd-ports@freebsd.org Subject: Re: Linux compatibility with more than one Linux installed? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2011 10:54:20 -0000 On Tue, Dec 6, 2011 at 3:53 AM, Thomas Mueller wrote: >> The X server has a unix socket somewhere in /tmp. Normally this is used = instead of a TCP connection to the localhost. You need to change the DISPLA= Y >> env-variable to use a TCP connection, or you need o make the unix socket= available to the chrooted linux-env. > >> The linuxulator in FreeBSD is nearly linux 2.6.16 compatible. We lack in= otify and epoll support which the 2.6.16 kernel normally supports. If your = system does >> not depend upon inotify, epoll and anything newer than 2.6.16, it should= work. If you give it a try, please report success or failure to >> emulation@FreeBSD.org. > >> Bye, >> Alexander. > > Now I might have something to try, but it is very unlikely that I would b= uild a Linux kernel <=3D 2.6.16, especially with new hardware that might ne= ed the latest drivers. =C2=A0I will primarily want to run Linux natively ra= ther than under FreeBSD. > > I think emulators/linux_dist-gentoo-stage3 and emulators/linux_base-gento= o-stage3 must use kernel far beyond 2.6.16. > > But I think, when chrooting into Linux from FreeBSD, FreeBSD kernel is th= e one in effect. > Not really. The actual thing is, linuxulator is a Linux kernel running as a FreeBSD kernel module. The only thing FreeBSD kernel do is to identify the Linux program and to pass it to the Linux kernel. To the Linux programs inside a GNU chroot enviroment, they think they are running inside a Linux box and actually they are running inside a Linux box. To the Linux programs running under a FreeBSD base, they may identify that the base is not GNU by invoking some external programs like `uname`. However, we can replace their sh with /compat/linux/bin/sh, so that they are blind again. > Tom > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --=20 Zhihao Yuan, nickname lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/