All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wes Hardin <wes.hardin@dalsemi.com>
To: sparclinux@vger.kernel.org
Subject: SunOS/Solaris Binary Emulation
Date: Thu, 06 Dec 2007 16:39:51 +0000	[thread overview]
Message-ID: <475825D7.1090209@dalsemi.com> (raw)

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 */

             reply	other threads:[~2007-12-06 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06 16:39 Wes Hardin [this message]
2007-12-06 17:32 ` SunOS/Solaris Binary Emulation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475825D7.1090209@dalsemi.com \
    --to=wes.hardin@dalsemi.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.