Linux-Development-Sys Digest #913, Volume #7 Sun, 28 May 00 06:13:07 EDT
Contents:
Winmodems )Re: Need ideas for university funded project for linux) (Victor Wagner)
Re: Linux Kernel Module Question.. (Juan =?iso-8859-1?Q?Jos=E9?= Costa Prats)
Installing binutils - Error 33 exit status from the linker, ld ("Long")
Re: how does "cardctl suspend" work? (Yung-Hsiang Lu)
/proc changes in 2.4.0-test... (Sam Birch)
Re: Winmodems )Re: Need ideas for university funded project for linux)
([EMAIL PROTECTED])
where is __libc_open() defined in glibc 2.1 ? ([EMAIL PROTECTED])
Re: Very simple linux Scheduler question (Arnaud Westenberg)
USer process doing arbitrary stuff in /proc? (Dave Donaghy)
Re: Need ideas for university funded project for linux (Horst von Brand)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Victor Wagner)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Winmodems )Re: Need ideas for university funded project for linux)
Date: 27 May 2000 10:06:53 +0400
In comp.os.linux.misc JEDIDIAH <[EMAIL PROTECTED]> wrote:
: Quite. My Phoebe hardware ISA modem came with very reasonable
: defaults: no-pnp, com2. In this configuration I was able to slap it in
: and use it immediately.
Reasonable?! Internal modem is next worst thing to winmodem.
Modem should be a separate box, attached to the com port with cable.
Most important thing in this setup are leds and its independent power
swithch. I don't know how it looks in the West, but here in Russia it is
qute possible that modem would hang on noisy line and only
power-cycling would revive it. How'd you power-cycle internal modem?
Only thing that I don't like about external modem is that they require
something other than 5V DC or 12V DC. (typically 12V AC). If they need
some voltage, which I could get from the main power supply of machine,
I'd be able to get rid of those power supply units.
:>
:>When I installed my modem in win, I needed a bunch of driver diskettes to
:>get it to work.
No, not at all. You need a bunch of driver diskettest to make _windows_
_think_ your modem works.
Using Dos terminal program like Telix or self-written Tcl script you
could make your modem working immediately without any drivers.
: One should never need to 'install' a modem. A real modem is as
Why? You don't consider unscrewing case, finding ISA slot, fiddling with
IRQ-s "installing"? It can turn into half an hour of downtime.
External modems are ones whose installation doesn't interrupt system
operation. You bring in from shop, you connect it, you turn it on, and
other users of your machine do their work in the same time.
--
Whoa...I did a 'zcat /vmlinuz > /dev/audio' and I think I heard God...
-- mikecd on #Linux
------------------------------
From: Juan =?iso-8859-1?Q?Jos=E9?= Costa Prats <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.questions,comp.os.linux.help
Subject: Re: Linux Kernel Module Question..
Date: Sun, 28 May 2000 02:13:54 +0200
Hi,
i'm not an expert, and a good amount of info is in the Mr Ori Pomerantz's
"Linux Kernel Module Programming Guide" (and of course in ALL the source code of
Linux, specially at /usr/src/linux/drivers/*) but i think that :
0.
Didn't you need any "module_register_chrdev" or similar?
1.
I think it's in the Makefile at /usr/src/linux adding something like
CFLAGS+=CONFIG_MYMODULE
2.
.... I refer to the Alessandro Rubini's Book, too.
Manoj Patil wrote:
> You can find wealth of info in Alessandro Rubinis book
>
> Vive l'amour wrote:
>
> > Hi,I am trying to write a kernel module. After reading some documents,
> > I know that new modules need to use init_module()/cleanup_module to
> > register/deregister with the kernel. And I also know how to write kernel
> > module Makefile, thanks to Mr. Ori Pomerantz's "Linux Kernel Module
> > Programming Guide"....
> >
> > so now if I write this as part of my modules' code
> > ----------mymodule.c------------------------------
> > extern int mymodule_active;
> >
> > int init_module(){
> > mymodule_active=1;
> > return 0;
> > }
> >
> > int cleanup_module(){
> > mymodule_active=0;
> > return 0;
> > }
> >
> > int mymodule_doit(){
> > printk("Mymodule is working...");
> > }
> >
> > ---------------------------------------------------
> > And somewhere in the kernel source tree, I write the following
> > code segment to call my modules's function mymodule_do() as an entry point
> > ---------------------------------------------------------
> >
> > int mymodule_active=0;
> > ...........
> > #ifdef CONFIG_MYMODULE
> > if (mymodule_active)
> > mymodule_doit();
> > #endif;
> > ............
> >
> >
> > My questions are:
> > 0. Did I make any mistakes above? Will this work?
> > 1. How do I add a new kernel option CONFIG_MYMODULE while doing
> > 'make config'?
> > 2. If CONFIG_MYMODULE=m, that is, it is a module and would not be
> > inserted until needed, then how does the compiler know where to
> > find the symbol mymodule_doit() while making kernel image?
> >
> > Thanks for your reply. Any reference link is also appreciated.
> > I need more reference points regarding Linux kernel module programming.
> >
> > Thank you very much..
------------------------------
From: "Long" <[EMAIL PROTECTED]>
Subject: Installing binutils - Error 33 exit status from the linker, ld
Date: Fri, 26 May 2000 09:56:38 -0700
Hello,
Where can I find the meaning of an error code returned from ld? Anyone
knows? Please help.
Long
------------------------------
From: Yung-Hsiang Lu <[EMAIL PROTECTED]>
Subject: Re: how does "cardctl suspend" work?
Date: 28 May 2000 04:31:45 GMT
Peter T. Breuer <[EMAIL PROTECTED]> wrote:
: Yung-Hsiang Lu <[EMAIL PROTECTED]> wrote:
: : I am curious how "cardctl suspend" works. I am using a WaveLAN
: : wireless Ethernet PC-card. When I execute "cardctl suspend",
: : /var/log/messages shows "cardmgr: executing './network suspend eth0'.
: : Where is this "network" program? I checked /etc/rc.d/init.d/network,
: It's in /etc/pcmcia.
/etc/pcmcia/network does not have an option "suspend". My linux
installation is Redhat 6.1 with kernel 2.2.12-20.
: : /etc/sysconfig/network, and /etc/pcmcia/network, but none of them took
: : "suspend" as an input parameter.
: : I traced cardctl to the point where it calls ioctl and followed it
: : until sys_ioctl in /usr/src/linux/fs/ioctl.c. In sys_ioctl, it called
: : a function pointer and I was lost there.
: : Your help would be greatly appreciated.
: man cardctl.
I am sorry that I did not make it clear; I would like to know how
cardctl works internally, not just run it. Does anybody know? Thank
you.
Wavelan 802.11 should run wavelan2_cs.o. You can download it from the
web site of Wavelan.
: I'd be interested in your accounst of the wavelan card.
: I have one in front of me: ieee 802.11 wavelan. But if I stick it in
: the slot, it comes up with hardware address 0.0.0.0.0.0.
: May 26 17:07:11 barney cardmgr[117]: initializing socket 0
: May 26 17:07:11 barney cardmgr[117]: socket 0: Lucent Technologies WaveLAN/IEEE
:Adapter
: May 26 17:07:11 barney cardmgr[117]: executing: 'insmod
:/lib/modules/2.2.15/pcmcia/wavelan_cs.o'
: May 26 17:07:11 barney cardmgr[117]: executing: './network start eth0'
: May 26 17:07:11 barney kernel: wv_82593_cmd: wv_82593_config(): configure timeout,
:status 0x00
: May 26 17:07:11 barney kernel: wv_82593_cmd: wv_82593_config(): ia-setup timeout,
:status 0x00
: May 26 17:07:11 barney kernel: wv_82593_cmd: wv_82593_config(): mc-setup timeout ,
:status 0x00
: May 26 17:07:14 barney kernel: eth0: wavelan_watchdog: watchdog timer expired
: May 26 17:07:14 barney kernel: wv_82593_cmd: wavelan_watchdog(): abort timeout,
:status 0x00
: May 26 17:07:14 barney kernel: eth0: wavelan_watchdog: abort failed, trying rese
: (that was a tosh)
: On the desktops I have with pcmcia slots added, it appears to have an
: io conflict with the video card.
: Peter.
--
Sincerely,
Yung-Hsiang Lu
[EMAIL PROTECTED]
------------------------------
From: Sam Birch <[EMAIL PROTECTED]>
Subject: /proc changes in 2.4.0-test...
Reply-To: [EMAIL PROTECTED]
Date: Sun, 28 May 2000 06:15:32 GMT
Hello,
I wrote a kernel module which used a proc file for both read and write
(as well as ioctl...though I am not sure this is acceptable...). It
works fine under 2.2.15. I am endeavoring to port it up to the
2.4.0-test1 tree, but am having problems.
In 2.2.15, my methodology was:
1) I defined a struct file_operations to use my own functions for
read, write, and ioctl.
2) I defined a struct of inode_operations to use my file_operations
and permissions.
3) I defined a struct of proc_dir_entry, configuring name, file
modes...and using my inode_operations.
4) I used proc_register to push my proc_dir_entry into the proc file
system.
All worked as I desired it to...
In 2.4.0-test1, I found the usage of proc has changed, but I am
struggling at figuring it out. Below are my
observations/results/questions:
OBSERVATIONS:
1) proc_register is now static.
2) create_proc_entry now performs a few things, then uses
proc_register the way I think I would have...? (okay, partially a
question...)
3) proc_dir_entry->get_info is used in net/wanrouter/wanproc.c for
outputting info to the user.
4) the wanproc.c file defined the file_operations/inode_operations
differently than I have seen them for 2.2.x. Is this way correct...if
so, is it functionally different than the old way? (ahhh, another
question in the observation section...oh well)
RESULTS:
I rewrote my code to get a pointer to the proc_dir_entry by calling
create_proc_entry. Then I set the returned proc_dir_entry to be the
same as the one I used in proc_register in 2.2.15. Compiled, installed
kernel module. Here are the results: Nothing works. I cannot read
the entry, I cannot write to it, and I cannot make an ioctl call on
it. The only error I get is when I attempt to use ioctl. The read
and write seem to both come from and go to vapor?
QUESTIONS:
1) Is there any documentation on the new proc usage? I haven't found
anything (other than the kernel source...I am struggling with that).
For the 2.2.15, I used Rubini's Linux Device Drivers, the Linux Kernel
Module Hacking Guide, Beginning LInux Programming (WROX Press), and
LXR to rip through the kernel sources? (I guess the last one's still
valid, but everything before it seems to have become outdated too far
for use.)
3) Is the file_operations ignored for the proc fs now?
2) Is proc_dir_entry->config_info the only way to output to a user
reading my proc file?
3) If I use proc_dir_entry->config_info to get info back to the user,
what can I use to get the text a user writes to my proc file?
4) How can I use my ioctl call?
I would appreciate any help in this matter. Thanks in advance!!!
Sam
------------------------------
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Winmodems )Re: Need ideas for university funded project for linux)
From: [EMAIL PROTECTED]
Date: Sun, 28 May 2000 08:44:24 GMT
[EMAIL PROTECTED] (Victor Wagner) writes:
> Reasonable?! Internal modem is next worst thing to winmodem.
But on the plus side, they don't require the purchase of a separate
serial card for high-speed communication. And they don't take up more
space, need a serial cable, or another power line.
> Modem should be a separate box, attached to the com port with cable.
> Most important thing in this setup are leds and its independent power
> swithch. I don't know how it looks in the West, but here in Russia it is
> qute possible that modem would hang on noisy line and only
> power-cycling would revive it. How'd you power-cycle internal modem?
Dunno. It's never happened to me. I can't imagine it's because our
phone lines are better, because they're so bad that it's easier to
replace them than fix them. Maybe our modems are better-designed?
Problem is, serial ports are almost as overused as parallel ports. I
can think of five devices off the top of my head - still being made,
by the way - that require a serial port. Hopefully these problems
will be solved by USB, but I'm not holding my breath.
> Only thing that I don't like about external modem is that they require
> something other than 5V DC or 12V DC. (typically 12V AC). If they need
> some voltage, which I could get from the main power supply of machine,
> I'd be able to get rid of those power supply units.
You mean the transformers? Granted, they are annoying, but - over
here, at least - there's no 5/12VDC power jack on the outside of our
computers. So we wouldn't have anyplace to plug the modem in.
[drivers etc]
> No, not at all. You need a bunch of driver diskettest to make _windows_
> _think_ your modem works.
> Using Dos terminal program like Telix or self-written Tcl script you
> could make your modem working immediately without any drivers.
Problem is, brilliant PnP devices will try to assign themselves
unusual IRQs. (Which would be a good idea if not for the fact that
serial ports didn't work that way 'til PnP.) And Amazing Windows
will change *every single IRQ in your system* (sometimes) to
accomodate a new device.
[one should never "install" a modem]
> Why? You don't consider unscrewing case, finding ISA slot, fiddling with
> IRQ-s "installing"? It can turn into half an hour of downtime.
Yep. And PCI modems are stupid. (Remind me why we need all that
bus bandwidth for something that will never pass 56Kb/s?)
> External modems are ones whose installation doesn't interrupt system
> operation. You bring in from shop, you connect it, you turn it on, and
> other users of your machine do their work in the same time.
I'll spare you a bad joke on interrupts.
--
Eric P. McCoy ([EMAIL PROTECTED])
non-combatant, n. A dead Quaker.
- Ambrose Bierce, _The Devil's Dictionary_
------------------------------
From: [EMAIL PROTECTED]
Subject: where is __libc_open() defined in glibc 2.1 ?
Date: 28 May 2000 01:22:52 -0700
Hello,
I just started to learn little about glibc. I have glibc 2.1
build in debug to be able to step through it. a user program
call to fopen() eventually ends in __libc_open(). However,
I am not sure where __libc_open is defined. only reference
to it is in the libc.map file.
And according to nm, I see it in:
open.o:
00000000 T __libc_open
where open.o is in libc.a
But when I search for '__libc_open' in all files called open.c in the
glibc tree, I do not see it:
>find . -name open.c
./sysdeps/generic/open.c
./sysdeps/mach/hurd/open.c
./sysdeps/standalone/open.c
>find . -name open.c -exec grep __libc_open {} \; -exec ls -l {} \;
Is it possible gcc is adding '__libc' to '_open' ? or preprocessor
playign tricks in building the name, even so, where is the entry
point __libc_open() itself?
thanks,
Nasser
------------------------------
Date: Sun, 28 May 2000 10:12:28 +0200
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: Re: Very simple linux Scheduler question
Jason Johnson wrote:
> I have question about the linux scheduler. I have been looking
> through the source code, and as far as I can tell
> it looks like, that each process has only a certain
> amount of ticks it is allowed to run. When it runs out, it will not be
> scheduled again until all other runable processes have also
> used all of there ticks, at which point all the runable processes
> have there quantums recalculated and the whole thing starts over.
> Am I correct here (I am obviously ignoring processes that do IO,
> or get put to sleep in general)?
The scheduler uses scheduling policy information contained in each
processes task_struct. The information contains policy (normal or
real-time), priority (amount of ticks) and a counter (amount of ticks
left). The priority of a process can be changed, see man renice.
The scheduler uses a run queue to select a process to run. Wether a
process gets added to the run queue depends on the state of the process
(running, waiting, stopped, zombie). The scheduler selects a process to
run from the run queue on basis of it's counter.
Hope this is what you're looking for.
Regards Arnaud
------------------------------
From: Dave Donaghy <[EMAIL PROTECTED]>
Subject: USer process doing arbitrary stuff in /proc?
Date: Sun, 28 May 2000 12:08:39 +0100
I think I know the answer, but I'd like an expert's opinion, if there's
one around:
Can I register a /proc directory entry so that a user process can do
arbitrary stuff? For example, I'd like to create a directory
/proc/mystuff/[arbitrary directory list]/
so that a user process can create a link in this directory, and my
kernel module will be informed appropriately.
I think the answer's "no, but you can just create a regular file in your
/proc subdirectory and have the user process cat something into it, if
that'll help."
It'd be nice to have someone confirm this, though.
TIA
Dave
------------------------------
From: [EMAIL PROTECTED] (Horst von Brand)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: 28 May 2000 09:17:05 GMT
Reply-To: [EMAIL PROTECTED]
On 24 May 2000 12:19:37 -0500, Leslie Mikesell <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>,
[...]
>>Once you use an
>>'enhanced' feature, you are tied to a non-free Microsquish library.
>>You are at the mercy of Microsquish. If the code is at least LGPL,
>>then the library code is still going to be free. Microsquish must
>>make its changes available as source.
>Unlikely. In the former case you will at least have working,
>well tested code as the base and we won't have to deal with
>a worse alternative. If the base code is not usable in a
>proprietary product, the alternative is to re-invent it, usually
>badly. Imagine where we would be if every vendor including
>tcp/ip had re-written it from scratch because the bsd version
>could not have been used. Microsoft and Linux both went this
>route even though it wasn't required, and the world has gone
>through several years of pain as a result shaking out bugs
>that we really didn't need in the first place.
As I remember it, the BSD TCP/IP code was being threatened by the AT&T
lawsuit at the time. When that cleared up, Linux' TCP/IP was good enough,
and to hack the BSD code into Linux would have meant greater pain.
--
Horst von Brand [EMAIL PROTECTED]
Casilla 9G, Vi�a del Mar, Chile +56 32 672616
------------------------------
** 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
******************************