Był taki okres, że potrzebowałem uruchomić program napisany dla SCO na zwykłym Linux'ie, trochę się z tym męczyłem, aż ktoś podrzucił mi projekt ABI.  http://linux-abi.sourceforge.net/

Instalacja i konfiguracja ABI dla Linuxa

Krotki opis krok po kroku, jak zmusić Debiana lub Ubuntu do obsł‚ugi binariów SCO.

1) pobieramy źródła i narzę™dzia potrzebne do kompilacji np:

apt-get install build-essential

(źródła właściwe dla jądra systemu np.):

apt-get install linux-headers-$(uname -r)

2) dodajemy w /usr/src link do którego odnoszą… się™ kompilatory:

ln -s linux-headers-2.6.22-14 linux

3) pobieramy najnowsze ABI ze strony http://linux-abi.sourceforge.net/ lub http://sourceforge.net/projects/linux-abi/ dla naszej wersji ją…dra

4) rozpakowujemyźródła i ustawiamy plik CONFIG, poniżej konfiguracja niezbę™dna do uruchomienia binariów SCO

------------------
# Linux-Abi Configuration File.
# "Y" and "N" (without double quotes) are the only acceptable values.
# Make sure there are no leading/trailing spaces/tabs !
# "ABI_UTIL" must be "Y" if "ABI_TRACE" is "Y"ABI_UTIL=Y
# "ABI_LCALL" must be "Y" for the package to workABI_LCALL=Y
# "ABI_SVR4" must be "Y" if one of 6 personalities below is set to "Y"
ABI_SVR4=Y
ABI_SCO=Y
ABI_IBCS=N
ABI_ISC=N
ABI_SOLARIS=N
ABI_UW7=N
ABI_WYSE=N
BINFMT_COFF=Y
BINFMT_XOUT=N
BINFMT_XOUT_X286=N
ABI_TRACE=N
ABI_SIGRETURN=N
ABI_SPX=N
ABI_XTI=N
# Two parameters below are mutually exclusive
ABI_XTI_OPTMGMT=N
ABI_TLI_OPTMGMT=Y
# If the parameter below is set to Y only programs marked with
# "util/elf_mark" will be able to use "lcall $7" logic.
# This flag applies only to ELF binaries - COFF and XOUT executables
# will be allocated "lcall LDT" anyway. ABI_ELFMARK=N
# Enable conflict-free mapping of inode numbers in a short inode environment ABI_SHINOMAP=Y
# Enable "/proc/abi" support ABI_PROC=Y
-----------------------------------

CONFdla ibcs-3_8.tgz - przykładowy plik CONF do pobrania

5) wykonujemy make
sprawdzamy czy wszystko dział‚a:
abi_ldr
abi_uld

6) tworzymy skrypt startowy:
/etc/init.d/abi (abi - do pobrania)

(nadajemy mu prawa wykonywania)

----------------------------------
#!/bin/sh
# This script will start/stop the linux abi modules
# You could place this in your /etc/rc.d/rcX.d directory (where X=runlevel)
# So that the A.B.I. will be automatically started/stopped for you
# You should obviously do this before any programs need the ABI
# I put my name and version here so that any changes made can be updated
# Feel free to use this script with no restrictions, except no charging for the
# script itself (as if you would!)
#

# Authors : Malcolm A. Hussain-Gambles,William C.House
# Date : 23 July 2002
# Version : 0.04
# Version 0.01 - Malcolm E. Gambles
# First Draft
# 0.02 - William C. House
# Ease maintenence of this program
# put needed modules in an ordered list
# which will then drive the loading/removing of the modules
# modules should be removed in LIFO order
# LIFO (Last In, First Out) is an accounting inventory valuation method.
# In other words, remove in reverse order installed.
# first field is for ordering, second field is name of module.
# 0.03 - Malcolm Amir Hussain-Gambles [ 22nd July 2002 ]
# Added a section specifically for SCO, you will have to
# write another script to start this as it needs to be called:
# ./script SCO start, or you could change the OS_ABI="ALL" to
# OS_ABI="SCO"
# 0.04 - Malcolm Amir Hussain-Gambles [ 23nd July 2002 ]
# Fix Programming errors! So script should actually work!
# Notes :
# N.B. Note this is a work in progress!
# binfmt_aout is needed to run the xenix and other 286 binaries,
# [ and is not part of the linux-abi itself ]
# via the x86emul executable, availiable via the iBCS2 package from
# ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/ibcs-2.1-981105.tar.gz
# ( or the a.out binary from http://linux-abi.sourceforge.net/patches/x286emul )
# If you don't need any of the modules you should obviously comment them out

