Linux-Development-Sys Digest #416, Volume #6     Sat, 20 Feb 99 09:15:01 EST

Contents:
  Re: No More CD Music with 2.2.1 (Olav Woelfelschneider)
  Re: sco functions and primitives 2 linux kernel space ("Christoph Goos")
  Problem with getting information from ethernet (Guillaume Proux)
  Re: Get ethernet address (Philip Rademakers)
  Re: SMP in linux - is there LOCKING mechanisms??? (Tom Gallagher)
  Re: GCC wont find libraries in /usr/lib (Andreas Schwab)
  Dell WS designer wants to know... (James Crouchet)
  Re: ATAPI  ZIP drive problem.... (Thomas Joynt)
  Re: OpenGL for Linux and problems with kernel compatibility (AudioPCI people, also 
read) ([EMAIL PROTECTED])
  Is there any Sys-Programming-HowTo? (Eugen Dueck)
  Re: Modest next goal for Linux (Thomas Boroske)
  gcc: How to switch off alignment? (Norman Beran)
  Re: 2.2.1: strange SMP (dual celeron) startup msgs (BL)
  Linking externals w/ ld on GNU/Linux (Brent Anderson)
  Re: 2.2.1: strange SMP (dual celeron) startup msgs ("Bjorn Wesen")
  Re: memcpy from process to process in module (Dave Platt)
  GammaTech Mall (Blue Moon Consulting)

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

From: Olav Woelfelschneider <[EMAIL PROTECTED]>
Subject: Re: No More CD Music with 2.2.1
Date: Thu, 18 Feb 1999 07:45:24 +0100

Douglas Jerome <[EMAIL PROTECTED]> wrote:
DJ> I have a Sound Blaster 16.  It is xmixer that acts different
DJ> between my kernels (2.0.34 works fine and 2.2.1 is broken).

I would suggest that it's xmixer that's "broken". That is, it is not aware
that 2.2.1 acts a little bit different.

I once wrote xmixer and xplaycd, but don't have time to maintain it anylonger.

I don't even run 2.2.x yet.

-- 
Olav "Mac" Wölfelschneider                         [EMAIL PROTECTED]
PGP fingerprint = 06 5F 66 B3  2A AD 7D 2D  B7 19 67 3C  95 A7 9D AF
Mer muß doch nur emol e bissje nochdenke. -- Mundstuhl

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

From: "Christoph Goos" <[EMAIL PROTECTED]>
Subject: Re: sco functions and primitives 2 linux kernel space
Date: Fri, 19 Feb 1999 07:25:43 GMT

Just the ones I can find/remember right now:

>
> void    bcopy( void *, void *, int );
> void    bzero( void *, int );
memcpy, memset
>
> void    sptfree( caddr_t, int, int );
> unsigned char *svirtophys( void * );
> unsigned char *ktop( void * );
kfree, virt_to_bus/virt_to_phys
>
> int     copyin( void *, void *, int );
> int     copyout( void *, void *, int );
copy_from_user, copy_to_user

> void    iomove( void *, int, int );
probably replaceable by copy_from_user, copy_to_user

> void    panic( caddr_t );
panic
>
> int     suword( caddr_t, int );
copy_to_user


Christoph Goos <[EMAIL PROTECTED]> http://www.syskonnect.de
SysKonnect - The Server Connectivity Company

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

Date: Tue, 16 Feb 1999 09:26:07 +0100
From: Guillaume Proux <[EMAIL PROTECTED]>
Subject: Problem with getting information from ethernet

Hi,

I have tried to get the MAC address from an interface (like eth0)
using no trick from 'ifconfig | grep'

I have found a struct device in the kernel that is used in
a dev_ioctl

I tried to use it but when I compiled it I got an error.

When I include

#include <linux/netdevice.h>

I have a compilation error while performing the pre-processing

In file included from /usr/include/linux/device.h
/usr/local/include/if.h:120: parse error before caddr_t


But i don't find anything funny in this header file!

Any help?

        Guillaume

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

From: Philip Rademakers <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,alt.os.linux,comp.os.linux.networking
Subject: Re: Get ethernet address
Date: Fri, 19 Feb 1999 10:13:26 +0100

