Linux-Development-Sys Digest #598, Volume #8     Thu, 29 Mar 01 23:13:08 EST

Contents:
  Re: driver intercommunication (Johann Deneux)
  Re: opening ethernet as a raw device
  Re: The differences between Ash and Bash (Jonathan Kamens)
  Re: What is the size of Linux 2.4.1 Kernel (Chad Everett)
  Re: opening ethernet as a raw device (Grant Edwards)
  Anyone looking for a Linux developer job in FL? Please don't flame (Unknown User)
  Re: The differences between Ash and Bash (Toby Haynes)
  New to Linux with question ("Richard Bell")
  Re: New to Linux with question (Juergen Heinzl)
  Re: How does Linux implement the time calls and what's the resolution? ("tlin")
  Re: interaction userspace with kernel ("tlin")
  Re: Realtime programming ("tlin")
  Re: Anyone looking for a Linux developer job in FL? Please don't flame (Brian Hall)
  Re: Anyone looking for a Linux developer job in FL? Please don't flame 
([EMAIL PROTECTED])
  RTC - What's the value? (John Kelly)
  Re: What is the size of Linux 2.4.1 Kernel (J Sloan)

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

From: [EMAIL PROTECTED] (Johann Deneux)
Subject: Re: driver intercommunication
Date: 29 Mar 2001 20:43:49 +0100

In article <99vl1d$rvf$[EMAIL PROTECTED]>,
        "Niels Sterrenburg" <[EMAIL PROTECTED]> writes:
> I need to write a device driver which acts like an OSS or ALSA compatible
> sounddriver to user space, and which uses a low level hardware driver to
> play sound on a universial dsp board. (see attached image)
> 
> How can I communicate with the hardware driver from kernel space?
> 
> 1) I can call the shared functions of de driver directly
That's probably the simplest, as well as the most effecient.

> 2) I use the /dev filesystem interface just like from user space
I don't think you can. I guess only processes are supposed to access files
The kernel is not a process (Am I right ?)

> 3) Something with a functable ???? to link you're own funcs to system call's
> 
> 1. Is very difficult because I have to know a lot about the hardware driver
> funcs (I have the source so it is possible)
Start by having a look at the functions called when write/ioctls/read
performed on the device file. Usually, they simply read the arguments
and check their validity, and then call the functions that do the real
work. If the driver is well written, it should not be too hard.

> 
> 2. Can work (I believe) I saw some samples on the net in which they did a
> getfs() and setfs() and after that an open("/dev/mydevice",O_RWRD), but I
> can't get it compiled (unresolved
>     funcs -> getfs, open etc)
Are you sure ??? I am quite surprised to see a call to open, which is
a function of the libc. The libc is intended to make the link between
processes and the kernel, not between the kernel and itself.
By the way, this is probably quite a slow way of achieving communication.

What I am doing for my force-feedback driver is the following:

Process
A
|
| communicate using open/write to /dev/XXX
|
V
'Master' driver
|
|
| communicate by direct call of functions
|
V
low level driver

It seems drivers for joysticks use the same method.

By the way, you could have a look at OSS emulation provided by
ALSA drivers.

-- 
Johann Deneux
CS student at DoCS (www.docs.uu.se/~johannd) and
ESIL (www.esil.univ-mrs.fr/~jdeneux)

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

From: [EMAIL PROTECTED] ()
Subject: Re: opening ethernet as a raw device
Date: Thu, 29 Mar 2001 18:56:16 -0000

In article <[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:

>| Have you looked at the socket man page?

>Yes.  But nothing along these lines is mentioned.

       PF_PACKET          Low level packet interface       packet(7)

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] (Jonathan Kamens)
Crossposted-To: comp.os.linux.help,comp.os.linux.misc
Subject: Re: The differences between Ash and Bash
Date: 29 Mar 2001 18:13:04 GMT

In article <ZzHw6.217168$[EMAIL PROTECTED]>,
 Young4ert <[EMAIL PROTECTED]> writes:
>> Ash does not have most of the functionality that bash has.  It's
>> pretty much a pared-down Bourne shell, whereas bash has all kinds of
>> functionality which didn't exist in the original Bourne shell.
>
>What about tcsh?

I don't know, what about tcsh?  I.e., what's the point of your question?

To a rough approximation, tcsh is to csh what bash is to sh (or ash)
-- just as bash is a more featureful version of the Bourne shell, tcsh
is a more featureful version of the C shell.

Tcsh and bash are completely independent shells.  Different code base,
different syntax, etc.

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

From: [EMAIL PROTECTED] (Chad Everett)
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: Re: What is the size of Linux 2.4.1 Kernel
Reply-To: [EMAIL PROTECTED]
Date: Thu, 29 Mar 2001 19:42:17 GMT

