cks@hawkwind.utcs.toronto.edu (Chris Siebenmann) (01/25/91)
I know that this undoubtedly far far far out in left field, but does anyone have a port of the DMD 5620 software (32ld, 3cc, etc) that runs on an Ultrix DECStation or Vaxen? I'm not concerned about the kernel modifications (if any) necessary; we're source licensed and we have an idea for how to get around the J* ioctls anyways. I'm looking for working versions of 32ld, 3cc, and so on. Starting from the source code from the V8 tape (yes, we're licensed for that), I've managed to get a version that will download the one standalone program binary I have (gebaca, the arcade game), but that can't download and have work main() { exit(); } I've done some mangling of 3ld so that it generates what looks like the right byte-mangled entry point, but it doesn't want to allocate any space for stacks. When I tried relocating the stacks to various theoretically out-of-the-way places, it still blows up nicely. I can compile layers/mux application binaries that compare identical to the binary files I have (well, apart from the <censored> timestamp). I'd try the same test with gebaca except I don't have source for it. The DMD 5620 I'm testing on has the 8;7;5 ROMs. If anyone has patches, entire software distributions, or even hints they'd be very gratefully appreciated. Thanks in advance. -- V9: the kernel where you can do fgrep <something> */*.[ch] and not get "Arguments too long". cks@hawkwind.utcs.toronto.edu ...!{utgpu,utzoo,watmath}!utgpu!cks
barrett@jhunix.HCF.JHU.EDU (Dan Barrett) (01/26/91)
In article <1991Jan24.235646.28577@jarvis.csri.toronto.edu> cks@hawkwind.utcs.toronto.edu (Chris Siebenmann) writes: > I know that this undoubtedly far far far out in left field, but does >anyone have a port of the DMD 5620 software (32ld, 3cc, etc) that runs >on an Ultrix DECStation or Vaxen? We did it. Here's a summary that I saved. This was done on an Ultrix 2.0 VAX 8530. The actual files are not easily accessible so I can't send them. ---------------------------------------------------------------------------- Files modified (backups in brackets): /usr/src/local/DMD/mpx/mpx.c [mpx.c.orig?] /usr/src/sys/sys/tty_pty.c [tty_pty.c.orig] /usr/src/sys/data/tty_pty_data.c [tty_pty_data.c.orig] /usr/sys/data/tty_pty_data.c [tty_pty_data.c.orig] /usr/sys/BINARY.vax/tty_pty.o [tty_pty.o.orig] /usr/sys/CRABCAKE/tty_pty.o linked to ../BINARY.vax/tty_pty.o (not really a change...) /vmunix [/vmunix.orig] Files added: /usr/src/sys/h/jioctl.h Here is the way things went... 1) We took a copy of the current tty_pty.c and added the DMD stuff using #ifdef DMD/#endif's. Nothing exiting in the driver was changed, we only added more code. In particular we added the flag for PF_DMD, some initialization in ptyopen() and some new ioctl flags in ptyioctl(). We also had to add a field to the tty structure, but because of the way Ultrix is set up for binary, that info is in the tty_pty_data.c 2) We modified tty_pty_data.c. Besides the change to the structure we also had it include the jioctl.h file (which we took from the DMD/mpx/uts/sys or io directory). We put the jioctl.h file in /usr/src/sys/h. We also put the #define DMD 1 in this file. 3) The data files appear also in /usr/sys/data, so we copied it there. 4) Now we had to make the system. We did the config, make depend and make vmunix. However, the make is geared for the binary distribution so it didn't realize that the tty_pty.c had to be re-compiled. We went to the /usr/src/sys/sys directory and tried to do a make, but it was looking for ../BINARY.vax files or something else that was in the /usr/sys directory. After trying lots of things, we finally just made a symbolic link of /usr/sys/sys <==> /usr/src/sys/sys. Then we did a "make tty_pty.c", then did the normal vmunix stuff and it all worked. We moved /vmunix to /vmunix.orig, installed the new vmunix, did a shutdown -r and it all seemed to work. (Before we put the new vmunix in we did a shutdown -r to see if the auto-reboot would work.) 5) Then we went to work on mpx. It worked the first time except that it didn't add the user to the utmp file (the ttyxx!mpx entry). What it turns out happended is that the mpx code had the format for the OLD style /etc/ttys built in and on Ultrix the ttys file is a new format. We hacked the code from ttyslot and put it into mpx and everybody was happy. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////