[EMAIL PROTECTED] wrote:
> 
> Hi!
> 
> Does anybody know how to get the ethernet address of a network card in a C
> program on Linux? I have code that does it on Solaris but unfortunately all
> the header files needed aren't there on Linux.
> 
> Thanks.
> 

Try the following ( pasted this from a C++ program so there are probably
a couple of includes too much for you ...). The code fetches the address
of interface "eth0". The result is in a 6-byte buffer.

#include <sys/socket.h>
#include <stdlib.h>
#include <iostream.h>
#include <net/if_arp.h>
#include <stdio.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <ioctls.h>
#include <string.h>
#include <unistd.h>

    unsigned char ethernetAddress[6];
    int fd;
    struct ifreq ifr;
    if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
      perror("socket");
      exit(1);
    }
    strcpy(ifr.ifr_name, "eth0");
    if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
      perror("ioctl");
      exit(1);
    }
    close(fd);
    bcopy(ethernetAddress, ifr.ifr_hwaddr.sa_data, 6);

-- 
Philip Rademakers                                Tel: +32 2 724 86 81 
SONY Digital Network Solutions Europe - Brussel  
Sint Stevens Woluwestraat 55                     Fax: +32 2 726 26 86
1130 Brussels - Belgium         
Email: mailto:[EMAIL PROTECTED]      
WWW: http://www.sonycom.com

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

From: Tom Gallagher <[EMAIL PROTECTED]>
Subject: Re: SMP in linux - is there LOCKING mechanisms???
Date: Fri, 19 Feb 1999 14:25:18 +0000
Reply-To: [EMAIL PROTECTED]

[EMAIL PROTECTED] wrote:

> hi,
>
>  i want to make my driver code Multi-Processor safe.
>  Based on what i could gather from the net, Linux does support
>  some locking mechanisms, am i right?
>

Yes

>
>  But i could not get what those calls are exacty from any site?
>  Could somebody help me out?
>

Look in Documentation/spinlock.txt
and include/asm/spinlock.h

>From Tom



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

From: Andreas Schwab <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer
Subject: Re: GCC wont find libraries in /usr/lib
Date: 19 Feb 1999 12:05:37 +0100

Jaakko Paakkonen <[EMAIL PROTECTED]> writes:

|> # ln -s /lib/libc.so.6 /lib/libc.so

Don't do that!  Read the FAQ.

2.23.   I just upgraded my Linux system to glibc and now I get
        errors whenever I try to link any program.

