From owner-freebsd-doc Thu May 28 02:41:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA10705 for freebsd-doc-outgoing; Thu, 28 May 1998 02:41:00 -0700 (PDT) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA10688; Thu, 28 May 1998 02:40:54 -0700 (PDT) (envelope-from jkoshy@FreeBSD.org) From: Joseph Koshy Received: (from jkoshy@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA21371; Thu, 28 May 1998 02:35:16 -0700 (PDT) Date: Thu, 28 May 1998 02:35:16 -0700 (PDT) Message-Id: <199805280935.CAA21371@freefall.freebsd.org> To: jkh@FreeBSD.ORG, jraynard@FreeBSD.ORG Subject: pl. review the following patch ? Cc: freebsd-doc@FreeBSD.ORG Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, Docs/2780 can almost be closed with the following changes to linuxemu.sgml : could you please review? Briefly the changes are: - using &rel.current; where appropriate instead of hardcoding release names - change 2.2-RELEASE to `2.2-RELEASE and later' in a couple of places - adding a small section on the use of `brandelf'. - removing a pretty old comment about ELF support being new If the following patch is OK, I'll commit it (and close docs/2780) in a day or two ... Thanks, Koshy Index: linuxemu.sgml =================================================================== RCS file: /home/ncvs/doc/handbook/linuxemu.sgml,v retrieving revision 1.22 diff -u -r1.22 linuxemu.sgml --- linuxemu.sgml 1997/10/19 13:32:11 1.22 +++ linuxemu.sgml 1998/05/28 09:39:31 @@ -11,7 +11,7 @@ to run a large fraction of Linux binaries in both a.out and ELF format. The linux emulation in the 2.1-STABLE branch is capable of running Linux DOOM and Mathematica; the version present in -FreeBSD-2.2-RELEASE is vastly more capable and runs all these as well as +&rel.current; is vastly more capable and runs all these as well as Quake, Abuse, IDL, netrek for Linux and a whole host of other programs. @@ -29,8 +29,7 @@ linux-executable: Exec format error. Wrong Architecture. -then you do not have linux compatibility support and -you need to configure and install a new kernel. +then you do not have linux compatibility support in your kernel. Depending on which version of FreeBSD you are running, how you get Linux-emulation up will vary slightly: @@ -187,10 +186,9 @@ archives :-) seems to hold that Linux emulation works best with linux binaries linked against the ZMAGIC libraries; QMAGIC libraries (such as those used in Slackware V2.0) may tend to give the -Linuxulator heartburn. As of this writing (March 1996) ELF emulation -is still in the formulative stages but seems to work pretty well. Also, -expect some programs to complain about incorrect minor versions. In -general this does not seem to be a problem. +Linuxulator heartburn. Also, expect some programs to complain about +incorrect minor versions of the system libraries. In general, however, +this does not seem to be a problem. Installing libraries manually @@ -208,8 +206,8 @@ FreeBSD-2.2-RELEASE and later works slightly differently with respect to -/compat/linux. On -CURRENT, all files, not just libraries, are -searched for from the ``shadow root'' /compat/linux. +/compat/linux: all files, not just libraries, are searched for from +the ``shadow root'' /compat/linux. Generally, you will need to look for the shared libraries that Linux binaries depend on only the first few times that you install a Linux @@ -227,8 +225,8 @@ the necessary installation steps).

If you have access to a Linux system, see what shared libraries -it needs, and copy them to your FreeBSD system. Example: you have -just ftp'ed the Linux binary of Doom. Put it on the Linux +the application needs, and copy them to your FreeBSD system. Example: +you have just ftp'ed the Linux binary of Doom. Put it on the Linux system you have access to, and check which shared libraries it needs by running `ldd linuxxdoom': @@ -397,6 +395,28 @@ the minor number(s) mm are less important, though it is advised to take the most recent version. +Installing Linux ELF binaries +ELF binaries sometimes require an extra step of ``branding''. +If you attempt to run an unbranded ELF binary, you will get an error +message like the following: + + +% ./my-linux-elf-binary +ELF binary type not known +Abort +% + + +

To help the FreeBSD kernel distinguish between a FreeBSD ELF binary from a +a Linux one, use the brandelf(1) utility: + +% brandelf -t Linux my-linux-elf-binary + + +The GNU toolchain now places appropriate branding information +into ELF binaries automatically, so you should hopefully be doing +this step increasingly rarely in the future. + Configuring the host name resolver

If DNS does not work or you get the messages @@ -425,8 +445,8 @@

Lastly, those who run 2.1-STABLE need to set an the RESOLV_HOST_CONF environment variable so that applications will know -how to search the host tables. If you run FreeBSD 2.2-RELEASE, you can -skip this. For the /bin/csh shell use: +how to search the host tables. If you run FreeBSD 2.2-RELEASE or later, +you can skip this. For the /bin/csh shell use: setenv RESOLV_HOST_CONF /compat/linux/etc/host.conf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message