Linux Supreme
>Alan Po <[EMAIL PROTECTED]> wrote:
>> Dear all
>> 
>> Would you tell me the size of Linux 2.4.1 kernel? Is it very large?
>
>Kernel source, about 100 MBytes.
>
>Compressed, about 20 MBytes.
>
>Kernel binary on my machines runs about 600kbytes.
>

The 2.2.xx compiled kernels on my system are about 600K.  The
2.4.2 kernel customized and built for my system is about 1Meg.



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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: opening ethernet as a raw device
Date: Thu, 29 Mar 2001 20:41:01 GMT

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:

>| Not sure what you mean by "not bridged"
>
>I don't want to have to configure bridging between the ethernet
>interface, such as eth0, to some other interface, such as tap0.

I see.

>|>My process should be able to write() outgoing frames, and receive
>|>all frames addressed to this NIC, all broadcast frames, and if in
>|>promiscuous mode, all frames period.  None should go anywhere else.
>|
>| Getting all the packets can be done.  Take a look at the
>| packet man page and/or sources for libpcap.  Or just use
>| libpcap to get the frames (man pcap).
>
>It should be simpler that all the libpcap complexity.  If it
>were a device, I could simply read() and write() (with some
>ioctl() thrown in for good measure).

That's pretty much how packet sockets work.

>| The "none go anywhere else" part is going to be tricky, I
>| think. The way the kernel currently works, I think you (or the
>| pcap library) just get _copys_ of packets and you can do with
>| them as you wish, but I don't remember that there is a way to
>| tell the kernel not to give other copies to anybody else.
>
>Something like BSD's bpf would be almost that.  I could probably
>make sure no other processes can open the interface by using some
>kind of lock.

There's also the problem of other stuff in the kernel (ICMP
handling, ARP handling, etc.)

>But I also want to make sure I can write() an
>ethernet frame that is larger than the usual allowed sizes.  

That's probably limited by the Ethernet drvier and hardware.
I've never tried writing illegal frame lengths with a packet
socket, but I wouldn't expect any particular Ethernet driver or
chipset to support it.

>|>A serial port is easy since there is a /dev node device file to open.
>|>But an ethernet doesn't have one of those, and I could not find any
>|>major/minor numbers for it in the list.  The kernel source code does
>|>not seem to give anything along this line.
>|
>| $ man packet
>
>Is this really that low a level?  It reads like it isn't.

You can definitly use it to write any Ethernet packets you want
(you can even set the src Ethernet address to whatever you want).

In my applications, I configure it to only give me packets with
a certain Ethernet protocol number -- that way I don't have to
sort through packets I don't care about. You can set it to
promiscuous mode and use a protocol number of 0 (IIRC) and then
you get all packets.

But, I think other kernel code still sees them too.

If you're implimenting something with a unique Ethernet
protocol number, then nobody else will be listening for that
type of packet anyway.

-- 
Grant Edwards                   grante             Yow!  I selected E5... but
                                  at               I didn't hear "Sam the Sham
                               visi.com            and the Pharoahs"!

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

From: Unknown User <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.development
Subject: Anyone looking for a Linux developer job in FL? Please don't flame
Date: Thu, 29 Mar 2001 21:47:23 GMT

Here is the job description. Please reply to the group with an email
address and I will contact you with more information.

Thanks!

Linux Engineer  Lead a software migration effort of existing C/C++
software from an OS/2 environment to a Linux environment. Required
Skills: Basic understanding of communications princi8pals and
technologies. Experience with Linux and IBM OS/2 Warp. Experience
developing C/C++ software systems. Experience developing Linux
drivers. Linux drivers (will look at Unix drivers) C/C++ development,
four year degree and 2+ years of experience. This is a permanent
opening in St. Petersburg, FL and the salary range is $40-53,000.  

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

From: Toby Haynes <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.admin,comp.os.linux.help,comp.os.linux.misc
Subject: Re: The differences between Ash and Bash
Date: 29 Mar 2001 16:37:52 -0500



On Thu, 29 Mar 2001, [EMAIL PROTECTED] wrote:
*
> Jonathan Kamens wrote:
> 
>> (Removed bogus "comp.os.linux.development" newsgroup from Newsgroups
>> line.)
>> 
>> Ash does not have most of the functionality that bash has.  It's
>> pretty much a pared-down Bourne shell, whereas bash has all kinds of
>> functionality which didn't exist in the original Bourne shell.
>> 
> What about tcsh?

I'd be careful about making comparisons between tcsh and bash. Long and bitter
flame wars have flared up over posts with just mentioned both in the same post,
let alone asked for a reasoned argument in favour of one or the other :-)

