(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



abi sco binaries onm linux


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: "Brian K. White" <brian@aljex.com>
References: <EC0DB93033E9D411B47100A0C945C07987F526@exchange.stinol.int> <iKCD7.46405$ez.5923067@news1.rdc1.nj.home.com> <3BDF9DB7.A9088137@stino.ru> 
Subject: Re: osr5 binaries run on lunux: how to?
Date: Wed, 31 Oct 2001 11:13:44 GMT


"p_hahaev" <p_hahaev@stino.ru> wrote in message
news:3BDF9DB7.A9088137@stino.ru...
> "Brian K. White" wrote:
>
> > so what version kernel do you have?
> > (uname -a)
> >
> > --
> > Brian K. White  --  brian@aljex.com  --  http://www.aljex.com/bkw/
> > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
> > filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani
>
> OpenLinux 3.1 kernel 2.4.2
> and
> SuSE 7.2 kernel 2.4.7-4GB
> Thanks.
> Pavel



OK, both 2.4.x kernels, so no iBCS, both use linux-abi
once on each system, run this command just to see fi the vendor has possibly
included the abi patch for you and compiled the abi support in the form of
modules. (I doubt it but it's worth checking just in case)
modprobe binfmt_coff

if you get an error, then you don't already have abi support so you will
have to add it
if you get nothing, then run lsmod and verify that binfmt_coff shows up in
there
if lsmod shows the module loaded, then skip to the section labeled "Using
Loadable Modules" below, otherwise, like above you do not already have abi
support and it needs to be added.

for each system, install the kernel sources if they are not installed
already (look in /usr/src/linux)
when /usr/src/linux has a kernel source tree in it, cd /usr/src/linux, ftp
ftp.openlinux.org, cd /pub/people/hch/linux-abi (note sometimes this site
allows anonymous access, and sometimes it doesn't, highly agrevating since
this is "the source" for this patch. just now when I tried to double check
the path to the abi patches and their filenames, it wasn't allowing
anonymous access, so the path might be a little off. it's definetly
"people/hch" or "people/~hch" but the pub might not be necessary. also
ignore the directory named "abi-tools", it's not that one), get the *.diff
whose name most closely matches your kernel version, without going higher
than your kernel version. again, I can't look at the exact filename right
now, but they are something like linux-abi.something-2.4.2.0.diff
where the "2.4.2" part corresponds to several different kernel versions.
quit out of ftp and apply the patch like this:
patch -p0 <linux-abi*.diff
while you are still sitting in /usr/src/linux along with the patch file.

then:
make menuconfig
in "make menuconfig" go to the section "binary support for other systems"
in there hit "y" on every option except "verbose debugging"
I mean every option too, don't leave out the ones that you think you don't
need.

then:
make clean && make dep &7 make bzImage && make modules && make
modules_install
manually make a new directory under /boot for the new kernel, copy
/usr/src/linux/i386/boot/bzImage, /usr/src/linux/System.map,
/usr/src/linux/.config into there, manually edit /etc/lilo.conf adding a new
paragraph for the new kernel without conflicting or removing the existing
ones (pick a label that doesn't conflict, ie: anything but "linux")
run /sbin/lilo, reboot, type the label of the new kernel at the lilo prompt,
and when the system comes up, you should be able to run sco binaries with
various caveats, like, many sco binaries are going to fail if certain common
system files are not right where they expect them, but they do exist on your
system and you just need to make a few symlinks to satisfy the sco binaries.
like: /usr/share/terminfo should have a link as /usr/lib/terminfo, you might
not be setting the TZ variable in your profile currently, but some sco
binaries will get the date/time wrong without it even though all your other
programs are fine. you might need to import terminfo and termcap definitions
from the sco box, you might need to modify your existing termcap & terminfo
(as in: for the "linux" and "xterm" term types) because sometimes a sco
binary will choke if it hits a terminal capability it doesn't understand, or
if it fails to get one it expects)

Using Loadable Modules
another way to get the abi support is to type "m" instead of "y" for all the
abi options in "make menuconfig", if you do this, then when you compile the
kernel, the abi support gets built as a bunch of loadable modules instead of
getting built right into the kernel. It's better for something like this to
build it right in, if you need to run the binaries all the time. it's
possible for loadable modules to just stop working after a while, or fail to
load one day for some reason, etc... but, linux distribution vendors need to
compile every possible driver and feature available, but you don't want to
(actually it's impossible) to build a kernel with every possible option
compiled in (some things are only available as modules, some only work right
as modules, and some are mutually exclusive so you can't have both in  at
the same time) so vendors compile everything as modules and you load what
you need. *If* the vendor has supplied the modules for abi, you can load
them by putting the following in /etc/rc.local



for M in \
    abi-machdep \
    abi-cxenix \
    abi-ibcs \
    abi-sco \
    abi-socket \
    abi-solaris \
    abi-svr4 \
    abi-uw7 \
    abi-wyse \
    binfmt_coff \
    binfmt_xout
do
    insmod $M
done

you can run /etc/rc.d/rc.local manually the first time after editing, no
need to reboot just to load these modules. once they are loaded, the same
caveats as above apply. just because the kernel can now physically run the
binaries doesn't mean you are necessarily even very close to being able to
run and use the application. there is more to a 'system' than it's kernel.
when you take a sco binary and transplant it onto a linux box, and then get
ibcs/abi support working in the kernel, all you've done at that point is
supplied the binary with *somewhat* of a substitute for the kernel it
expects to work with, much of the rest of the system is going to be good
enough also simply by virtue of being a unix-like system. but then again,
there are a lot of differences between sco and linux and any of these may
need to be "faked" somehow on the linux box for the sco binary to run
correctly.

sometimes another option is available too, sometimes the sco binary may have
 a particular compiled-in default, but it is overridable by some environment
variable or setting in it's config file. for instance, a sco binary could
easily have a built in default print command of "lp", to print, the program
will attempt to pipe something into a program named "lp", you *could* make a
symlink from /usr/bin/lpr to /usr/bin/lp, but that is not good enough
because sco's lp has different options than linux's lpr, you could make a
shell script named "lp" that translated the most common options to linux
equivalents, like changing lp -dsomeprinter to lpr -Psomeprinter, but in
many cases you may have an easier option where you simply define an
environment variable that the program will check for, or use the programs
config file to tell the program that it's print command is
"lpr -Psomeprinter"

there are tons of possible littel gotha's like this, but fortunately, a lot
of them are easy to figure out some sort of answer for. its' a matter of
running the app and interpreting the error messages using a little common
sense (well should be common for any unix admin)

--
Brian K. White  --  brian@aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani





Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Bofcusm/945.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress