Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* em86 on 2.2.7kernel?
@ 1999-05-11  4:00 Stephan Witz
  1999-05-12  4:00 ` donaldlf
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Witz @ 1999-05-11  4:00 UTC (permalink / raw)


Howdy,

anybody out there ported em86 to a 2.2 kernel system? I'm trying
to compile it on my RH 6.0 164SX and running into a fair amount of 
`header-fu' (includes have moved around a bit/been restructured 
since 2.0.35). I'm guessing I can hack my way through it in time,
but if somebody else has cut a trail allready I'd much rather travel
that way.

|  "I used to be with `it', but then they changed what `it' was.  |
|   now what I'm with isn't `it', and what `it' is is weird and   |
|   scary." _The Simpsons_      | Stephan Witz, switz@nrao.edu    |



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: em86 on 2.2.7kernel?
  1999-05-11  4:00 em86 on 2.2.7kernel? Stephan Witz
@ 1999-05-12  4:00 ` donaldlf
  0 siblings, 0 replies; 2+ messages in thread
From: donaldlf @ 1999-05-12  4:00 UTC (permalink / raw)
  To: switz

In article <3ju2tjcip2.fsf@dunsel.aoc.nrao.edu>,
  Stephan Witz <switz@dunsel.aoc.nrao.edu> wrote:
> Howdy,
>
> anybody out there ported em86 to a 2.2 kernel system? I'm trying
> to compile it on my RH 6.0 164SX and running into a fair amount of
> `header-fu' (includes have moved around a bit/been restructured
> since 2.0.35). I'm guessing I can hack my way through it in time,
> but if somebody else has cut a trail allready I'd much rather travel
> that way.
>
> |  "I used to be with `it', but then they changed what `it' was.  |
> |   now what I'm with isn't `it', and what `it' is is weird and   |
> |   scary." _The Simpsons_      | Stephan Witz, switz@nrao.edu    |
>



Hello,
  I am currently working on upgradeing em86 to support the new systems
but I am still working.
What I have done:
  - Fix compile problems.
  - compiles under the new glibc 2.1 also
Problems:
  - em86 breaks under the new kerenl.
  - Quake 2 dosen't work.
  - Wine dosen't work.

Debug messages ( some I had laying around )

From Quake 2:
[14343] SYSCALL: old_mmap(0x7cfff7d0 )
=> mmap(0x0, 8192, 0x3, 0x22, -1, 0)
   ....returns 0x40100000
[14343] SYSCALL: lseek(6 166109184 0 )
   ....returns 0x9e6a000
[14343] SYSCALL: read(6 0x40100000 8192 )
   ....returns 0x2000
[14343] SYSCALL: read(6 0x40100000 8192 )
   ....returns 0x2000
[14343] SYSCALL: read(6 0x40100000 8192 )
   ....returns 0x2000
[14343] SYSCALL: read(6 0x40100000 8192 )
   ....returns 0x2000
[14343] SYSCALL: read(6 0x40100000 8192 )
   ....returns 0x2000
[14343] SYSCALL: lseek(6 -7313 1 )
   ....returns 0x9e7236f
[14343] SYSCALL: close(6 )
   ....returns 0x0
[14343] SYSCALL: munmap(0x40100000 8192 )
   ....returns 0x0
Signal 11 received

Netscape 3.04
[8472] SYSCALL: old_mmap(0x7cffe568 )
=> mmap(0x0, 8192, 0x3, 0x22, -1, 0)
   ....returns 0x40016000
[8472] SYSCALL: ioctl(13 21505 0x7cffe570 )
[8472] SYSCALL: gettimeofday(0x7cffe3c4 0x0 )
   ....returns 0x0
   ....returns 0x0
[8472] SYSCALL: lseek(13 0 1 )
   ....returns 0xffffffe3
[8472] SYSCALL: close(2 )



Resolution:
  It appears the problems is in the memory unamapping.


