Re: Solaris emulation in 2.4.19
Roy Bixler <rcb@ucp.uchicago.edu> writes:
> > I haven't tried this recently, however, I think running Solaris binaries
> > from a static Solaris shell (like /sbin/sh) might help you. Solaris ls
> > did work for me on ext2.
>
> That was it and perhaps this should be part of the FAQ on
> 'ultralinux.org'. Once I copied '/sbin/sh' from Solaris, I could
> execute it on Linux. And, once inside of the Solaris 'sh' I can
> execute Linux binaries and basic Solaris binaries like 'ls' and 'cat'.
That shouldn't be necessary. Here's a minimal test on a clean Debian
Woody + 2.4.19 system with Solaris 8 stuff in gnemul. usr/bin
contains Solaris binaries:
/usr/gnemul/solaris$ $SHELL --version|head -1
GNU bash, version 2.05a.0(1)-release (sparc-unknown-linux-gnu)
/usr/gnemul/solaris$ bin/ls -l
total 34359738371
lrwxrwxrwx 1 0 0 7 Oct 7 09:08 bin -> usr/bin
lrwxrwxrwx 1 0 0 7 Oct 7 09:05 lib -> usr/lib
drwxr-xr-x 4 0 0 4096 Oct 7 09:08 usr
/usr/gnemul/solaris$ bin/ls usr
bin lib
/usr/gnemul/solaris$ bin/ls -l usr/lib
total 12953621364744
-rwxr-xr-x 1 0 0 24576 Dec 4 2001 ld.so
-rwxr-xr-x 1 0 0 196796 Dec 4 2001 ld.so.1
-r-xr-xr-x 1 0 0 1252 Jan 6 2000 lddstub
lrwxrwxrwx 1 0 0 9 Oct 7 09:12 libc.so -> libc.so.1
-rwxr-xr-x 1 0 0 1136748 Oct 7 09:00 libc.so.1
lrwxrwxrwx 1 0 0 10 Oct 7 09:12 libdl.so -> libdl.so.1
-rwxr-xr-x 1 0 0 4628 Oct 7 09:06 libdl.so.1
lrwxrwxrwx 1 0 0 11 Oct 7 09:12 libelf.so -> libelf.so.1
-rwxr-xr-x 1 0 0 157032 Dec 4 2001 libelf.so.1
/usr/gnemul/solaris$ bin/ldd bin/ls
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
There is a kernel message from running ls:
Unimplemented Solaris syscall 131 70040000 0001b7f8 00000004 00000003
which presumably isn't important, and obviously Solaris ls is confused
about directory totals on the ext3 filesystem, but basically it just
works. Note this is without anything like
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1, which truss shows
being loaded under Solaris.
[By the way, can someone say if this is a bug?
# modprobe solaris
Warning: loading /lib/modules/2.4.19/kernel/arch/sparc64/solaris/solaris.o will taint the kernel: no license
]
Reply to: