* SunOS/Solaris Binary Emulation
@ 2007-12-06 16:39 Wes Hardin
2007-12-06 17:32 ` Jan Engelhardt
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Wes Hardin @ 2007-12-06 16:39 UTC (permalink / raw)
To: sparclinux
I'm interested in trying out the Linux kernel's SunOS and/or Solaris Binary
Emulation but I can't find any documentation that is either recent or complete.
I have scads of Ultra60s lying around, so I loaded up Debian 4.0 on it. I
choose Debian over Ubuntu in this case because Ubuntu doesn't seem to support
SPARCs as desktops, only servers. I want to evaluate how this compares to our
Solaris 8 desktops at some point.
manhack:/usr/gnemul/solaris/bin# cat /proc/cpuinfo
cpu : TI UltraSparc II (BlackBird)
fpu : UltraSparc II integrated FPU
prom : OBP 3.31.0 2001/07/25 20:31
type : sun4u
ncpus probed : 2
ncpus active : 2
D$ parity tl1 : 0
I$ parity tl1 : 0
Cpu0Bogo : 900.58
Cpu0ClkTck : 000000001ad33148
Cpu2Bogo : 900.14
Cpu2ClkTck : 000000001ad33148
MMU Type : Spitfire
State:
CPU0: online
CPU2: online
It's a pretty basic load. While not too familiar with Debian in general,
during the install, I select the Default/Basic load + Desktop component, that
is to say not a DNS or mail server or anything else fancy. 817 packages
installed.
manhack:/usr/gnemul/solaris/bin# /bin/uname -a
Linux manhack 2.6.18-5-sparc64-smp #1 SMP Wed Oct 3 04:16:38 UTC 2007 sparc64
GNU/Linux
I've copied some libraries and very basic binaries from a Solaris 8 system,
which is also a U60, to /usr/gnemul/solaris/{original path} and loaded the
solaris.ko kernel module.
manhack:~# lsmod|grep solaris
solaris 57880 0
manhack:~# modinfo solaris
filename:
/lib/modules/2.6.18-5-sparc64-smp/kernel/arch/sparc64/solaris/solaris.ko
author: Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak
(prak3264@ss1000.ms.mff.cuni.cz)
description: Solaris binary emulation module
license: GPL
vermagic: 2.6.18-5-sparc64-smp SMP mod_unload gcc-4.1
depends:
Now what?
Any attempt to run a Solaris binary results in the following:
manhack:/usr/gnemul/solaris/bin# file ./uname
./uname: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically
linked (uses shared libs), stripped
manhack:/usr/gnemul/solaris/bin# ./uname
-bash: ./uname: No such file or directory
I don't know if the Linux ldd is supposed to work on these binaries, but it
doesn't:
manhack:/usr/gnemul/solaris/bin# ldd ./uname
/usr/bin/ldd: line 117: ./uname: No such file or directory
Running "/lib/ld-linux.so.2 --list" against the Solaris binary segfaults. I
would assume that is bad.
manhack:~# /lib/ld-linux.so.2 --list /usr/gnemul/solaris/bin/uname
Segmentation fault
From the Solaris machine (cds3), I ldd the binary I copied and verify all the
libraries are on the Linux host:
whardin@cds3 / $ cksum /bin/uname
2504107844 6772 /bin/uname
whardin@cds3 / $ ldd /bin/uname
libc.so.1 => /lib/libc.so.1
libdl.so.1 => /lib/libdl.so.1
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
manhack:~# cksum /usr/gnemul/solaris/bin/uname
2504107844 6772 /usr/gnemul/solaris/bin/uname
manhack:~# ls /usr/gnemul/solaris/lib
/usr/gnemul/solaris/usr/platform/SUNW,Ultra-60/lib/
/usr/gnemul/solaris/lib:
ld.so libc.so.1 libdl.so.1 libmp.so.2 libsecdb.so.1
libcmd.so.1 libcurses.so.1 libgen.so.1 libnsl.so.1
/usr/gnemul/solaris/usr/platform/SUNW,Ultra-60/lib/:
libc_psr.so.1
I'm stumped. I feel like I just missed a simple step somewhere, but haven't a
clue what. Anyone have any pointers or troubleshooting advice? I've
installed the libc6-dbg package but have no idea how to make use of it.
--
/* wes hardin */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SunOS/Solaris Binary Emulation
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
@ 2007-12-06 17:32 ` Jan Engelhardt
2007-12-06 18:15 ` Wes Hardin
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2007-12-06 17:32 UTC (permalink / raw)
To: sparclinux
On Dec 6 2007 10:39, Wes Hardin wrote:
>
> manhack:/usr/gnemul/solaris/bin# file ./uname
> ./uname: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked
> (uses shared libs), stripped
> manhack:/usr/gnemul/solaris/bin# ./uname
> -bash: ./uname: No such file or directory
>
> I don't know if the Linux ldd is supposed to work on these binaries, but it
> doesn't:
>
> manhack:/usr/gnemul/solaris/bin# ldd ./uname
> /usr/bin/ldd: line 117: ./uname: No such file or directory
I suppose you need the Solaris libraries too, including dynamic
linker. See output of `readelf -d uname`.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SunOS/Solaris Binary Emulation
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
2007-12-06 17:32 ` Jan Engelhardt
@ 2007-12-06 18:15 ` Wes Hardin
2007-12-06 18:38 ` Pieter D.J. Krul
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Wes Hardin @ 2007-12-06 18:15 UTC (permalink / raw)
To: sparclinux
assuming I'm reading the output of readelf correctly, the only shared library
mentioned is libc.so.1
manhack:/usr/gnemul/solaris# readelf -d bin/uname
Dynamic section at offset 0x14b8 contains 22 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libc.so.1]
which is already copied over.
manhack:/usr/gnemul/solaris# ls lib/libc.so.1
lib/libc.so.1
Checksums match:
manhack:/usr/gnemul/solaris# cksum lib/libc.so.1
1414919188 1158072 lib/libc.so.1
whardin@cds3 / $ cksum /lib/libc.so.1
1414919188 1158072 /lib/libc.so.1
--
/* wes hardin */
Jan Engelhardt wrote:
> On Dec 6 2007 10:39, Wes Hardin wrote:
>> manhack:/usr/gnemul/solaris/bin# file ./uname
>> ./uname: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked
>> (uses shared libs), stripped
>> manhack:/usr/gnemul/solaris/bin# ./uname
>> -bash: ./uname: No such file or directory
>>
>> I don't know if the Linux ldd is supposed to work on these binaries, but it
>> doesn't:
>>
>> manhack:/usr/gnemul/solaris/bin# ldd ./uname
>> /usr/bin/ldd: line 117: ./uname: No such file or directory
>
> I suppose you need the Solaris libraries too, including dynamic
> linker. See output of `readelf -d uname`.
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SunOS/Solaris Binary Emulation
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
2007-12-06 17:32 ` Jan Engelhardt
2007-12-06 18:15 ` Wes Hardin
@ 2007-12-06 18:38 ` Pieter D.J. Krul
2007-12-06 19:57 ` Wes Hardin
2007-12-06 22:31 ` Jan Engelhardt
4 siblings, 0 replies; 6+ messages in thread
From: Pieter D.J. Krul @ 2007-12-06 18:38 UTC (permalink / raw)
To: sparclinux
Jan Engelhardt wrote:
>> manhack:/usr/gnemul/solaris/bin# ldd ./uname
>> /usr/bin/ldd: line 117: ./uname: No such file or directory
>
> I suppose you need the Solaris libraries too, including dynamic
> linker. See output of `readelf -d uname`.
I tend to agree. All SunOS and Solaris binaries, libraries and devicefiles are by default expected
to exist in /usr/gnemul/sunos and/or /usr/gnemul/solaris.
I've scribbled a few things on this topic some time ago, which should have become a sort of
faq/howto at that time. You can find this on http://www.krul.cc/~pkrul/docs/solemu/
HTH
Pieter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SunOS/Solaris Binary Emulation
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
` (2 preceding siblings ...)
2007-12-06 18:38 ` Pieter D.J. Krul
@ 2007-12-06 19:57 ` Wes Hardin
2007-12-06 22:31 ` Jan Engelhardt
4 siblings, 0 replies; 6+ messages in thread
From: Wes Hardin @ 2007-12-06 19:57 UTC (permalink / raw)
To: sparclinux
Pieter,
yours was one of the pages I was looking at. I just overlooked the
suggestion to copy all the libraries and binaries as I have limited diskspace
right now.
I was pointed to a tarball of an old RedHat package called solemul, apparently
from the days when they supported SPARC.
This package includes a skeleton for /usr/gnemeul/solaris (including /dev) and
a list of files needed from Solaris. Using this basic file list, Solaris's
uname now executes it seems, but dies with "Illegal Instruction". This seems
to be par for any Solaris binary I try.
So I bit the bullet, increased my LVM volume and copied the entire /usr/lib
and /usr/bin from Solaris to my Linux machine. No change.
So far I've copied /usr/lib, /usr/bin, /sbin, /usr/sbin, /usr/platform from
Solaris. Anything else?
I guess I should mention that I'm copying from Solaris 8, if I haven't
already. Is Solaris 8 too new? I think I have a Solaris 7 and a few Solaris
2.6 machines left.
Pieter D.J. Krul wrote:
> Jan Engelhardt wrote:
>>> manhack:/usr/gnemul/solaris/bin# ldd ./uname
>>> /usr/bin/ldd: line 117: ./uname: No such file or directory
>> I suppose you need the Solaris libraries too, including dynamic
>> linker. See output of `readelf -d uname`.
>
> I tend to agree. All SunOS and Solaris binaries, libraries and devicefiles are by default expected
> to exist in /usr/gnemul/sunos and/or /usr/gnemul/solaris.
>
> I've scribbled a few things on this topic some time ago, which should have become a sort of
> faq/howto at that time. You can find this on http://www.krul.cc/~pkrul/docs/solemu/
>
> HTH
>
> Pieter
--
/* wes hardin */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SunOS/Solaris Binary Emulation
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
` (3 preceding siblings ...)
2007-12-06 19:57 ` Wes Hardin
@ 2007-12-06 22:31 ` Jan Engelhardt
4 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2007-12-06 22:31 UTC (permalink / raw)
To: sparclinux
On Dec 6 2007 12:15, Wes Hardin wrote:
>
> assuming I'm reading the output of readelf correctly, the only shared library
> mentioned is libc.so.1
>
> manhack:/usr/gnemul/solaris# readelf -d bin/uname
>
> Dynamic section at offset 0x14b8 contains 22 entries:
> Tag Type Name/Value
> 0x00000001 (NEEDED) Shared library: [libc.so.1]
>
> which is already copied over.
Hm, perhaps ld.so (which should definitely exist on any ELF system)
is not listed by readelf, but I guess it's needed anyway.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-06 22:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 16:39 SunOS/Solaris Binary Emulation Wes Hardin
2007-12-06 17:32 ` Jan Engelhardt
2007-12-06 18:15 ` Wes Hardin
2007-12-06 18:38 ` Pieter D.J. Krul
2007-12-06 19:57 ` Wes Hardin
2007-12-06 22:31 ` Jan Engelhardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.