Linux-Development-Sys Digest #948, Volume #7     Mon, 12 Jun 00 23:13:20 EDT

Contents:
  Kernel loadable modules... (David Steuber)
  how can i use ab program ? usage is difficult. ("hsungsoo")
  Re: how to get disk information of linux? ([EMAIL PROTECTED])
  Re: Kernel loadable modules... (Dances With Crows)
  Re: PCI utils question... (John Gluck)
  Re: Kernel loadable modules... (Pete Zaitcev)
  Re: Please Help on my Final Year Project ("Alex DeLarge")
  Re: Alan Po Again. How to start to study the KERNEL of Linux ("Alex DeLarge")
  serial terminal driver problem (robert_dev)
  usleep & threads ("David B. van Balen")
  Re: how to get disk information of linux? (Lac Hao Viet)
  Re: how can i use ab program ? usage is difficult. (John McKown)
  __P prefix in pthreads.h (Geoff Marshall)
  Re: __P prefix in pthreads.h (Peter Burka)
  Re: __P prefix in pthreads.h (Geoff Marshall)
  Re: __P prefix in pthreads.h (Peter Burka)
  Re: __P prefix in pthreads.h (Geoff Marshall)
  mmap of address below 0x1000 gives ENXIO ([EMAIL PROTECTED])
  Re: PCI utils question... (Adrian Cox)

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

Crossposted-To: comp.os.linux.misc
Subject: Kernel loadable modules...
From: David Steuber <[EMAIL PROTECTED]>
Date: Mon, 12 Jun 2000 10:59:58 GMT

I'm wondering if Linux supports the notion of loading kernel modules
that do not depend on the specific version/patch level of the kernel.

For example, suppose vendor X comes out with a piece of hardware that
the vendor wants to work with Linux.  But the vendor does not want to
distribute source code for some reason, just a binary driver.

Is it possible to create such a module that will work when the user
decides to go from kernel 2.2.14 to 2.4 or 2.3.x?

I know that this is not in the spirit of free software, but there may
be some hardware vendors that would prefer to release binary only
drivers that present a user-land API to the device.  Not having to
worry about the kernel version or the compiler that built the kernel
would be a major benefit.

I'm thinking in terms of knocking down hardware barriers of entry to
Linux.  I think the software barriers are falling, although multimedia 
is still way behind windows ( it hurts to say that ).

-- 
David Steuber   |   Hi!  My name is David Steuber, and I am
NRA Member      |   a hoploholic.

All bits are significant.  Some bits are more significant than others.
        -- Charles Babbage Orwell

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

From: "hsungsoo" <[EMAIL PROTECTED]>
Subject: how can i use ab program ? usage is difficult.
Date: Mon, 12 Jun 2000 20:59:20 +0900

hi!
i am trying to use ab for apahce bench marking.
but when i type command ab , it shows error message .

is there anybody who know exact ab usage ?

this is erro message.


Usage : ab [options] [http://]hostname[:port]/path


web]# ab -n 100 http://www.myhome.com
ab : invalid URL

web]# ab -n 100 www.myhome.com
ab : invalid URL

web]# ab -n 100 [http://]www.myhome.com
ab : No match.

have a nice day!





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

From: [EMAIL PROTECTED]
Subject: Re: how to get disk information of linux?
Date: 12 Jun 2000 05:20:13 -0700

In article <8i1kqs$1iuo$[EMAIL PROTECTED]>, "Harold" says...
 
>how to get disk information, such as=20
>partition, type, file system, etc.
 
few ways. check

fdisk -l

(as root)

Nasser


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

From: [EMAIL PROTECTED] (Dances With Crows)
Crossposted-To: comp.os.linux.misc
Subject: Re: Kernel loadable modules...
Date: 12 Jun 2000 09:35:40 EDT
Reply-To: [EMAIL PROTECTED]

On Mon, 12 Jun 2000 10:59:58 GMT, David Steuber 
<<[EMAIL PROTECTED]>> shouted forth into the ether:
>I'm wondering if Linux supports the notion of loading kernel modules
>that do not depend on the specific version/patch level of the kernel.

Yes, but see below.

>For example, suppose vendor X comes out with a piece of hardware that
>the vendor wants to work with Linux.  But the vendor does not want to
>distribute source code for some reason, just a binary driver.

