Subject: simple svr4 emul?
To: None <port-sparc@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: port-sparc
Date: 03/10/2001 01:13:38
i had this crazy idea that my sparc (dual booting netbsd 1.5S and
solaris 8) would be an easy place to set up emulation since i've
already got everything (libs, etc) that i need.

1) mount solaris file system tree under /solaris
2) mkdir /emul
3) ln -s /solaris /emul/svr4

that doesn't work.  /bin/sh gets a segv, /bin/csh gets a bus error,
and /sbin/sh runs, but dies with a sigill if i try to exit.

the /dev entries seem to be totally incompatible (i thought we were
using the same numbers as the "native"os?) so i tried this:

# mount -t union /dev /solaris/dev
# /solaris/bin/ls
data fault: pc=0xf015206c addr=0xc sfsr=326<PERR=0,LVL=3,AT=1,FT=1,FAV,OW>
panic: kernel fault
Stopped in pid 193 (ls) at      cpu_Debugger+0x4:       jmpl            [%o7 + 0
x8], %g0
db> t
mem_access_fault4m(0x0, 0x326, 0xc, 0xf622ece8, 0x1, 0xf622eea4) at mem_access_fault4m+0x308
memfault_sun4m(0x4, 0x0, 0x4, 0x100ec000, 0x4, 0xf6076100) at memfault_sun4m+0xe4
sys_mmap(0x2, 0xf608e310, 0xf622ef20, 0xf6079190, 0x4, 0x80000012) at sys_mmap+0x1a8
svr4_sys_mmap(0xf6074b10, 0x100ec000, 0xf622ef20, 0xf0187a3c, 0x0, 0x4) at svr4_sys_mmap+0x9c
syscall(0x73, 0xf622efb0, 0x1001b324, 0xf0002000, 0x0, 0x4) at syscall+0x198
_syscall(0x100ec000, 0x19a4, 0x7, 0x80000012, 0x4, 0x0) at _syscall+0xb8

hmm...

is there an easy way to do this (not that i need to...i was just
mucking around)?  oh, i have the kernel's carcass if anyone wants it.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."