if [ ! -z $2 ]
then
action=$2
OS_ABI=$1
else
# Default to load ALL of the ABI modules
# Change this next line to OS_ABI="SCO" if you wish only to support SCO
OS_ABI="SCO"
action=$1
fi


full_mod_list="01 abi-util\n
02 lcall7\n
03 abi-svr4\n
04 abi-isc\n
05 abi-cxenix\n
06 abi-sco\n
07 abi-ibcs\n
08 abi-uw7\n
09 binfmt_coff\n
10 binfmt_xout\n
11 binfmt_aout\n"

# Module List for SCO-OpenServer 5
# Could apply to other SCO OS (NOT XENIX THOUGH)

sco_mod_list="01 abi_util\n
02 abi_lcall\n
03 binfmt_coff\n
04 abi_svr4\n
05 abi_cxenix\n
06 abi_sco\n"

# With proper terminfo file compiled (at386b) and term variable set,
# The above list seems to work with Microsoft Foxpro for Unix
# Still working on lyrix and Procalc

# See how we were called

case "$action" in
start)
if [ "$OS_ABI" == "SCO" ]
then
echo -n "Starting Linux A.B.I. for SCO:"
echo -e $sco_mod_list | sort -n |
while read $line var1 mod_name
do
if [ ! -z "$mod_name" ]
then
insmod /lib/modules/2.6.18-5-686/kernel/abi/$mod_name.ko
fi
done
else
echo -n "Starting Linux A.B.I.:"
echo -e $full_mod_list | sort -n |
while read $line var1 mod_name
do
if [ ! -z "$mod_name" ]
then
insmod $mod_name
fi
done
fi ;;
stop)
if [ "$OS_ABI" == "SCO" ]
then
echo -n "Stopping Linux A.B.I. for SCO: "
echo -e $sco_mod_list | sort -rn |
while read $line var1 mod_name
do
if [ ! -z "$mod_name" ]
then
rmmod $mod_name
fi
done
else
echo -n "Stopping Linux A.B.I.: "
echo -e $full_mod_list | sort -rn |
while read $line var1 mod_name
do
if [ ! -z "$mod_name" ]
then
rmmod $mod_name
fi
done
fi ;;
*)
echo "*** Usage: abi [SCO] (start|stop)"
exit 1 ;;
esac
exit 0
----------------------------------------

7) kopiujemy odpowiednie moduł‚y:
cp /usr/src/abi/util/abi_util.ko /lib/modules/2.6.18-5-686/kernel/abi/
cp /usr/src/abi/lcall/abi_lcall.ko /lib/modules/2.6.18-5-686/kernel/abi/

cp /usr/src/abi/svr4/abi_svr4.ko /lib/modules/2.6.18-5-686/kernel/abi/

cp /usr/src/abi/cxenix/abi_cxenix.ko /lib/modules/2.6.18-5-686/kernel/abi/

cp /usr/src/abi/sco/abi_sco.ko /lib/modules/2.6.18-5-686/kernel/abi/

cp /usr/src/abi/coff/binfmt_coff.ko /lib/modules/2.6.18-5-686/kernel/abi/

8) utworzyć‡ linki symboliczne w /etc/rcX.d:
np. ln -s /etc/init.d/abi /etc/rc2.d/S99abi lub poleceniem

update-rc.d abi defaults 99