"lt.o" and "pctel.o" are the most famous examples.  Bad hardware, bad
modules.

>Is it possible to create such a module that will work when the user
>decides to go from kernel 2.2.14 to 2.4 or 2.3.x?

Sure, just convince the kernel developers to stop developing!  An enormous
amount of stuff in the internals of the kernel has changed from 2.2.x to
2.3.x--devfs, USB, and the VM system, at least.  These changes are widely
considered to be improvements, or at least they will be when they stop
crashing unpredictably and/or hogging all the CPU for no reason :-)  Linux
is a moving target, one which seems to move too fast for hardware
companies to keep up.  "insmod -f" and "set kernel version info on all
modules" are the main workarounds.

For this reason, they can't expect to just throw out one binary module and
hope to keep Linux users satisfied.  The thing for them to do would be to
keep the source for their module around and grab the latest kernel source
every couple of months, then try to build their module against that source
and make it available for download/whatever as "foomodule-2.2.19.o".  This
would allow users to stay with reasonably current kernels, and allow
companies to protect their oh-so-precious intellectual property.

The chances of anyone doing this are roughly epsilon.

-- 
Matt G / Dances With Crows              \###| You have me mixed up with more
There is no Darkness in Eternity         \##| creative ways of being stupid?
But only Light too dim for us to see      \#| Beer is a vegetable.  WinNT
(Unless, of course, you're working with NT)\| is the study of cool. --MegaHAL

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

From: John Gluck <[EMAIL PROTECTED]>
Subject: Re: PCI utils question...
Date: Mon, 12 Jun 2000 10:45:19 -0400

"Paul D. Smith" wrote:

[snip]
>
> Well, there are plenty of IRQ's listed as available for PCI, if that's
> what you mean (when you say "allocated _the_ four PCI interrupts" I'm
> not sure what you're referring to).
>
> Anyway, the BIOS allows me to hardwire an IRQ to each PCI slot, so I did
> that and now everything is just ducky.
>
> Thx.
>
> --
> -------------------------------------------------------------------------------
>  Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
>  "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
> -------------------------------------------------------------------------------
>    These are my opinions---Nortel Networks takes no responsibility for them.

There are 4 "wires"  on the backplane for interrupts. I believe that's
what he's
talking about.

A common thing is to share the interrupts. This is usually done by
haveing each
device register it's interrupt handler.
The handlers are called one after another until one finally handles the
interrupt.

Essentially each handler queries the device it's a handler for to
determine if the
device caused an interrupt.


--
John Gluck  (Passport Kernel Design Group)

(613) 765-8392  ESN 395-8392

Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.

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

From: [EMAIL PROTECTED] (Pete Zaitcev)
Crossposted-To: comp.os.linux.misc
Subject: Re: Kernel loadable modules...
Date: Mon, 12 Jun 2000 16:59:13 GMT

> For example, suppose vendor X comes out with a piece of hardware that
> the vendor wants to work with Linux.  But the vendor does not want to
> distribute source code for some reason, just a binary driver.
> 
> Is it possible to create such a module that will work when the user
> decides to go from kernel 2.2.14 to 2.4 or 2.3.x?

No, it is not possible for most cases, and most systems, Linux
not being specific in any sense. For example, you cannot run
any single loadable module from SunOS 4 on Solaris 2.x, hardly
any module from Solaris 2.3 on Solaris 2.6 (current version is
Solaris 8).

Binary module vendors must supply separate binary modules for
Linux 2.0, Linux 2.2 and Linux 2.4 in the same way they
supply modules for Windows 3.1, Windows 95. The source may be
complileable from the same tree.

Interfaces must change for a system to remain competitive without
exessive bloat and personally I do not see any way around that,
but perhaps I am narrow minded.

--Pete

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

From: "Alex DeLarge" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development,comp.os.linux.hardware,comp.os.linux.help,comp.os.linux.networking,comp.os.linux.questions
Subject: Re: Please Help on my Final Year Project
Date: Mon, 12 Jun 2000 19:21:32 +0100

Guven Linux can use the 2.4.0 test kernel quite happily. Check out the kodak
digicam howto at linuxdoc (www.linuxdoc.org) for details on setting up usb
on linux. Getting it to work in a very small amount of space might pose a
problem because of the kernel, and any libraries you might need. If you need
a hand with the embedded system, feel free to e-mail me.

--
Alex DeLarge: DeLarge and in charge - remove the anti-spam stuff from my
e-mail address before replying

Check out http://www.bristol2600.org.uk for all your Bristol 2600 meet
needs.
First friday each month!

Guven Linux at 0.01rc5

Alan Po <[EMAIL PROTECTED]> wrote in message
news:8ht5sk$[EMAIL PROTECTED]...
> Dear All
>
> I am a University Student in Hong Kong. I have choosen to develop an
> Embedded Linux Environment for Industrial as my Final Year Project. My
> Lecturer suggest me that my first step is to use a linux to control a Web
> Camera first. However, in Hong Kong, almost all Web Camera only support
USB
> (Windows 98 or iMac). In my plan, I also find that if the USB Hardware
> Interface may be more useful and meaningful because USB is PnP and it is
> easy to find in the market (also the industrial). However, as I know,
Linux
> does not support USB.
>
> Can anyone tell any USB development plan on Linux? Where can I get more
> solutions or hints on USB for Linux? Thanks and welcome for any help and
> suggestion on my project. Thanks a lot.
>
> Alan Po
> [EMAIL PROTECTED]
>
>
>



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

From: "Alex DeLarge" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.hardware
Subject: Re: Alan Po Again. How to start to study the KERNEL of Linux
Date: Mon, 12 Jun 2000 19:28:30 +0100

Then you're looking at something extremely difficult, believe me I'm talking
from experience. The easiest method would be to look at the different
howto's, in particular the lfs (linux from scratch) and boot disk howtos.
Try and imagine something in between. It's probably easier to do something
based on debian than RedHat as there's more documentation around. Look at
things like small linux, lem and lineo's linux implementation, but I've
found that lineo's tools tend to return slightly different results in
scripts, especially in ash than you'd expect in a standard environment. Mu
linux is a good example of how tools can be made smaller but with no real
shortcuts. I would give you some urls, but I can't remember them, so you'll
have to look yourself. If you need any help with the project get in touch
with me, and I'll see what I can do.

--
Alex DeLarge: DeLarge and in charge - remove the anti-spam stuff from my
e-mail address before replying

Check out http://www.bristol2600.org.uk for all your Bristol 2600 meet
needs.
First friday each month!

Guven Linux at 0.01rc5

Alan Po <[EMAIL PROTECTED]> wrote in message
news:8i1jtp$[EMAIL PROTECTED]...
> Yes! I need to write it on my own and then minimize it so that it is small
> enough to fit into any environment.
>
> Alan Po
>



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

From: robert_dev <[EMAIL PROTECTED]>
Subject: serial terminal driver problem
Date: Mon, 12 Jun 2000 19:37:06 GMT

I have extensively modified the cyclades & serial167 drivers to make a
driver for a new piece of hardware (8 channel, PCI, PMC format) which
uses Cirrus 2401 chips (I'll release under the GPL when its done). It
all seems to work properly EXCEPT as a login terminal. Getty produces
the login prompt, I can type the user name but as soon as I hit return
the driver locks up continuously issuing IOCTLs TCSETSW and TCSETSF, the
pawsword prompt is not issued. Does anybody have any ideas? Any pointers
or help is more than welcome!

Robert Cheetham
Please CC me at [EMAIL PROTECTED]


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "David B. van Balen" <[EMAIL PROTECTED]>
Subject: usleep & threads
Date: Mon, 12 Jun 2000 15:52:32 -0500


Is the linux usleep(3) thread-safe?


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

From: Lac Hao Viet <[EMAIL PROTECTED]>
Subject: Re: how to get disk information of linux?
Date: Mon, 12 Jun 2000 21:34:09 GMT

take a look at /usr/include/linux/hdreg.h

In article <8i2kht$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> In article <8i1kqs$1iuo$[EMAIL PROTECTED]>, "Harold" says...
>
> >how to get disk information, such as=20
> >partition, type, file system, etc.
>
> few ways. check
>
> fdisk -l
>
> (as root)
>
> Nasser
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED] (John McKown)
Subject: Re: how can i use ab program ? usage is difficult.
Date: Mon, 12 Jun 2000 18:22:05 -0500

On Mon, 12 Jun 2000 20:59:20 +0900, hsungsoo <[EMAIL PROTECTED]> wrote:

>this is erro message.
>
>
>Usage : ab [options] [http://]hostname[:port]/path
>
>
>web]# ab -n 100 http://www.myhome.com
>ab : invalid URL

You need to include the "path" information. On my machine at home, when I
entered

ab -n 100 http://linux2.johnmckown.net

I got the same error! However when I entered

ab -n 100 http://linux2.johnmckown.net/index.html

I got good information. So you must tell "ab" what page you want. The "normal"
default is "index.html".

Hope this helps,
John

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

From: Geoff Marshall <[EMAIL PROTECTED]>
Subject: __P prefix in pthreads.h
Date: Mon, 12 Jun 2000 17:51:03 -0700

Hello!

Am on a Red Hat Linux box and want to compile some threads programs.  But I
notice that all the routines in pthreads.h have a __P prefix for example:

extern int pthread_create __P ((pthread_t *__thread,
                __const pthread_attr_t *__attr,
                void *(*__start_routine) (void *),
                void *__arg));

What is __P ?? 
What do I have to do to use these headers??


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

From: Peter Burka <[EMAIL PROTECTED]>
Subject: Re: __P prefix in pthreads.h
Date: Tue, 13 Jun 2000 01:05:51 GMT

Geoff Marshall wrote:
> 
> Hello!
> 
> Am on a Red Hat Linux box and want to compile some threads programs.  But I
> notice that all the routines in pthreads.h have a __P prefix for example:
> 
> extern int pthread_create __P ((pthread_t *__thread,
>                 __const pthread_attr_t *__attr,
>                 void *(*__start_routine) (void *),
>                 void *__arg));
> 
> What is __P ??
> What do I have to do to use these headers??

Are you sure there's a space between the __P and the paranthesis?

My guess is that __P is a 'prototype' macro.  Pre-ANSI C compilers
didn't want arguments in function prototypes, but ANSI prefers
that you provide the arguments in the prototype.

An easy way to support both systems is to do something like this:

#ifdef K_AND_R_C
#define __P(arglist) ()
#else
#define __P(arglist) arglist
#endif

extern int function __P((int arg1, int arg2));

Then K&R systems see

extern int function ();

and ANSI systems see

extern int function (int arg1, int arg2);

/peter

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

From: Geoff Marshall <[EMAIL PROTECTED]>
Subject: Re: __P prefix in pthreads.h
Date: Mon, 12 Jun 2000 18:53:36 -0700

I thank you for your help.  OK.  I think I'm barking up the wrong tree.
Here's my real problem:

[geoff@ATHENA geoff]$ gcc server.c -oserverd -ansi
/tmp/ccSaSYrl.o: In function `main':
/tmp/ccSaSYrl.o(.text+0x18): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
[geoff@ATHENA geoff]$

When I try to compile my VERY simple program, I get a error.  I see what is
going on with the __P and it looks good in the header files.  (there IS a
space BTW). 

Why would pthread_create be undefined? (it must be defined because it is
checking the arg types).



#include <pthread.h>

void thread_function( void *ptr );

 main()
  {
  int ret;
  pthread_t         a_thread;
  pthread_attr_t *  a_thread_attribute;
  void              thread_function(void *argument);
  char              *some_argument;
  
  ret = pthread_create(&a_thread, a_thread_attribute,
 (void *)&thread_function,
               (void *) &some_argument);
  }
  
  void thread_function( void *ptr )
  {
     char *message;
     message = (char *) ptr;
     printf("%s ", message);
  }


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

From: Peter Burka <[EMAIL PROTECTED]>
Subject: Re: __P prefix in pthreads.h
Date: Tue, 13 Jun 2000 02:07:37 GMT

Geoff Marshall wrote:
> 
> I thank you for your help.  OK.  I think I'm barking up the wrong tree.
> Here's my real problem:
> 
> [geoff@ATHENA geoff]$ gcc server.c -oserverd -ansi
> /tmp/ccSaSYrl.o: In function `main':
> /tmp/ccSaSYrl.o(.text+0x18): undefined reference to `pthread_create'
> collect2: ld returned 1 exit status
> [geoff@ATHENA geoff]$
> 
> When I try to compile my VERY simple program, I get a error.  I see what is
> going on with the __P and it looks good in the header files.  (there IS a
> space BTW).
> 
> Why would pthread_create be undefined? (it must be defined because it is
> checking the arg types).
> 

That's a linker error, not a compiler error.  Where are the pthread
functions defined in your system?  (Probably in libpthread.so, or
something -- sorry I don't have a Linux system here.)  Try
including -lpthread on the command line.

/peter

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

From: Geoff Marshall <[EMAIL PROTECTED]>
Subject: Re: __P prefix in pthreads.h
Date: Mon, 12 Jun 2000 19:12:05 -0700

Thanks!  I'll move over to the .apps now...

> From: Peter Burka <[EMAIL PROTECTED]>
> Organization: Foobar Quux & Sons
> Newsgroups: comp.os.linux.development.system
> Date: Tue, 13 Jun 2000 02:07:37 GMT
> Subject: Re: __P prefix in pthreads.h
> 
> Geoff Marshall wrote:
>> 
>> I thank you for your help.  OK.  I think I'm barking up the wrong tree.
>> Here's my real problem:
>> 
>> [geoff@ATHENA geoff]$ gcc server.c -oserverd -ansi
>> /tmp/ccSaSYrl.o: In function `main':
>> /tmp/ccSaSYrl.o(.text+0x18): undefined reference to `pthread_create'
>> collect2: ld returned 1 exit status
>> [geoff@ATHENA geoff]$
>> 
>> When I try to compile my VERY simple program, I get a error.  I see what is
>> going on with the __P and it looks good in the header files.  (there IS a
>> space BTW).
>> 
>> Why would pthread_create be undefined? (it must be defined because it is
>> checking the arg types).
>> 
> 
> That's a linker error, not a compiler error.  Where are the pthread
> functions defined in your system?  (Probably in libpthread.so, or
> something -- sorry I don't have a Linux system here.)  Try
> including -lpthread on the command line.
> 
> /peter


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

From: [EMAIL PROTECTED]
Subject: mmap of address below 0x1000 gives ENXIO
Date: Tue, 13 Jun 2000 02:22:29 GMT

I'm trying to map to physical memory as shown by the example code
below.  I'm having problems when addr is a value less than 0x1000.  Can
anybody offer any clues on what I'm doing wrong, or if I need to find a
different way to go about this?  Thanks.

int i, memfd, addr;
int *mapped_addr;

memfd=open("/dev/mem",O_RDWR);

addr=0x400;
*mapped_addr=mmap(0,8,PROT_READ,MAP_SHARED,memfd,addr);
if((int)*mapped_addr=-1)
{
  printf("Errno received: %d\n",errno);
}


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Adrian Cox <[EMAIL PROTECTED]>
Subject: Re: PCI utils question...
Date: Mon, 12 Jun 2000 11:09:43 +0100
Reply-To: Adrian Cox <[EMAIL PROTECTED]>

"Paul D. Smith" wrote:
> %% Adrian Cox <[EMAIL PROTECTED]> writes:
>   ac> To do that you have to plug the cards into different slots. The sound
>   ac> card and the ethernet are most likely on the same IRQ because the
>   ac> interrupt lines of those slots are physically wired together, and
>   ac> nothing you type can change that.
> Hmm, interesting.  Do all motherboards work like that?  I have a
> good-quality Abit board (I had pcsforeveryone.com build my PC
> ground-up).

Most motherboards have some limitations on the PCI interrupts. See
below:

>   ac> The only other thing that might make a difference is checking in
>   ac> the BIOS, to see if it has allocated the four PCI interrupts to
>   ac> fewer than four IRQs. This is unlikely.
> Well, there are plenty of IRQ's listed as available for PCI, if that's
> what you mean (when you say "allocated _the_ four PCI interrupts" I'm
> not sure what you're referring to).

PCI cards have four interrupt output lines A-D. The PCI spec describes a
mechanism to arrange these so that the interrupts of one slot are or-ed
with the interrupts from the next slot, rotated one place. This leads to
the system seeing a total of four interrupts from PCI devices. This is
not compulsory: a motherboard may provide more interrupts, if the
interrupt controller is up to it.

This sort of thing matters more when running in SMP mode using the
IO-APIC. Then spreading PCI cards across different IRQ numbers can
produce real performance benefits. On a single CPU, the benefits are
likely to be small.

- Adrian Cox, AG Electronics

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


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