My Plans:
  -Get em86 to run netscape, acrobat, applix then
  -release 4.1
  -support quake2
  -release 4.2
  -support  libc. glibc 2.1
  -release 5.0
  -support wine
  -release 5.1



If anyone cares to help send me email.


donaldlf@cs.rose-hulman.edu







diff -r -C 3 em86-0.4/Makefile em86-0.4.new/Makefile
*** em86-0.4/Makefile   Thu Jan 29 16:04:10 1998
--- em86-0.4.new/Makefile       Sun Apr  4 01:30:12 1999
***************
*** 1,5 ****
  PROFILE =
! CFLAGS = -g -O0 -w -I. $(PROFILE) -DEM86_RUNTIME # -DRH_40 -DVERBOSE
  ifeq ($(wildcard /usr/x86/include/fx_*.h),/usr/x86/include/fx_cpu.h)
  FX_CFLAGS = $(CFLAGS) -I/usr/x86/include -DUSE_FX_CPU
  else
--- 1,5 ----
  PROFILE =
! CFLAGS = -g -O0 -w -I. $(PROFILE) -DEM86_RUNTIME  -Wall# -Wa,-mev56
-DRH_40 -DVERBOSE
  ifeq ($(wildcard /usr/x86/include/fx_*.h),/usr/x86/include/fx_cpu.h)
  FX_CFLAGS = $(CFLAGS) -I/usr/x86/include -DUSE_FX_CPU
  else
***************
*** 10,16 ****
  # CRTDIR = /usr/lib/gcc-lib/alpha-linux/2.7.2
  CRTDIR = /usr/lib
  # GCCLIBDIR = $(CRTDIR)
! GCCLIBDIR = /usr/lib/gcc-lib/alpha-linux/2.7.2.1

  THUNK_OBJS = brk.o exit.o mmap.o stat.o personality.o ioctl.o open.o \
                getrusage.o time.o execve.o utime.o llseek.o ftime.o \
--- 10,16 ----
  # CRTDIR = /usr/lib/gcc-lib/alpha-linux/2.7.2
  CRTDIR = /usr/lib
  # GCCLIBDIR = $(CRTDIR)
! GCCLIBDIR = /usr/lib/gcc-lib/alpha-linux/egcs-2.91.66

  THUNK_OBJS = brk.o exit.o mmap.o stat.o personality.o ioctl.o open.o \
                getrusage.o time.o execve.o utime.o llseek.o ftime.o \
***************
*** 102,108 ****
        cp FX_EM486/linux486.idx /usr/x86/linux486.idx
        cp libc-assist/libc-assist.so /usr/x86/lib/libc-assist.so
  endif
!

  clean:
        rm -f *.o em86 fx_em86 bx_em86 glibc_version glibc_version.h
mark_32bit .depend
--- 102,108 ----
        cp FX_EM486/linux486.idx /usr/x86/linux486.idx
        cp libc-assist/libc-assist.so /usr/x86/lib/libc-assist.so
  endif
!

  clean:
        rm -f *.o em86 fx_em86 bx_em86 glibc_version glibc_version.h
mark_32bit .depend
diff -r -C 3 em86-0.4/getdents.c em86-0.4.new/getdents.c
*** em86-0.4/getdents.c Fri Jan 23 13:03:02 1998
--- em86-0.4.new/getdents.c     Sun Apr  4 01:32:49 1999
***************
*** 23,37 ****
      char *tmpbuf;
      char *cp;
      struct dirent *dp;
!     int retval;
      int remainder;
      int byte_count;

      /* Allocate a temporary buffer */
      cp = tmpbuf = (char *)malloc(count);

      /* Scoop up some dirents */
