Subject: Some cool news
To: None <port-hp300@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-hp300
Date: 11/22/1995 18:42:40
I've been hacking on this for a few days now, and have it working well 
enough that I might as well spill the beans...

I have COMPAT_HPUX pretty much basically working in my private source 
tree.  There still several problems with it (I had to #if 0 out a bit of 
code to make it compile :-), but it's enough to run demand-paged (both 
statically and dynamically linked) HP-UX 9.x binaries "O.K.".  I've been 
using an ls(1) and a little "hello, world" program .. ls(1) even gets 
passwd/group stuff from the YP server correctly.

I tried a telnet(1) ... it .. kinda works .. behaves somewhat stangely, 
but it's dynamically linked, and was a good test of that.  I suspect the 
strange behavior is either socket or signal related; when ls(1) talks to 
the YP server, it takes a _long_ time, and telnet is complaining of 
sleep() and select(), so, we'll see.

I don't have the exec hooks for HP-UX NMAGIC executables right, yet.  
They run, but produce a bus error ... gotta track that down.

Oh, it does the "/emul/hpux" thing, too.  That's handy :-)

Anyhow, I'll be putting up test kernels sometime next week, probably.  If 
you're interested in testing, please be patient; I'm going on holidays 
for the weekend :-)

granite (thorpej) ~ 103% file ./ls.hpux
./ls.hpux: HP s200 demand-load executable -version 2
granite (thorpej) ~ 104% ./ls.hpux -l /sys/compat/hpux/
total 828
drwxr-xr-x   2 thorpej  netbsd       512 Oct  8 14:31 CVS
-rw-r--r--   1 thorpej  netbsd       597 Nov 22 01:24 files.hpux
-rw-r--r--   1 thorpej  netbsd      9370 Nov 22 00:19 hpux.h
-rw-r--r--   1 thorpej  netbsd     39683 Nov 22 20:49 hpux_compat.c
-rw-r--r--   1 thorpej  netbsd      9641 Nov 22 20:20 hpux_exec.c
-rw-r--r--   1 thorpej  netbsd      4829 Nov 22 16:43 hpux_exec.h
-rw-r--r--   1 thorpej  netbsd     19885 Nov 22 20:53 hpux_file.c
-rw-r--r--   1 thorpej  netbsd      8734 Oct  8 14:31 hpux_net.c
-rw-r--r--   1 thorpej  netbsd     11818 Nov 22 20:34 hpux_sig.c
-rw-r--r--   1 thorpej  netbsd      4248 Nov 22 20:42 hpux_syscall.h
-rw-r--r--   1 thorpej  netbsd     15890 Nov 22 20:42 hpux_syscallargs.h
-rw-r--r--   1 thorpej  netbsd     15634 Nov 22 20:42 hpux_syscalls.c
-rw-r--r--   1 thorpej  netbsd     22713 Nov 22 20:42 hpux_sysent.c
-rw-r--r--   1 thorpej  netbsd      7268 Aug  3 03:13 hpux_termio.h
-rw-r--r--   1 thorpej  netbsd     15025 Nov 22 20:52 hpux_tty.c
-rw-r--r--   1 thorpej  netbsd      1957 Nov 20 02:14 hpux_util.h
-rw-r--r--   1 thorpej  netbsd       285 Nov 22 18:10 syscalls.conf
-rw-r--r--   1 thorpej  netbsd     13604 Nov 22 20:41 syscalls.master
granite (thorpej) ~ 105% file ./hello.hpux.dynamic
./hello.hpux.dynamic: HP s200 pure executable -version 2 dynamically 
     linked not stripped
granite (thorpej) ~ 106% ./hello.hpux.dynamic
hello world, main is at 0x450.

--------------------------------------------------------------------------
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939