That said, I use tcsh for my interactive shell and bash for scripting :-)
Mainly because tcsh has smart completion (i.e. totally customizable, so if you
have a program which has long wordy switches, you can add completion for the
switches as well as the command name, subsequent arguments (be they files,
numbers, process IDs, etc.). I never found a version of bash which did this -
completion in bash is based on filename, hostname, username, variables,
dependent on leading characters or direct request for a particular style of
completion.

tcsh is a mess for scripting though and should only be used for simple tasks.

As far as comparitive size
-rwxr-xr-x    1 root     root       451964 Oct  3 13:26 /bin/bash
-rwxr-xr-x    1 root     root       281212 Nov 14 04:21 /bin/tcsh

Cheers,
Toby Haynes
-- 

Toby Haynes
The views and opinions expressed in this message are my own, and do
not necessarily reflect those of IBM Canada.

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

From: "Richard Bell" <[EMAIL PROTECTED]>
Subject: New to Linux with question
Date: Thu, 29 Mar 2001 16:26:11 -0600

I'm fairly new to linux and am trying to compile a project I got off the
net.  It has a makefile with a .in extension and make doesnt seem to know
how to deal with it.  Is the .in extension an indication of some other
scripting language?



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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: New to Linux with question
Date: Thu, 29 Mar 2001 22:47:25 GMT

In article <jEOw6.13502$[EMAIL PROTECTED]>, Richard Bell wrote:
>I'm fairly new to linux and am trying to compile a project I got off the
>net.  It has a makefile with a .in extension and make doesnt seem to know
>how to deal with it.  Is the .in extension an indication of some other
>scripting language?
[-]
You should have a script configure in the same directory ...

./Makefile.in
./configure
./...

... and try ./configure --help | more (can be longish).

Makefile.in is a template Makefile and configure plus some other
scripts are supposed to generate the real Makefile (they usually do).

You can read more about that in the documentation for GNU autoconf,
but it's quite a mouthful, to say the least. See your http://www.gnu.org/
or any local mirror.

If you're unsure about what it does, then you can do a ...
mkdir /home/you/dryrun
./configure --prefix=/home/you/dryrun
make
make install
... to see what all happens and where files are going to be
installed and so on.

Ta',
Juergen

-- 
\ Real name     : Juergen Heinzl                \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: "tlin" <[EMAIL PROTECTED]>
Subject: Re: How does Linux implement the time calls and what's the resolution?
Date: Thu, 29 Mar 2001 17:56:51 -0700

As far as I know, you can modify the constant value HZ and then get 1/HZ
second time
intervals.

 -tlin


Rafa Faus <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> As you know, the time resolution in Windows is 1ms, so if you want to do a
> for loop and wait by software, the minimum time you can wait is 1ms.
> I would like to know how Linux implements the time calls, and what the
> resolution is.
>
> Thanks in advance,
>
> Rafa
>
>



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

From: "tlin" <[EMAIL PROTECTED]>
Subject: Re: interaction userspace with kernel
Date: Thu, 29 Mar 2001 17:59:13 -0700

To my understanding, the kernel can not copy all the memory at once,
so it might need to do multiple copy until they get the length of buffer.
You can use sum of size to check whether you finish the copying procedure.


<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> lets say userspace does this:
>
> getsockopt(sockfd, IPPROTO_IP, EPF_SO_GET_INFO, &info, &length)
>
> in the code I have seen the kernel will use
> copy_from_user(destination, info, size)  to get the info in kernel
> memory. But to get the length, the kernel just uses *length.
>
> Why doesn't the kernel have to do copy_from_user(destination2, length,
> sizeof(int)) ?
>
>



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

From: "tlin" <[EMAIL PROTECTED]>
Subject: Re: Realtime programming
Date: Thu, 29 Mar 2001 18:00:06 -0700

There are many posts and companies about RT. You can do a search with key
word "real time Linux".

Josef Allen <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hey,
> I am a grad student and I am looking to do some programming in robotics.
> I would like to know if there are some development kits for such a thing
> and if so where. I am open to any suggestions
>
>
> Josef D. Allen
>



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

From: [EMAIL PROTECTED] (Brian Hall)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.development
Subject: Re: Anyone looking for a Linux developer job in FL? Please don't flame
Date: Thu, 29 Mar 2001 23:35:05 -0000
Reply-To: [EMAIL PROTECTED]

I wish this job had been available when I graduated from UCF in 1997!

I did OS/2 for five years before switching to Linux in '98, and I did Linux
kernel development at Compaq for a year on the Alpha platform.

My wife would love for me to take this job, all her family is in Florida.

Unfortunately, I am living in Colorado, and I can't afford to take a pay cut
to move. Besides, I have a house and I'm locked into my current job until
October (or I have to pay back a bonus).

However, if there is an interest in my working remotely, I would be happy to
discuss that. My website is in my tagline, and see my resume at

http://www.bigfoot.com/~brihall/resume.txt


