A fair bit of this, the m68k core dump and exec goo, can probably be
made into a generic m68k hpux module, eventually.
More to be placed in hpux_machdep.c - keep your eyes peeled...
emulate Ultrix termio/termios instead. Ultrix termio c_cc has separate
VMIM/VTIME attributes, and the Ultrix termios c_cc is a strict
superset of Ultrix termio c_cc. The termios-only c_cc indices are
all changed, relative to SunOS.
using a NetBSD kernel in an ultrix root filesystem.
Move wait emulation to the old (v7) wait syscall number, as that's
what the Ultrix ufs_mount binary uses.
limit the number of FDs to select on to the maximum supported by NetBSD --
which is as many FDs as the emul_ultrix process can have open, anyway.
Add emulation of Ultrix getmnt(2) in ultrix_fs.c
Add partial emulation of Ultrix tty ioctl()s in ultrix_ioctl.c, derived
from compat/sunos/sunos_ioctl.c. Ultrix libc's ``isatty()'' now works
in compat_emul processes.
limit the number of FDs to select on to the maximum supported by NetBSD --
which is as many FDs as the emul_ultrix process can have open, anyway.
Add emulation of Ultrix getmnt(2) in ultrix_fs.c
Add partial emulation of Ultrix tty ioctl()s in ultrix_ioctl.c, derived
from compat/sunos/sunos_ioctl.c. Ultrix libc's ``isatty()'' now works
in compat_emul processes.
* It compiles (and links).
* Make use of "/emul/hpux" where applicable.
* Untangle a bit, pulling some funtions from the monolithic
hpux_compat.c into hpux_file.c, hpux_exec.c, etc.
* Fix a couple of bugs.
Yet to do:
* Move hp300-specific functions into hp300/hp300/hpux_machdep.c.
* Make everything work properly (you laugh...)
These changes are sufficient to run some simple HP-UX 9.x executables,
including ls(1) (which will read password and group information from the
YP server correctly, albeit slowly), a simple "hello world", uname(1),
and a few other odds and ends. Dynamically linked executables work, and
demand-paging _seems_ to work properly. Major problems:
* socket and/or signal handling appears to need some work yet.
* 99% sure I didn't do exactly the right thing adjusting for the
fact that "kstack" is gone now.
* ktrace(1)'ing some executables (HP-UX telnet(1) is what I tried)
causes the HP-UX executable to dump core with a SIGSEGV for an
as of yet unknown reason.
This is mostly meant as a checkpoint/snapshot, to make it easier for others
to track progress on this code, and hack on it themselves. It's certainly
better off now than before.