Linux-Development-Sys Digest #386, Volume #6      Mon, 8 Feb 99 13:13:56 EST

Contents:
  how to write linux device driver (xiaodong)
  Re: K6-2 and Linux, Are there any Bug? (Hilaire Fernandes)
  Linux destroyed my DOS Filesystem (Hubertus Kehl)
  Linux destroyed my DOS Filesystem (Hubertus Kehl)
  Possible solution to Netscape freeze (Re: Modest next goal for Linux0 (Navindra 
Umanee)
  Re: K6-2 and Linux, Are there any Bug? (Mark Tranchant)
  Re: COM for Linux? (Stu)
  Re: K6-2 and Linux, Are there any Bug? ("George G")
  Re: kernel 2.2.x and ZIPdrive (Christian Uhde)
  Where to get 2.2 kernel ("Daryl Stultz")

----------------------------------------------------------------------------

From: xiaodong <[EMAIL PROTECTED]>
Subject: how to write linux device driver
Date: Mon, 08 Feb 1999 01:31:21 -0800

does anyone know a good web site where I can learn how to write linux
device drivers? please send you reply to my email, thank you very much!

--
Phillip Zhang
[EMAIL PROTECTED]




------------------------------

From: Hilaire Fernandes <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.slackware,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.setup
Subject: Re: K6-2 and Linux, Are there any Bug?
Date: Sun, 07 Feb 1999 07:41:59 +0800

> > When I install linux, the kernel load, it starts to make its uusal
> > check-in and after the PCI probe the system just reset.
> > I've almost 20 Pc where I can't install linux :(
> 
> There are plenty of people who have had no problems with that

As I do in the past, I already installed Linux over a K6, even this K6
seems to be overcocked but it was ok.

> combination, including me.  On the other hand, there are people who
> have reported the same problems as you have.  I'm not sure if there is
> a clear or common problem.  What brand of motherboards are you using?

I try installing both from floppy and CDROM and try with Redhat from
4.1, 5.1, 5.2. The problems is excatly the same.

I can't remove stuff from the PCs as there are already running W95 and
WinNT workstation, I've no authority to play with the hardware.
There is 1 GB partition free I can use for what I want - installing
Linux, but no chance.


> Have you checked to see if it is AMD certified?  Are you over-clocking
> the CPU?  Have you tried taking some memory out of the machine, or
> doing 'mem=16M'?  Have you tried a Pentium CPU?  Can you boot on a
> boot floppy?  What distribution are you installing, and have you tried
> difference kernels?
> 
> robert
> 
> --
> robert cope     austin, texas     [EMAIL PROTECTED]
> http://www.linuxwizard.net        [EMAIL PROTECTED]

-- 
Hilaire Fernandes
Dr Geo project http://members.xoom.com/FeYiLai/dr_geo/doctor_geo.html

------------------------------

From: Hubertus Kehl <[EMAIL PROTECTED]>
Subject: Linux destroyed my DOS Filesystem
Date: Mon, 08 Feb 1999 14:09:01 +0100

Linux destroyed my DOS Filesystem

It happened to me the second time. Linux destroyed my mounted DOS
C-Drive.
My System configuration is: K6-2-333, NCR 810 SCSI Controller, Kernel
2.0.36
The normal DOS-FS mounted is 2 Gig in size, it has a Clustersize of 32KB

(64 Sectors). I used Ghostscript to read a large PS file (from the DOS
FS) and write
resulting TIF files for each page onto the C-Drive.
something like
cd /dosc
gs -sOutputfile outfiles -s...  infile.ps
Afterwards some vital system areas of my Dos Partition have been
overwritten
(Boot-Sector, Format information, Main Directory ...)
Im suspecting either the Linux NCR SCSI driver or the DOS-filesystem
code in the
Linux Kernel or is it my fault by writing output of a Unix program to
DOS ?

Any hints on this problem ?

Bye Hubertus
[EMAIL PROTECTED]







------------------------------

From: Hubertus Kehl <[EMAIL PROTECTED]>
Subject: Linux destroyed my DOS Filesystem
Date: Mon, 08 Feb 1999 14:03:49 +0100

Hi Linux developers,

It happened to me the second time. Linux destroyed my mounted DOS
C-Drive.
My System configuration is: K6-2-333, NCR 810 SCSI Controller, Kernel
2.0.36
The normal DOS-FS mounted is 2 Gig in size, it has a Clustersize of 32KB

(64 Sectors). I used Ghostscript to read a large PS file (from the DOS
FS) and write
resulting TIF files for each page onto the C-Drive.
something like
cd /dosc
gs -sOutputfile outfiles -s...  infile.ps
Afterwards some vital system areas of my Dos Partition have been
overwritten
(Boot-Sector, Format information, Main Directory ...)
Im suspecting either the Linux NCR SCSI driver or the DOS-filesystem
code in the
Linux Kernel or is it my fault by writing output of a Unix program to
DOS ?

Any hints on this problem ?

Bye Hubertus
[EMAIL PROTECTED]




------------------------------

From: Navindra Umanee <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy
Subject: Possible solution to Netscape freeze (Re: Modest next goal for Linux0
Date: 25 Jan 1999 19:06:23 GMT

Tim Smith <[EMAIL PROTECTED]> wrote:
> Liang-Shing Ng <[EMAIL PROTECTED]> wrote:
>>By the way, I am using an VOP5PC (Very Old Pentium Class Personal
>>Computer) P75 with 24MB ram. Don't laugh. The guanranteed response
>>problem has to be solved, and has to be solved especially on old
>>systems! 
> 
> I'm using a PII 266 with 64 MB of RAM, and I see the cursor freeze, too.

I saw this on linux-kernel, is it relevant?  Many are reporting
success and even big speed improvements.  Those of you with libc5 or
problems should look at the archives for workarounds.

From: Stanislav Meduna <[EMAIL PROTECTED]>
Subject: Netscape buggy, kernel OK - some test results
To: [EMAIL PROTECTED]
Date:   Sat, 23 Jan 1999 16:41:03 +0100 (CET)

Hello,

as I am also a victim of the netscape freezing, I have
done some tests. I didn't follow all the discussion, so
perhaps what I write is duplicate, but I think
it is nevertheless interesting.

My environment is 2.2.0-final, Netscape 4.5, glibc 2.0.7,
egcs 1.1.1.

First I have located one html page where the Netscape
always freezes, even when loading from local disc.
In my environment such page is e.g. the main page
from developer.intel.com.

Then I have done a strace, located the pipe and counted
the reads and writes. No suprise - the lock happened
after the write count exceeded the read one by 4096.
The write then blocked.

So I have written a small LD_PRELOAD library, which
overloaded pipe, read and write, added some detection
logic for the given pipe and started experimenting.
I have modified the write so that it fakes successfull
write if the pipe is full. The Netscape still
did not run, but this time the blocking call
was read.

Then I counted the faked writes and faked the
corresponding reads too. The Netscape runs without
problems now and the number of reads matches
the number of reads at the end of the run.
The maximal difference between writes and
reads was 17011!

I tried to return EWOULDBLOCK from the excessive
writes - this did not help and I got blocking
read - the thing does want the same number
of reads and writes.

So the situation is quite clear. Kernel is OK,
and the Netscape is buggy, as it reads and writes
without querying if it is possible and cannot live
with limited pipe buffer size. I am unable to guess
how complicated it would be to allow greater pipes,
but it is most probably not the right thing to do
(_POSIX_PIPE_BUF is 512 anyway).

I'll try to polish my hack a bit - seems like
it can help more people.


Regards
                                Stano                       

From: Stanislav Meduna <[EMAIL PROTECTED]>
Subject: Re: Netscape buggy, kernel OK - some test results
To: [EMAIL PROTECTED]
Date:   Sat, 23 Jan 1999 19:00:24 +0100 (CET)

> I'll try to polish my hack a bit - seems like
> it can help more people.

Those who have problem with freezing netscape,
please try the following code. If it helps, we
are sure that the kernel is not the problem.

It works for me with 2.2.0-final and Netscape 4.5,
I have not tested it very carefully and I don't
guarantee it works anywhere else.

Thanks
                        Stano

========
#include <dlfcn.h>
#include <unistd.h>
#include <limits.h>

/* This is a netscape bug workaround. Search for a pipe,
   where only 1 byte strings \0372 are written to the write
   end and only 1 byte strings are requested back. Count
   the difference and fake any writes that would cause
   an overflow of the pipe and corresponding reads.

   This is a really dirty hack with almost no error checking
   and relying on the netscape's behaviour.

   Compile with
     gcc -c nspipepatch.c
     ld -shared -o libnspipepatch.so -ldl nspipepatch.o

   and add
     LD_PRELOAD=<path>/libnspipepatch.so

   to your netscape starting script.

   (C) 1999 Stanislav Meduna <[EMAIL PROTECTED]>
   There is absolutely NO WARRANTY. The use and distribution
   is completely free
*/

/* The magic netscape char flowing through the pipe */
#define MAGIC ((unsigned char) '\372')

/* libc handle for dlsym */
static void *dlhdl=0;

/* pointers to overloaded functions */
static int (*pipe_fp)(int [2])=0;
static ssize_t (*write_fp)(int, const void *, size_t)=0;
static ssize_t (*read_fp)(int, void *, size_t)=0;
static int (*close_fp)(int)=0;

/* we keep the info about our descriptors here */
static struct nshack_pipe_t
{
  /* If this is a pipe that could be our one,
     mark both ends here. If we shouldn't touch
     the descriptor, enter -1 here
  */
  int read_end, write_end;

  /* The difference between writes and reads,
     maintained on the write end
  */
  int diff;

  /* Number of faked writes, maintained on the write end */
  int faked;
} fdflags[256];


/* Mark the descriptors as unused or not of our interest */
static void clearfd(int fd)
{
  fdflags[fd].read_end = fdflags[fd].write_end = -1;
  fdflags[fd].diff = fdflags[fd].faked = 0;
}

/* Clear both ends */
static void clearboth(int fd)
{
  int rd = fdflags[fd].read_end;
  int wr = fdflags[fd].write_end;

  if (rd >= 0)
    clearfd(rd);
  if (wr >= 0)
    clearfd(wr);
}

/* Init the pointers to overloaded functions */
static void initptrs()
{
  int i;

  dlhdl = dlopen("/lib/l    exit(99);

  pipe_fp  = dlsym(dlhdl, "pipe");
  write_fp = dlsym(dlhdl, "write");
  read_fp  
    exit(99);

  for (i=0; i < sizeof(fdflags)/sizeof(fdflags[0]); i++)
    clearfd(i);
}

/* Unload the library */
void _fini()
{
  if (dlhdl)
    dlclose(dlhdl);
}

/* Overloaded pipe - mark the fresh pipes */
int pipe(int fd[2])
{
  int res;

  if (! pipe_fp)
    initptrs();

  res = (*pipe_fp)(fd);

  if (! res)
  {
    /* This could be our pipe - watch it during read/write */
    fdflags[fd[0]].read_end  = fdflags[fd[1]].read_end = fd[0];
    fdflags[fd[0]].write_end = fdflags[fd[1]].write_end= fd[1];
    fdflags[fd[0]].diff      = fdflags[fd[1]].faked = 0;
  }

  return res;
}

/* Overloaded write */
ssize_t write(int fd, const void *buf, size_t cnt)
{
  int res=0;

  if (! write_fp)
    initptrs();
  if (cnt != 1 || *(unsigned char *)buf != MAGIC)
    clearboth(fd); /* This is not our pipe - magic not seen */

  if (fd == fdflags[fd].write_end)
  {
    /* This is the write end of a watched pipe */
    fdflags[fd].diff++;

    /* Play safe - reduce the allowed difference
       to guard against off-by-one errors and
       similar :-)
    */
    if (fdflags[fd].diff >= PIPE_BUF-64)
    {
        /* We fake the write */
        fdflags[fd].faked++;
        res = 1;
    }
    else
      res = (*write_fp)(fd, buf, cnt);
  }
  else
    res = (*write_fp)(fd, buf, cnt);

  return res;
}

/* Overloaded read */
ssize_t read(int fd, void *buf, size_t cnt)
{
  int res;
  int watch=0;

  if (! read_fp)
    initptrs();

  if (fd == fdflags[fd].read_end)
  {
    if (cnt == 1)
      watch = 1;
    else
      clearboth(fd); /* The true one always wants one char only */

    /* This is the read end of a watched pipe */
    if (watch && fdflags[fdflags[fd].write_end].faked)
    {
      /* Faked writes exist - compensate with faked reads */
      fdflags[fdflags[fd].write_end].faked--;
      fdflags[fdflags[fd].write_end].diff--;
      *((unsigned char *) buf) = MAGIC;
      return 1;
    }
  }

  /* Do the real read */
  res = (*read_fp)(fd, buf, cnt);

  if (watch && res == 1)
   {
    /* If we watch the pipe and the read was successfull,
       use the read value to make sure this is THE pipe.
    */
    if (*((unsigned char *) buf) == MAGIC)
      fdflags[fd].diff--;
    else
      clearboth(fd);
  }

  return res;
}

/* Overloaded close (we want to be at least a bit correct) */
int close(int fd)
{
  if (! close_fp)
    initptrs();

  if (fd == fdflags[fd].read_end || fd == fdflags[fd].write_end)
    clearboth(fd);

  return (*close_fp)(fd);
}
========

-- 
"These download files are in Microsoft Word 6.0 format.  After unzipping, 
these files can be viewed in any text editor, including all versions of 
Microsoft Word, WordPad, and Microsoft Word Viewer."  [Microsoft website]
           < http://www.cs.mcgill.ca/~navindra/editors/ >

------------------------------

From: Mark Tranchant <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.slackware,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.setup
Subject: Re: K6-2 and Linux, Are there any Bug?
Date: Mon, 08 Feb 1999 09:15:57 +0000
Reply-To: [EMAIL PROTECTED]

Put BootGUI=0 in the [Options] section of C:\MSDOS.SYS, which forces
Win95 to boot to a DOS prompt. Then use a CONFIG.SYS menu to choose
between DOS, Win95 and Linux.

Mark.

Rick Onanian wrote:
> 
> Javier Pulido wrote:
> 
> > ��SOS!!
> >
> > Problems with the booting of linux in a computer AMD K6-2 (300 MHz) with
> > i430TX (no AGP) and 128 MB, two hard drives and 1 CDROM.  Can you help me?
> >
> > After many attempts of booting with several kernels (2.0.29, 2.0.30, 2.1.48,
> > 2.0.35, 2.0.36) through a boot-disk, LILO or LOADLIN (Symbol of System,
> > option F8 of Windows95), I realize only procedure that was operating:
> >
> >     1. I Start Windows95/98 (graphic environment)
> >     2. I restart in MSDOS-Mode
> >     3. C:> loadlin zImage2_2 root=/dev/hdc3 mem=128M no-hlt
> 
> I have heard of someone who ran loadlin similar to you (boot into win, then
> restart in dos mode) and it wouldn't work.  It did work, however, if they didn't
> boot into win first - do a cold boot, and when it says starting windows 9x, hist
> the F8 key, and choose "Command Prompt Only", or even better (probably more
> likely to work:): "Safe Mode Command Prompt Only."  The latter will totally skip
> loading any piece of M$ software that's not necesary to give you a prompt.  Then
> try your loadlin...linux shouldn't have trouble throwing out M$ then..
> 
> Other possibility: Make sure your kernel supports: FAT, FAT32 (VFAT), and
> UMSDOS. All three.
> 
> Worst case scenario: boot disk. Or chop your partition, and lilo...
> 
>   rick
> 
> >
> >
> > If I don�t use option no-hlt, the system starts but is hung in little
> > minutes, and it shown me all the processor registers, the stack and the
> > message "idle task may not sleep".
> >
> > In the attempts rest of starting were remained hung when was ending the
> > load kernel in report: Loading linux ....... (!!stop!!)
> >
> > My system crashes while it�s booting.  I
> >
> > I only can boot linux in three steps:
> >
> >   1> loading Windows95
> >
> >   2> Restart in MSDOS MODE
> >   3> loadlin kernel2.2 /dev/hdc3 no-hlt       (root in /dev/hdc3)

------------------------------

From: Stu <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: COM for Linux?
Date: Mon, 08 Feb 1999 11:06:20 +0000

There is something called EntireX which allows the use of ActiveX on UNIX,
and includes DCOM. I have only heard of it but have never tried it. There is
a technical spec. at

http://www.sagafyi.com/site/solution/som/entirex/e_tech.htm

You can download it for free from somewhere, but unfortunately I can't
remember. Sorry, perhaps someone else knows more.

Aaron Perrin wrote:

> Does anyone know if a Component Object Model (COM) port is available for
> linux?
> If not, is any group or company planning or developing such a port?
>
> I'd like to work on some applications for linux that would utilize
> distributed COM
> components, and I want to know if this is possible.
>
> Thanks,
>
> Aaron Perrin
> [EMAIL PROTECTED]




------------------------------

From: "George G" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.slackware,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.setup
Subject: Re: K6-2 and Linux, Are there any Bug?
Date: 8 Feb 1999 14:27:27 GMT

> Rick Onanian wrote:
> > 
> > Javier Pulido wrote:

> > > Problems with the booting of linux in a computer AMD K6-2 (300 MHz)
with
> > > i430TX (no AGP) and 128 MB, two hard drives and 1 CDROM.  Can you
help me?

Dunno if this will help with your system, but it worked on my test-bed 486.
I installed Slackware 2.0.32 on my first HDD (1G) ages ago. It's always
been plugged in as primary master.

Then I added a couple of itsy-bitsy 165M HDDs (just for win95 stuff) as
prim slave and sec master. Modifying lilo to recognise the new drives is
well documented, so I won't go into it here.

The trick to making this setup work was physically disconnecting the linux
drive, then setting the jumpers on hdb (temporarily) to prim master while
installing Win95. Once the thing was in, I swapped jumpers to revert the
drive to prim slave. Now, when lilo boots into Win95, it simply refuses to
recognise the prim master. Instead, it treats hdb and hdc as C:\ and D:\.
Reads from the CD-ROM too. Doesn't see Linux on the prim master at all, but
that's to be expected from a Microsoft product :)

The tricky bit came when I recently added extra RAM. It appeared to confuse
the Win95 registry. I think it had to do with system files on the third
hard drive (remember, it thinks it's the second HDD under Win95, not the
actual third). In the end, I just wiped C:\ and D:\ and reinstalled. This
combination still works (at least as well as Win95 COULD be expected to
work).

George

------------------------------

From: Christian Uhde <[EMAIL PROTECTED]>
Subject: Re: kernel 2.2.x and ZIPdrive
Date: Mon, 08 Feb 1999 10:45:28 +0000

hi,

> What kind of ZIP drive is it? Parallel Port, ATAPE/IDE, or SCSI? There are
> specific things you may need to do when you're configuring your kernel to
> support your ZIP drive. (Although if it's SCSI, there's nothing to do if you
> already have a SCSI hard drive). I suggest you check the various write-ups in
> the kernel Documentation directory.

ATAPI ZIP, /dev/hdd
kernel ATAPI FLOPPY support enabled.

bye
chris.

-- 
IT Support Grp, Department of Mathematics - Bonn University
{PGP|GPG} key available - ICQ #5068320
Nature of chicken is to pass the street ... Aristoteles.

------------------------------

From: "Daryl Stultz" <[EMAIL PROTECTED]>
Subject: Where to get 2.2 kernel
Date: Mon, 8 Feb 1999 12:12:10 -0500

Hey all, could someone please post a reliable source for the 2.2 source code
(source and headers). I've looked all over and can't seem to find it. I
would prefer rpms but I'll take what I can get.

Thanks.




------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to