{ZW} This happens when you have installed glibc as the primary C library but
have stray symbolic links pointing at your old C library.  If the first
`libc.so' the linker finds is libc 5, it will use that.  Your program
expects to be linked with glibc, so the link fails.

The most common case is that glibc put its `libc.so' in /usr/lib, but there
was a `libc.so' from libc 5 in /lib, which gets searched first.  To fix the
problem, just delete /lib/libc.so.  You may also need to delete other
symbolic links in /lib, such as /lib/libm.so if it points to libm.so.5.

-- 
Andreas Schwab                                      "And now for something
[EMAIL PROTECTED]                      completely different"
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (James Crouchet)
Subject: Dell WS designer wants to know...
Date: Thu, 18 Feb 1999 08:56:39 GMT

A friend of mine who designs workstations for Dell asked me some 
questions about what is supported in Linux, including what is 
supported in the new kernel (2.2). I wrote a paper that answered most 
of his questions, but a few were beyond me. Of course, I thought I'd 
ask you guys.

I have been telling this guy about Linux for a while, and he really 
likes what he has seen so far. Of course, if he could run it on the 
workstations he designs, that would be great. Anyway, here are his 
questions:

---Begin--->
Here are the chips I am wodering if Linux supports: Intel 82371 
(PIIX4E - PCI to ISA/IDE accelerator), Intel 82093 (IOAPIC), Intel 
82440GX (440GX - CPU to memory/AGP/PCI controller) Pentium II Xeon.  

>From my understanding, the BIOS should be setting up these chips and 
the OS shouldn't need to do anything to them. However, I believe that 
Windows has drivers for them as they exist in the PCI space. There 
may be an issue there. I recall a couple of times that Windows was 
having problems because it didn't have support for the PIIX. I 
believe that it still ran so I don't know what the issue was.

Problem with the 440GX was that it could support 2GB of 100MHz SDRAM. 
Windows 95 could only see 768MB of RAM. It couldn't use that much, 
but it could see it. I do remember that if you loaded in more than 
768MB that it reported insufficient memory and wouldn't run. MS 
issued a fix. Windows NT had no real trouble as I recall. What is the 
max real memory for Linux?   

The other thing the 400GX does is allow for dual processor operation.

Xeon is nifty as it has a cache as fast as the CPU. 450MHz CPU = 
450MHz L2 cache up to 2MB in size. Good for servers and speedy 3D 
raytrace rendering.

<---End---

Thanks!

James Crouchet - [EMAIL PROTECTED]



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

From: Thomas Joynt <[EMAIL PROTECTED]>
Subject: Re: ATAPI  ZIP drive problem....
Date: Fri, 19 Feb 1999 04:26:33 -0800

Julian Robert Yon wrote:

> Carlos Antunes dos Santos wrote:
>
> > The problem is not in the ZIP disks, I've used it with
> > other ZIP drives
> >  (internal scsi) in linux with no problems.
> >
> > Is it a hardware problem? I don't think so, in
> > windows98 it works fine.
>
> I've had (what appears to be) the same problem. A zip disk can work fine
> in a ppa zip drive under linux and windows, and in an atapi zip under
> win98, but not in an atapi zip under linux - neither on the same (win98)
> machine, nor on another, dedicated linux box.
>
> Again, the partition table comes up as junk and the disk is unreadable.
> Until I take it back to one of the other set-ups, that is. So I would
> say it's not the hardware, and it's not the media. So it's probably the
> driver.
>
> It might be relevant that both the ATAPI drives I tried were connected
> to PIIX4 interfaces on a 440BX motherboard as well.
>
> Julian
>
> ~~~~~~~~~~~~~~~~~~~~
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]

Did you guys read the postings in the thread above? (about mounting the 4th
partition)

Try "mount -t msdos /dev/hdx4 /mnt/zip"
If that doesn't work (changing the x to whatever dev your zip is, of
course), check your BIOS to make sure that "Zip" or "superfloppy" support
is turned OFF. It dosn't make any sense, but that's the way it is. Thats
the most common BX users have had. I feel fortunate to have an LX for once.
:)

-- Tom


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

From: [EMAIL PROTECTED]
Subject: Re: OpenGL for Linux and problems with kernel compatibility (AudioPCI people, 
also read)
Date: 19 Feb 1999 08:17:01 -0500


IIRC, you need to use Dev3Dfx-2.5 or newer rather than Device3Dfx-1.1
with kernel 2.2.x.  I forget where I the SRPM from but you can
probably find a pointer in the news://news.3dfx.com/3dfx.glide.linux
newsgroup. 

Hope this helps.

--erik evensen
  harvard biophysics

[EMAIL PROTECTED] (Michael Gilfix) writes:

>       Here's what's up: I've been trying to explore the possiblities
> of installing OpenGL for my 3Dfx card on my machine but encountered
> several difficulties: Unfortunately, it's not compatible with my
> kernel: I've had to run v2.2.1 so that I can have the drivers for my
> sound card (An audioPCI card). But, it seems that pci specifications
> for the new kernel have been changed. That presents problems with
> 3Dfx which relies on certain pci calls. I tried changing the code
> but still had problems. So here's what I'm wondering: Will 3Dfx ever
> be included as part of the Linux kernel? Everybody pretty much has a
> 3D card these days and it would open new graphic possibilities up to
> Linux. Also, how can I somehow get a more stable kernel
> running.. say 2.0.36 but also get the AudioPCI (I've searched for
> the drivers but with no luck). I figure that's the only way I'll get
> OpenGL up and running on my system...  Would be nice if the next
> kernel release was a little more comprehensive..

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

From: Eugen Dueck <[EMAIL PROTECTED]>
Subject: Is there any Sys-Programming-HowTo?
Date: Sat, 20 Feb 1999 12:40:25 +0100

Hi Folks!

Yesterday I got the Savage3D-DataBook by S3. They REALLY sent it from
the USA to germany (some months after I requested it).

Now I want to do some programming with it, but all I did before
(regarding sys-programming) was real-mode vga programming (mode x...).

Now I need to now what is BDI (Burst Command Interface) and how to do it
with linux and some other docs about memory-mapped i/o ... would help me
a lot.

If anyone has some docs or a GOOD link, please send it to me!
Thanks

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

From: Thomas Boroske <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Modest next goal for Linux
Date: 20 Feb 1999 01:50:25 +0100

Konrad Mierendorff <[EMAIL PROTECTED]> writes:

> Liang-Shing Ng wrote:
> 
> > Is it possible to achieve my modest requirement of "guanranteed limited
> > time response" in X window? i.e. When my Netscape started swapping, I
> > want my cursor can still be responsive and move on to other windows and
> > do some things.
> 
> I don't know if it really improves your system, but you could change the
> priority for kswapd. (It just a suggestion - I never tried that)
> But anyway, you cannot use your other applications effectively while
> netscape or another programm is swapping.

And why is that so ? The only likely explanation I could ever come up with 
is that because the X server tends to consume quite a large part of 
your memory (53.6 % in my case) it will also be the top contender 
when it comes to swapping pages out.
If these pages are needed when you move the mouse, drag windows etc, 
thing´s won´t go smoothly. 

Apart from that, swapping shouldn´t affect applications that aren´t *directly* 
affected by it much. Same for other disc I/O.

All IMHO and AFAIK.


Kind regards,

-- 
Thomas Boroske

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

From: Norman Beran <[EMAIL PROTECTED]>
Subject: gcc: How to switch off alignment?
Date: Sat, 20 Feb 1999 13:09:25 +0100

I am reading an unsigned char array from a file and then I map an struct
on this array. But that doens't work when gcc does data-alignment.
The program ran under dos and there I could write:

#pragma option -a-              /* word aligment switched off */

typedef struct
{  unsigned char draw_x;
   unsigned char draw_y;
   unsigned char planes;                         
   unsigned char bit_pro_Pixel;
}vesamodusinfo;

#pragma option -a.             /* Word aligment switched on */

How do I switched it off when I use the gcc?
Exists there a pragma or an commandline switch?

Thanks for help!
Norman

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

From: BL <[EMAIL PROTECTED]>
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Date: 18 Feb 1999 23:28:51 GMT
Reply-To: no.spambots.please

Bill Anderson <[EMAIL PROTECTED]> wrote:

: With duals, try -j3.
: I get an avg. of 3:24 with dual 300P2, 256MB ram, UWSCSI on "make -j3
: bzlilo".

on my dual celery (450mhz * 2):

        make -j2: 1:53.89
        make -j3: 1:53.86

ie, no diff at all.


-- 
AntiSpam: For email, change all 'zero' chars to letter 'o' chars.

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

From: Brent Anderson <[EMAIL PROTECTED]>
Subject: Linking externals w/ ld on GNU/Linux
Date: Thu, 18 Feb 1999 23:35:08 GMT

I have a GNU ld relocatable application (filesys.o) from which I need
to intercept all the "stat ()" OS calls.  I need to link my "stat ()"
calls to the normal Linux OS library.  Then I need to link all the
"stat" calls in this relocatable application to the "stat" function in
my module.

I separated the functions into two links.  The first one links my
XSTAT calls to the OS library.  The second one links the relocatable
binary stat calls to MYMOD as listed below:

--Linux OS Library-----  FIRST LINK STARTS HERE
  printf
  fopen
  stat
. 
. 
. 
--xstat.c--------------
int _xstat(…)
{
 return stat(…);
}


--mymod.c--------------  SECOND LINK STARTS HERE
int stat(…)
{
 return xstat(…);
}
--filesys.o------------
. 
. 
. 
  err = stat (…);
. 
. 
. 

I tried many different ways, but I cannot keep the "stat ()" calls in
filesys.o from linking directly to the OS.  I thought something like
the following would work, but it does not:

gcc -c -o xstat.o xstat.c
ld -r -o temp_stat.o xstat.o -lgcc
gcc -c -o mymod.o mymod.c
ld -o mymod mymod.o temp_stat.o

I even tried putting temp_stat.o into an archive library, but I must
still be doing something wrong. I have been all through the ld
documentation.

Does anyone have any examples of how to do this?




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

From: "Bjorn Wesen" <[EMAIL PROTECTED]>
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Date: Fri, 19 Feb 1999 21:14:56 +0100

Remember that the P2's L2 cache is only half the speed of the Celerons, so a
celeron at the same MHZ will beat the p2 in most cases (dual-speed cache is
better than 4-times as big cache for most normal applications).

That's why there's such a rush for 300a-128kb cache celerons since they can
run faster than a p2/450 for an eight the price :)

/Bjorn

Bill Anderson wrote in message <[EMAIL PROTECTED]>...
>> Hmmm...  2:30 seems mysteriously fast.  I get 3:28.89elapsed for
>> a "make -j2 bzImage" with dual 333 Mhz PII and an ultrawide
>> 40 Mbytes/sec SCSI disk interface.
>
>With duals, try -j3.
>I get an avg. of 3:24 with dual 300P2, 256MB ram, UWSCSI on "make -j3
>bzlilo".




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

From: [EMAIL PROTECTED] (Dave Platt)
Subject: Re: memcpy from process to process in module
Date: 19 Feb 1999 20:30:03 GMT

> I'm writing a kernel module that implements Send/Receive/Reply
> message passing similar to that of the QNX Real-Time O/S.

Another option is to set up a shared-memory pool which is mapped into
both (or all) processes' memory spaces.  This can be done using the
System V shmem features, or by using mmap() on a shared file.
Construct the messages in the shared memory area (using either
user-mode spinlocks or kernel-mode locks, or both, to avoid
contention), and use signals, or I/O to a trivially-small driver, as a
way of informing the other processes that messages are ready.

Do this right, and you may be able to go down from a two-memcopy
approach (user1->kernel, kernel->user2), bypassing entirely the QNX
approach (direct user1->user2), and go to a zero-copy message passing
system.

-- 
Dave Platt                                           [EMAIL PROTECTED]
Visit the Jade Warrior home page:  http://www.radagast.org/jade-warrior/
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!

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

From: [EMAIL PROTECTED] (Blue Moon Consulting)
Reply-To: [EMAIL PROTECTED]
Subject: GammaTech Mall
Date: Fri, 19 Feb 1999 15:11:02 GMT

FOR IMMEDIATE RELEASE:

The GammaTech Mall Grand Opening March 1st - 7th, 1999

Edmond, Oklahoma, February 21, 1999 - GammaTech, Inc., software
developer, announced today that it will open The GammaTech Mall. 

"GammaTech, Inc., has been in the software business since 1991. We are
software developers and we understand the needs and frustrations of 
the
small software developer and we understand the frustration of giving 
up
most of the profits to the marketers," said Benny Ormson, president of
GammaTech."

The GammaTech Mall will license software to the public. Software
developers are offered the opportunity to "Be a Partner" at no cost. A
flat rate fee of 15% is retained.There are no hidden charges, no setup
fees, no per transaction charges. 

Partnership in The GammaTech Mall provides many exclusive services. 
The
following may be of interest to developers:

        Cost to you is nothing.
        You set your prices, change them any time.
        Low processing rates.
        You get paid quickly.
        Orders taken from your site and/or ours.
        You get complete customer details on every sale.
        Secure SSL server with 7x24 availability.
        Attractive, easy to use web site.
        Flexible delivery options to customers.

Act now!  As an additional incentive, software developers will receive
a flat rate of 10% through March 31, 1999!  Take advantage of this
valuable discount, visit http://www.gt-mall.com and read the "Be a
Partner" then sign up to license and distribute your products through
the mall.


Visit today!  Customers will want to browse during the grand opening
and see what's in "store"!  A few of the quality services  provided:

        Online Catalog.
        Secure online ordering 7x24.
        Immediate electronic delivery of most products.
        VISA, MasterCard and American Express accepted.
        Latest pricing per vendor.
        Software available on several platforms.


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


** 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