On Thu, 29 Mar 2001 21:47:23 GMT, Unknown User <[EMAIL PROTECTED]> wrote:
>Here is the job description. Please reply to the group with an email
>address and I will contact you with more information.
>
>Thanks!
>
>Linux Engineer  Lead a software migration effort of existing C/C++
>software from an OS/2 environment to a Linux environment. Required
>Skills: Basic understanding of communications princi8pals and
>technologies. Experience with Linux and IBM OS/2 Warp. Experience
>developing C/C++ software systems. Experience developing Linux
>drivers. Linux drivers (will look at Unix drivers) C/C++ development,
>four year degree and 2+ years of experience. This is a permanent
>opening in St. Petersburg, FL and the salary range is $40-53,000.  


-- 
http://www.bigfoot.com/~brihall
Linux Consultant

Tagline (n): 1) High technology bumper sticker.

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

From: [EMAIL PROTECTED]
Subject: Re: Anyone looking for a Linux developer job in FL? Please don't flame
Date: Fri, 30 Mar 2001 01:54:01 GMT

Unknown User <[EMAIL PROTECTED]> writes:
> Linux Engineer Lead a software migration effort of existing C/C++
> software from an OS/2 environment to a Linux environment. Required
> Skills: Basic understanding of communications princi8pals and
> technologies. Experience with Linux and IBM OS/2 Warp. Experience
> developing C/C++ software systems. Experience developing Linux
> drivers. Linux drivers (will look at Unix drivers) C/C++
> development, four year degree and 2+ years of experience. This is a
> permanent opening in St. Petersburg, FL and the salary range is
> $40-53,000.

I would find it very surprising if you got many takers, unless the
salary is augmented with really substantial additional valuata; for
instance, options, that, even in the present "bearish" market for tech
stocks, would be reasonably expected to provide returns on the order
of another $40-53K.

Someone who knows C, C++, Warp, and Linux device drivers well enough
to satisfy those requirements can probably command a _lot_ more than
$40K.

[Aside: I am presently "in the market," but certainly not in the
specialty of Linux device drivers...]
-- 
(concatenate 'string "aa454" "@freenet.carleton.ca")
http://vip.hyperusa.com/~cbbrowne/resume.html
"Linux!  Guerrilla Unix Development     Venimus, Vidimus, Dolavimus."
-- <[EMAIL PROTECTED]> Mark A. Horton KA4YBR

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

From: John Kelly <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: RTC - What's the value?
Date: Thu, 29 Mar 2001 20:01:50 -0700

I have a high priority daemon to write that needs to ping an external
server every second, or else my platform will be gracelessly reset.  I
see 2 candidate options for timing the interval:

1) Use /dev/rtc at 2 Hz

2) use select() with a timeout

With select(), I seem to get finer interval control.  Is there any value
to using the /dev/rtc approach instead (I mean, if not, why have it?)

-jk



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

From: J Sloan <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc
Subject: Re: What is the size of Linux 2.4.1 Kernel
Date: Fri, 30 Mar 2001 04:08:20 GMT

Alan Po wrote:

> Dear all
>
> Would you tell me the size of Linux 2.4.1 kernel? Is it very large?
>

The compressed image is just over 600k -

-rw-r--r--    1 root     root       661329 Mar 26 12:57 vmlinuz

However dmesg tells me the kernel occupies 878k of RAM -

Then there is the cumulative memory usage of the kernel modules -

# lsmod
Module                  Size  Used by
sr_mod                 12448   0 (autoclean)
cdrom                  27008   0 (autoclean) [sr_mod]
isofs                  18528   0 (autoclean)
iptable_filter          1824   0 (autoclean) (unused)
ip_nat_ftp              3280   0 (unused)
iptable_nat            13376   1 [ip_nat_ftp]
ip_conntrack_ftp        2016   0 (unused)
ip_conntrack           13440   2 [ip_nat_ftp iptable_nat
ip_conntrack_ftp]
ip_tables              10784   4 [iptable_filter iptable_nat]
scanner                 6560   0 (unused)
tdfx                   53328   1
ide-scsi                8080   0
scsi_mod               92720   2 [sr_mod ide-scsi]
autofs                 10752   1 (autoclean)
eepro100               17072   2 (autoclean)
emu10k1                44880   0
mousedev                4160   0 (unused)
hid                    12352   0 (unused)
input                   3392   0 [mousedev hid]
usb-ohci               15472   0 (unused)
usbcore                51536   1 [scanner hid usb-ohci]


The compressed archive is just over 20 MB:

-rw-rw-r--    1 root     root     20499361 Feb 21 17:00
linux-2.4.2.tar.bz2


However the directory it creates when uncompressed is much larger:

# du -sk linux
133632  linux

So the answer could be anywhere from 600k to 130 MB depending
on what you mean by "Linux" -

cu

Jup







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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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