!     retval = __getdents(fd, tmpbuf, count);

      /* Bail out if error */
      if(retval == -1) {
--- 23,41 ----
      char *tmpbuf;
      char *cp;
      struct dirent *dp;
!     ssize_t  retval; /* int */
      int remainder;
      int byte_count;
+     off_t basep =0;

      /* Allocate a temporary buffer */
      cp = tmpbuf = (char *)malloc(count);

      /* Scoop up some dirents */
!     /* ssize_t getdirentries(int fd, char *buf, size_t nbytes , off_t
*basep);*/
!
!     /*    retval = getdirentries(fd, tmpbuf, count);*/
!     retval = getdirentries(fd, tmpbuf, count,&basep);

      /* Bail out if error */
      if(retval == -1) {
diff -r -C 3 em86-0.4/glibc_version.c em86-0.4.new/glibc_version.c
*** em86-0.4/glibc_version.c    Fri Jan 23 13:03:02 1998
--- em86-0.4.new/glibc_version.c        Sun Apr  4 11:41:43 1999
***************
*** 3,10 ****
--- 3,15 ----
  main()
  {
      unsigned int maj, min, rev;
+     char     version[255];

      maj = min = rev = 0;
+     /*
+     sprintf(version,"%s",gnu_get_libc_version());
+     sscanf(&version, "%d.%d.%d", &maj, &min, &rev);
+     */
      sscanf(&__libc_version, "%d.%d.%d", &maj, &min, &rev);
      printf("/* This file is automatically generated.  DO NOT
EDIT!*/\n\n");
      printf("#ifndef _GLIBC_VERSION_H_\n#define _GLIBC_VERSION_H_\n");
diff -r -C 3 em86-0.4/ioctl.c em86-0.4.new/ioctl.c
*** em86-0.4/ioctl.c    Fri Jan 23 13:03:02 1998
--- em86-0.4.new/ioctl.c        Sat Apr  3 18:35:32 1999
***************
*** 24,31 ****
--- 24,34 ----
  /* NOTE: the __KERNEL__ defines below are needed to get some of the
structures
   * and typedefs from deep in the system */

+
+ #include <asm/current.h>
  #include <ioctl_thunk.h>
  #define __KERNEL__
+ #include <linux/route.h>
  #include <linux/kdev_t.h>
  #include <linux/wait.h>
  #include <asm/semaphore.h>
diff -r -C 3 em86-0.4/ioctl_list.c em86-0.4.new/ioctl_list.c
*** em86-0.4/ioctl_list.c       Fri Jan 23 13:03:02 1998
--- em86-0.4.new/ioctl_list.c   Sun Apr  4 01:11:31 1999
***************
*** 11,18 ****
--- 11,20 ----
   */


+ #include <asm/current.h>
  #include <ioctl_thunk.h>
  #define __KERNEL__
+ #include <linux/route.h>
  #include <linux/kdev_t.h>
  #include <linux/wait.h>
  #include <asm/semaphore.h>
***************
*** 40,47 ****
  #include <ioctls.h>
  #endif
  #include <linux/soundcard.h>
- #include <linux/ucdrom.h>
- #include <linux/sbpcd.h>

  bitmask_transtbl iflag_tbl[] = {
          { X86_IGNBRK, X86_IGNBRK, IGNBRK, IGNBRK },
--- 42,47 ----
***************
*** 405,413 ****
--- 405,418 ----
    { X86_SIOCDARP, SIOCDARP, "SIOCDARP", do_struct_ioctl, _IOC_WRITE,
arpreq_list },
    { X86_SIOCSARP, SIOCSARP, "SIOCSARP", do_struct_ioctl, _IOC_WRITE,
arpreq_list },
    { X86_SIOCGARP, SIOCGARP, "SIOCGARP", do_struct_ioctl, _IOC_READ,
arpreq_list },
+   /* Lost the definition for these so I hard coded it
    { X86_OLD_SIOCDARP, OLD_SIOCDARP, "OLD_SIOCDARP", do_struct_ioctl,
_IOC_WRITE, arpreq_old_list },
    { X86_OLD_SIOCSARP, OLD_SIOCSARP, "OLD_SIOCSARP", do_struct_ioctl,
_IOC_WRITE, arpreq_old_list },
    { X86_OLD_SIOCGARP, OLD_SIOCGARP, "OLD_SIOCGARP", do_struct_ioctl,
_IOC_READ, arpreq_old_list },
+   */
+   { X86_OLD_SIOCDARP, 0x8950, "OLD_SIOCDARP", do_struct_ioctl,
_IOC_WRITE, arpreq_old_list },
+   { X86_OLD_SIOCSARP, 0x8952, "OLD_SIOCSARP", do_struct_ioctl,
_IOC_WRITE, arpreq_old_list },
+   { X86_OLD_SIOCGARP, 0x8951, "OLD_SIOCGARP", do_struct_ioctl,
_IOC_READ, arpreq_old_list },
    { X86_SIOCDRARP, SIOCDRARP, "SIOCDRARP", do_struct_ioctl,
_IOC_WRITE, arpreq_list },
    { X86_SIOCSRARP, SIOCSRARP, "SIOCSRARP", do_struct_ioctl,
_IOC_WRITE, arpreq_list },
    { X86_SIOCGRARP, SIOCGRARP, "SIOCGRARP", do_struct_ioctl, _IOC_READ,
arpreq_list },
diff -r -C 3 em86-0.4/mmap4k.c em86-0.4.new/mmap4k.c
*** em86-0.4/mmap4k.c   Fri Jan 23 13:03:02 1998
--- em86-0.4.new/mmap4k.c       Sat Apr  3 18:19:01 1999
***************
*** 99,121 ****
        first = 0;
        f &= ~MAP_ANONYMOUS;
      }
!     if(f & MAP_HASSEMAPHORE) {
!       sprintf(s, "%sMAP_HASSEMAPHORE ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~MAP_HASSEMAPHORE;
      }
!     if(f & MAP_INHERIT) {
!       sprintf(s, "%sMAP_INHERIT ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~MAP_INHERIT;
      }
!     if(f & MAP_UNALIGNED) {
!       sprintf(s, "%sMAP_UNALIGNED ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~MAP_UNALIGNED;
      }
      if(f & MAP_GROWSDOWN) {
        sprintf(s, "%sMAP_GROWSDOWN ", first ? "" : "| ");
--- 99,121 ----
        first = 0;
        f &= ~MAP_ANONYMOUS;
      }
!     if(f & _MAP_HASSEMAPHORE) {
!       sprintf(s, "%s_MAP_HASSEMAPHORE ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~_MAP_HASSEMAPHORE;
      }
!     if(f & _MAP_INHERIT) {
!       sprintf(s, "%s_MAP_INHERIT ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~_MAP_INHERIT;
      }
!     if(f & _MAP_UNALIGNED) {
!       sprintf(s, "%s_MAP_UNALIGNED ", first ? "" : "| ");
        strcat(tmpstr, s);
        first = 0;
!       f &= ~_MAP_UNALIGNED;
      }
      if(f & MAP_GROWSDOWN) {
        sprintf(s, "%sMAP_GROWSDOWN ", first ? "" : "| ");
diff -r -C 3 em86-0.4/socket.c em86-0.4.new/socket.c
*** em86-0.4/socket.c   Fri Jan 23 13:03:02 1998
--- em86-0.4.new/socket.c       Sat Apr  3 18:44:03 1999
***************
*** 4,15 ****
  #include <sys/types.h>
  #include <syscall_thunk.h>
  #include <errno.h>
- #ifdef REDHAT_4
  #include <sys/socket.h>
- #endif
  #include <linux/net.h>
  #include <linux/un.h>
  #include <linux/in.h>

  extern FILE * x86_logfile;
  extern int x86_trace_current_syscall;
--- 4,15 ----
  #include <sys/types.h>
  #include <syscall_thunk.h>
  #include <errno.h>
  #include <sys/socket.h>
  #include <linux/net.h>
+ typedef unsigned short   sa_family_t;
  #include <linux/un.h>
  #include <linux/in.h>
+ #include <linux/uio.h>

  extern FILE * x86_logfile;
  extern int x86_trace_current_syscall;



--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-05-12  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-11  4:00 em86 on 2.2.7kernel? Stephan Witz
1999-05-12  4:00 ` donaldlf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox