LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-30-2010, 07:31 AM   #1
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Rep: Reputation: 0
Binary of UNIX on Linux


I know of a patch to emulate unix binaries in Linux called ABI. But I have no tutorial or step by step to help me use this patch.
I use SuSE Linux server10
please help

thank you very much
 
Old 06-30-2010, 07:45 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Welcome to LQ.

Sorry I do not understand your question.

As far as I know ABI stands for Application Binary Interface and is a way for two binary (or compiled) applications or libraries to communicate with each other.

What are the "unix binaries" you want to "emulate" on SuSE ?
 
1 members found this post helpful.
Old 06-30-2010, 01:41 PM   #3
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Oracle 7 on Linux

Dear Mr. Didier Spai:
first excuse my English.
actually what I need is to run old applications that were designed for UNIX (SCO) example: Oracle 7, but I want to run on Suse Linux 10.

this is what I need.

Now, on the other hand, I know of a patch ABI (Application Binary Interface) which is used to allow UNIX applications to run which are not compatible with Linux. The big problem that is not how to use the ABI.
That is why I ask you to help me with some documentation on that topic.

thank you very much and again apologize for the inconvenience
 
Old 06-30-2010, 02:22 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Dear jsmithOracle,

no need to excuse your English, mine is certainly worst, my mother tongue being French

And I apologize, you were right: a patch for the Linux kernel called linux-abi does exist to be able to run UNIX binaries on a machine running Linux.

I saw that for instance here and another repository there.

Patching a kernel is not very difficult but we should first know what is you kernel version in order to determine which patch to apply as several are available.

So please provide the output of the "uname -a" command.

Last edited by Didier Spaier; 07-01-2010 at 01:43 AM.
 
1 members found this post helpful.
Old 06-30-2010, 02:40 PM   #5
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
2.6.16

this is what you asked me

2.6.16.60-0.21-smp 2008 x86_64 x86_64 x86_64 GNU / Linux
 
Old 06-30-2010, 03:28 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Then may be you could try to follow this, as it seems to be the patch version best matching your kernel version, at least among the ones I could find there.

I can't guarantee this will work of course.

In any case be careful and keep a backup of your kernel as it is.

Good luck.

Please note that the referenced patch is not for exactly the same kernel version you have ; it *could* work though. You will have to adapt the instructions in the first link provided accordingly anyhow.

Last edited by Didier Spaier; 06-30-2010 at 03:32 PM.
 
1 members found this post helpful.
Old 07-01-2010, 07:36 AM   #7
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
I will try what you gave me.

thank you very much my friend. anything I write to tell the final results
 
Old 07-02-2010, 02:06 PM   #8
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
The documentation tells me:

4) Apply the patch - as mentioned above, I do this to
the /usr/src directory so patch updates from SuSE will be
applied against the ABI patched kernel sources.

# cd /usr/src/linux
# patch -p1 -l -i ../linux-abi-2.6.16.21-SUSE.diff

Review the progress messages and look for any Failed hunks
- hopefully you won't have any. If you do, something's gone
wrong and you need to figure out what went wrong and fix it
- for any failed hunks there will be a .rej and a .orig file
created for the file whose patch failed to help you figure out
where the failure occured.

But when I run the command line, it returns this to me:

linx:/usr/src/linux # patch -p1 -l -i ../linux-abi-2.6.16.21-SUSE.diff

patching file abi/cxenix/Makefile
patching file abi/cxenix/misc.c
...............................
.......**Summing up**...........
...............................
patching file abi/wyse/sysent.c
patching file abi/wyse/syslocal.c
patching file arch/i386/Kconfig

Hunk #1 succeeded at 793 (offset 72 lines).*** first Failed hunks???***

patching file arch/i386/kernel/entry.S

Hunk #1 succeeded at 124 (offset 1 line).***second Failed hunks*****

patching file arch/i386/kernel/i386_ksyms.c
patching file arch/i386/kernel/lcall7.c
patching file arch/i386/kernel/Makefile
patching file arch/i386/kernel/traps.c

Hunk #1 FAILED at 62. ***??This is the first Failed hunks or the third Failed hunks????****
Hunk #2 succeeded at 783 (offset -14 lines).
Hunk #3 succeeded at 1137 with fuzz 1 (offset -28 lines).
Hunk #4 succeeded at 1210 with fuzz 1 (offset -46 lines).
1 out of 4 hunks FAILED -- saving rejects to file arch/i386/kernel/traps.c.rej

patching file arch/ia64/ia32/ia32priv.h
patching file arch/parisc/kernel/signal.c
...............................
.......**Summing up**...........
...............................
patching file fs/binfmt_xout.c
patching file fs/exec.c

Hunk #1 succeeded at 1273 (offset 27 lines). ***another hunks***

patching file fs/Kconfig.binfmt
patching file fs/Makefile

Hunk #1 succeeded at 21 (offset 1 line).***another hunks***

patching file fs/pipe.c
patching file fs/readdir.c
...............................
.......**Summing up**...........
...............................
patching file include/asm-parisc/processor.h
patching file include/linux/fs.h

Hunk #1 succeeded at 1726 (offset 49 lines).***another hunks***

patching file include/linux/major.h
patching file include/linux/personality.h
patching file include/linux/xout.h
patching file include/net/sock.h
patching file init/main.c

Hunk #1 FAILED at 48.***another hunks***
1 out of 1 hunk FAILED -- saving rejects to file init/main.c.rej

patching file kernel/exec_domain.c
patching file kernel/fork.c

Hunk #1 succeeded at 1648 (offset 8 lines).***another hunks***

patching file kernel/Makefile
patching file kernel/syscall_ksyms.c
patching file Makefile

Hunk #2 succeeded at 542 (offset 6 lines).
Hunk #3 succeeded at 558 (offset 6 lines).
Hunk #4 succeeded at 588 (offset 6 lines).

patching file net/socket.c

These are files .rej

i386/kernel/traps.c.rej

***************
*** 62,67 ****
#include "mach_traps.h"

asmlinkage int system_call(void);
#ifdef CONFIG_KDB
asmlinkage int kdb_call(void);
#endif /* CONFIG_KDB */
--- 62,71 ----
#include "mach_traps.h"

asmlinkage int system_call(void);
+
+ asmlinkage void lcall7(void);
+ asmlinkage void lcall27(void);
+
#ifdef CONFIG_KDB
asmlinkage int kdb_call(void);
#endif /* CONFIG_KDB */

init/main.c.rej

***************
*** 48,53 ****
#include <linux/mempolicy.h>
#include <linux/key.h>
#include <linux/delayacct.h>

#include <asm/io.h>
#include <asm/bugs.h>
--- 48,54 ----
#include <linux/mempolicy.h>
#include <linux/key.h>
#include <linux/delayacct.h>
+ #include <linux/hrtimer.h>

#include <asm/io.h>
#include <asm/bugs.h>

What am I doing badly?
 
Old 07-02-2010, 02:10 PM   #9
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
you told me

" You will have to adapt the instructions in the first link provided accordingly anyhow."

I can not find that I have adapted my version of kernel
 
Old 07-02-2010, 02:55 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
So, seems like something did go wrong ...

This is probably because the patch doesn't fit with your kernel.

I had the same problem trying the same patch against a 2.6.16.21 kernel downloaded from kernel.org.

Then I tried patching a 2.6.24 kernel instead with the patch linux-abi-2.6.24 and it worked.

So you could try to do that, if you know how to compile a kernel.

You will find the 2.6.24 source kernel here and the patch there (again, the link is on this page)

Be aware that as SUSE use patched kernel, you won't benefit of kernel updates from SUSE using the patched kernel - and this could void you warranty.

Hope this helps though.

PS Feel free to write me in Spanish or French if you prefer

Last edited by Didier Spaier; 07-02-2010 at 03:25 PM.
 
Old 07-02-2010, 03:35 PM   #11
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Entonces usted me dice que:

Al SUSE que tengo ahora, le compile este nuevo kernel que usted me esta dando y que después le aplique el parche ABI para 2.16.24.
¿Qué era lo que usted me explicaba acerca de “could void you warranty”?
 
Old 07-02-2010, 04:10 PM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I was only a joke, don't worry. But keep the kernel from SUSE somewhere, just in case something go wrong.
 
Old 07-02-2010, 04:24 PM   #13
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Usted no tiene ningún manual por el cual me pueda guiar para compilar el nuevo kernel que me dio.

Si me pudiera dar los pasos que siguió para poner el parche de ABI
 
Old 07-02-2010, 05:06 PM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Just follow the same steps as indicated here, only download the new kernel source first and change the name of the patch.

In short (as root):
Code:
cd /usr/src
wget http://www.kernel.org/pub/linux/kern...2.6.24.tar.bz2
tar xjf linux-2.6.24.tar.bz2
Then download the patch in /usr/src and do what follows:
Code:
bunzip linux-abi-2\[1\]\[1\].6.24.diff.bz2
cd linux-2.6.24
patch -p1 -l -i ../linux-abi-2.6.24.diff
Then configure and compile and install the patched kernel.

Last edited by Didier Spaier; 07-02-2010 at 05:07 PM.
 
Old 07-02-2010, 05:39 PM   #15
jsmithOracle
LQ Newbie
 
Registered: Jun 2010
Posts: 16

Original Poster
Rep: Reputation: 0
thank you very much my friend for all

I will prove that you gave me and I tell you when something
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Compiling Perl Into Binary Code On Linux And Unix. Cool, But... LXer Syndicated Linux News 0 04-14-2009 03:00 PM
LXer: Unix - System VI Release Notes - More Linux and Unix Humor LXer Syndicated Linux News 0 12-06-2008 03:30 PM
LXer: Converting PI To Binary - More Linux/Unix Humor LXer Syndicated Linux News 0 09-27-2008 03:00 PM
LXer: Converting Binary Numbers To Decimal The Hard Way On Linux Or Unix LXer Syndicated Linux News 0 07-15-2008 07:11 AM
how to copy binary files using Unix API's rohanak Programming 5 05-09-2008 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration