Linux-Development-Sys Digest #117, Volume #8 Thu, 31 Aug 00 19:13:18 EDT
Contents:
autogen.sh, configure, The Professor and Mary Ann ("Chris Kotchey")
Re: LARGE_FILE oddities (bill davidsen)
Re: Lilo, mounting the root in a ramdisk (bill davidsen)
Re: autogen.sh, configure, The Professor and Mary Ann (Erik de Castro Lopo)
Re: which kernel version support AGP? (Paul Pygeon)
from clli to spin lock ("Peter Huang")
Re: from clli to spin lock (Kaz Kylheku)
How can I make the Wheel of my mouse work ? (METALROM)
Question about the keyboard behaviour with Gnome (METALROM)
No sound driver for the new Gygabyte motherboards ?? (METALROM)
Re: Memory allocation Strangeness. ("Tristan Wibberley")
Re: purify and memory managers (Andi Kleen)
Re: Linux driver module question (Ed Hudson)
How can I specify the out interface? (wolf)
Strange error when using function "ioctl" ("Zhang Liang")
Linux only recognizes half of my RAM !! (METALROM)
Re: autogen.sh, configure, The Professor and Mary Ann ([EMAIL PROTECTED])
Re: Detecting applications faults (Juergen Heinzl)
----------------------------------------------------------------------------
From: "Chris Kotchey" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: autogen.sh, configure, The Professor and Mary Ann
Date: Thu, 31 Aug 2000 14:33:19 -0400
I just got into Linux development recently, and this the first time I've
encountered the use of such tools as autoconf, automake, autogen.sh,
configure, etc., that I'm seeing accompanying all the source code that I've
started downloading.
Although these tools definitely appear to be doing a lot for me, I really
don't comprehend all of what they are doing, what the intermediate files
are, etc.
In particular, I'm looking at a current source code distribution (for
Glade), and I'm trying to answer for myself the simple question "where is
the right place to insert a -Dxxx compile definition so that it is used in
my next compilation, given that there are several Makefiles present (in
several directories), and they were all generated auto-magically?"
Does anybody know of a nice explanation of what the flow is of all these
programs, how they work, etc.? And most importantly, where *IS* the right
place to add a -D compile option?
Chris Kotchey
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: LARGE_FILE oddities
Date: 31 Aug 2000 18:51:55 GMT
In article <[EMAIL PROTECTED]>,
Lawrence K. Chen, P.Eng. <[EMAIL PROTECTED]> wrote:
| Okay, did some more investigation into this oddity.
|
| F_SETLK64/F_GETLK64 are defined on RedHat 6.2 (2.2.14), but are not defined
| for SuSE 6.4 (2.2.14).
|
| Guess it shows the deviations even in the same kernel release.
The point is that some Redhat releases come with a Redhat kernel, not
a Linux kernel. So you may get all sorts of behaviours which are not
replicated by kernels released by kernel.org. You may also find that if
you upgrade your Redhat system with an official kernel some things might
not work if they require the non-standard features.
If all vendors do this it leaves the Linux market fragmented, which
frankly is one of the biggest things application vendors mention about
Linux ports. It points out the desirability of having a non-vendor
reference version as a target for application ports. I think Debian
might be closest to being that standard, although I much prefer
Slackware for some things.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Lilo, mounting the root in a ramdisk
Date: 31 Aug 2000 18:56:39 GMT
In article <8olshp$khr$[EMAIL PROTECTED]>,
Jerome Corre <[EMAIL PROTECTED]> wrote:
>
>
>
>hi
>
>I have made a small ditribution of linux (for fun and to get to know
>linux a bit better) which fit on two floppy. the first floppy hold a
>compressed image of the kernel (without lilo) the second floopy a
>compressed image of the root fs. This works fine after the kernel is
>booted, it prompt for me to insert the second floopy and then load the
>root image in a ramdisk and mount this ramdisk as root.
Look at the initrd stuff in LILO and in the kernel. I think that's
what you're looking for.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: autogen.sh, configure, The Professor and Mary Ann
Date: Thu, 31 Aug 2000 19:13:50 +0000
Chris Kotchey wrote:
<snip>
> Does anybody know of a nice explanation of what the flow is of all these
> programs, how they work, etc.? And most importantly, where *IS* the right
> place to add a -D compile option?
Not sure exactly how to add a -D options, but the place to add it would
be to the file Makefile.am.
I use the script included below to reconfigure a project when I change
Makefile.am of configure.in. The last command "automake -a" converts
Makefile.am into Makefile.in which is used by the configure script
to generate the Makefile.
Hope this helps,
Erik
===================================================
#!/bin/sh
rm -f config.cache
if [ -d m4 ]; then
echo "Looking in m4 directory for macros."
aclocal -I m4
else
echo "Looking in current directory for macros."
aclocal -I .
fi
autoconf
autoheader
automake -a
exit
===================================================
Erik
--
+-------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED]
+-------------------------------------------------+
"Lumping configuration data, security data, kernel tuning parameters,
etc. into one monstrous fragile binary data structure is really dumb."
- David F. Skoll
------------------------------
From: Paul Pygeon <[EMAIL PROTECTED]>
Subject: Re: which kernel version support AGP?
Date: Thu, 31 Aug 2000 15:22:30 -0400
Benny Li a �crit :
>
> hi,
>
> I want to use Voodoo3 3000 AGP, but I heard that earlier kernels
> don't support AGP yet. Can somebody please tell me which kernel
> version(s) support AGP?
>
> thanks,
> ben
Hi,
I'm using a 2.2.16 kernel and everything works fine :)
Bye
------------------------------
From: "Peter Huang" <[EMAIL PROTECTED]>
Subject: from clli to spin lock
Date: Thu, 31 Aug 2000 12:48:04 -0700
Hi all
I have some code that I written with cli but I'm trying to change to using
spin lock.
I use wake_up_interruptable to wake up the waiting queue. It works with the
cli but not spin locks. Please let me know if I have any glaring mistakes.
Thanks
void wait_int(u32 bit,INT_HDL_TYPE *hdl_ptr)
{
unsigned long flags;
unsigned char ret=0;
struct wait_queue wait = {current, NULL};
/* the waiting element must be in the flag before
* interrupt is turned on. Also, if interrupt had
* already arrived, we don't wait any longer, we
* just return to the waiting party
*/
spin_lock_irqsave(&interrupt_lock,flags);
/* wait has already arrived*/
if(test_bit(INT_ARRIVED,(void*)&(hdl_ptr->flag)))
{
ret=1;
}
else
{
set_bit(bit,(void*)&(hdl_ptr->int_bits));
add_wait_queue(&(hdl_ptr->ebsa_q), &wait);
}
spin_unlock_irqrestore(&interrupt_lock,flags);
/* interrupt has arrived */
if(ret) return;
for(;;)
{
if(signal_pending(current))
break;
current->state = TASK_INTERRUPTIBLE;
schedule();
}
current->state = TASK_RUNNING;
remove_wait_queue(&(hdl_ptr->ebsa_q), &wait);
clear_bit(bit,(void*)&(hdl_ptr->int_bits));
}
#else /* SPINLOCKED */
void wait_int(u32 bit,INT_HDL_TYPE *hdl_ptr)
{
unsigned long flags;
save_flags(flags);
cli();
if(test_bit(INT_ARRIVED,(void*)&(hdl_ptr->flag)))
{
/* wait has already arrived*/
/* reset the interrupt arrived bit */
clear_bit(INT_ARRIVED,(void*)&(hdl_ptr->flag));
}
else /* interrupt has not arrived yet. set bit and start waiting */
{
set_bit(bit,(void*)&(hdl_ptr->int_bits));
interruptible_sleep_on(&(hdl_ptr->ebsa_q));
}
restore_flags(flags);
}
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: from clli to spin lock
Reply-To: [EMAIL PROTECTED]
Date: Thu, 31 Aug 2000 20:02:50 GMT
On Thu, 31 Aug 2000 12:48:04 -0700, Peter Huang <[EMAIL PROTECTED]> wrote:
>Hi all
>
>void wait_int(u32 bit,INT_HDL_TYPE *hdl_ptr)
>
>{
>
> unsigned long flags;
>
> unsigned char ret=0;
>
> struct wait_queue wait = {current, NULL};
>
>
>
>/* the waiting element must be in the flag before
>
>* interrupt is turned on. Also, if interrupt had
>
>* already arrived, we don't wait any longer, we
>
>* just return to the waiting party
>
>*/
>
> spin_lock_irqsave(&interrupt_lock,flags);
>
>/* wait has already arrived*/
>
> if(test_bit(INT_ARRIVED,(void*)&(hdl_ptr->flag)))
You don't need to use atomic functions. These are a waste of time; you
already have a spinlock to protect shared flags.
Also, you don't need to cast pointers to objects to (void *). The conversion is
implicit.
>
> {
>
> ret=1;
>
> }
>
> else
>
> {
>
> set_bit(bit,(void*)&(hdl_ptr->int_bits));
>
> add_wait_queue(&(hdl_ptr->ebsa_q), &wait);
>
> }
>
> spin_unlock_irqrestore(&interrupt_lock,flags);
>
>/* interrupt has arrived */
>
> if(ret) return;
>
> for(;;)
>
> {
>
> if(signal_pending(current))
>
> break;
>
> current->state = TASK_INTERRUPTIBLE;
Glaring mistake! You must change the state to TASK_INTERRUPTIBLE before
you release the lock, preferrably before you put it onto the sleep queue.
Also ensure that the interrupt which wakes up the task also uses the same
spinlock when setting the shared flag, otherwise it's all for naught.
That is, the ISR must acquire the spinlock, set the flag, release
the spinlock and then do the wake_up_interruptible().
The spinlock ensures that the ISR will either set the flag before the
thread tests it (so it won't miss the setting of the flag), or after the thread
has testedit and has already enqueued itself for sleep (so it can't possibly
miss the wakeup).
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
From: [EMAIL PROTECTED] (METALROM)
Subject: How can I make the Wheel of my mouse work ?
Date: 31 Aug 2000 20:26:33 GMT
Hi everybody !
I installed the Mandrake 7.02, but it doesn't take the wheel of my mouse. Is
there a driver to do this ? And how can I install it ? (I'm a bit a beginner
with Linux)
Thanx in advance for the answer !
Super Membrax
------------------------------
From: [EMAIL PROTECTED] (METALROM)
Subject: Question about the keyboard behaviour with Gnome
Date: 31 Aug 2000 20:31:22 GMT
Hi again !
There is something quite annoying when I use Gnome/Enlightenment : In fact,
when I focus on a List or a Combo widget, and I move with the arrows of the
keyboard, the selection doesn't move, only a border moves between the elements.
Consequently I must click on each element with the mouse and I can't use the
keyboard to switch between the elements, which is boring when you have a lot of
elements in the list !! How can I change that ??
Thanx in advance,
Super Membrax
------------------------------
From: [EMAIL PROTECTED] (METALROM)
Subject: No sound driver for the new Gygabyte motherboards ??
Date: 31 Aug 2000 20:36:54 GMT
Hi again (!!)
I have a big problem with Linux (Mandrake 7.02) : I don't have sound !! I think
that's because there no apropriate driver four my soundcard. In fact, it's a
soundcard included in the motherboard : A Gygabyte SocketA, model GA-7ZX-1,
with a VIA KT133 chipset, and AC '97 (I don't know exactly what it is). Is
there a sound driver coming for this device ? And if there is already one,
where can I find it ?
Thanx in advance,
Super Membrax
------------------------------
From: "Tristan Wibberley" <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.
Date: Thu, 31 Aug 2000 22:08:17 +0100
Olivier CARRERE wrote in message <[EMAIL PROTECTED]>...
>I use a 2.2.16 kernel, and I'm using *very large* applications (using
>more than 900MB). I just received a new 2GB machine hoping I could use
>it under Linux for my large applications. I compiled 2.2.16 kernel with
>2GB memory support, with and without SMP (just in case, since it's a SMP
>machine), and the same problem occurs : My app can't allocate memory
>when it becomes large (More than 500 MB).
I think it's because of where libc is mapped into memory (sbrk stops when it
hits it).
Remember, malloc is an ad hoc solution to memory allocation (or when you
want to be cross-platform). You should implement your own version which can
use mmap when you hit that barrier. You can also get lots of performance
improvements when you tailor your VM management to your needs (instead of
using the general purpose malloc).
Alternatively, use a multi-process model with shared memory - often a
winner.
--
Tristan Wibberley
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: purify and memory managers
Date: 31 Aug 2000 23:05:26 +0200
"Paul D. Smith" <[EMAIL PROTECTED]> writes:
> %% [EMAIL PROTECTED] (Kaz Kylheku) writes:
>
> kk> There is a bounds checking patch for GCC, which instrument the
> kk> intermediate code rather than the object code.
>
> Yes, that is also cool, but my understanding is that it only works with
> arrays. Perhaps I'm atypical, but I use pointers to allocated memory
> _MUCH_ more than I use arrays.
The bounded pointer version of gcc that is currently a branch in the gcc
CVS repository uses fat pointers to avoid that problem. The fat pointer
adds a size field to an pointer. It requires recompilation of all libraries
and a specially patched version of glibc to work.
-Andi
------------------------------
From: Ed Hudson <[EMAIL PROTECTED]>
Subject: Re: Linux driver module question
Date: Thu, 31 Aug 2000 18:05:57 -0400
Thanks to all for your responses. Sorry the wording was a bit off, I
am rather new to Linux driver programming and am trying to give myself
a crash course. The most simplistic view of the problem is that the
board in question needs a physical address to write to. The user will
provide data, and a destination address where he expects to read it
back from. In the driver, I need to make sure that the destination
address is mapped to a physical location and stays that way until the
board writes its data back. To make things more difficult, I have
been asked to provide kernel 2.0 support as well. Is this feasible?
Also, does anyone have a pointer to a good explanation of kernel
module debugging? The printk's are ok, but I am itching to step
through the code and see where things are falling apart.
Thanks again
Ed
On Fri, 25 Aug 2000 03:58:38 GMT, [EMAIL PROTECTED] (Pete Zaitcev)
wrote:
>Hehe, a witty response! Ed's wording was not very good but I guess
>he asked how to pin down user pages in the way of bp_mapin()
>in Solaris, or some such. I did not answer because the canonical
>answer is "You cannot do that. Use kmalloc() and copy_to_user().".
>This is not the whole story, as some people pushed for DMA
>into a user memory, for instance Werner Almesberger (sp?) did
>something about it in the context of ATM support. Apparently,
>2.4 is supposed to have some user memory DMA support.
>Also, you can do get_free_pages() than remap this into
>user space with remap_page_range() when user calls mmap(2).
>However, it's only a partial solution.
>
>--Pete
>
>On Thu, 24 Aug 2000 20:57:44 GMT, Norm Dresner <[EMAIL PROTECTED]> wrote:
>> Unless I'm reading your question wrong, you seem to be asking how to prevent
>> the kernel from swapping out the physical memory on your PCI board. The
>> only way the kernel can do that is if you don't screw the board down tightly
>> enough.
>>
>> Norm
>>
>> Ed Hudson <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]...
>> > I am writing a kernel module driver for a custom PCI based DSP board.
>> > The board needs access to physical memory locations. I am using
>> > virt_to_phys() to translate the addresses, but I believe I need to
>> > implement a locking mechanism so that the locations I refer to are not
>> > swapped. Does any have any suggestions on how I may go about doing
>> > this? Any links to reference materials or example drivers would be
>> > much appreciated.
>> >
>> >
>> > Thanks,
>> > Ed Hudson
------------------------------
From: wolf <[EMAIL PROTECTED]>
Subject: How can I specify the out interface?
Date: Thu, 31 Aug 2000 14:06:37 +0800
I have two ethernet card in my computer. After installation, I get two
network interface eth0 and eth1, and assign two different IP address to
them. But to my surprise , it seems that all the packets that is sent to
both IP address come in from the interface that is activated first (eth0
after bootup of course). And all the outgoing packets go from the
interface too.
Why ? And How can i specify the interface to send packets ?
------------------------------
From: "Zhang Liang" <[EMAIL PROTECTED]>
Subject: Strange error when using function "ioctl"
Date: Wed, 30 Aug 2000 14:23:20 +0100
Reply-To: "Zhang Liang" <[EMAIL PROTECTED]>
I am told that function "ioctl" can be used to get the IP addreses of local
machine.
However I encounter a strange error when using "ioctl". After I call
"ioctl" to get a list of network interface information, any other lib
functions calls following this ioctl will cause the program to abort. But
normal assignment statement can work.
Anybody knows the correct usage of "ioctl"? Thanks in advance.
Code:
struct ifconf conf;
socket s = socket(PF_INET, SOCK_STREAM, 0);
int result = ioctl(s, SIOCGIFCONF, &conf);
//here I can get the network interface info correctly.
//but this line will cause program to abort.
printf("abc"); // or fopen("abc", "wt"); or whatever other lib
function calls.
------------------------------
From: [EMAIL PROTECTED] (METALROM)
Subject: Linux only recognizes half of my RAM !!
Date: 31 Aug 2000 22:26:42 GMT
HI Everybody !
I noticed that Linux only finds 64Mb of memory on computer although I have
twice, ie 128Mb ! Is it normal ? And how can I fix it ?
Thanx in advance
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: autogen.sh, configure, The Professor and Mary Ann
Crossposted-To: comp.os.linux.development.apps
Date: Thu, 31 Aug 2000 22:26:52 GMT
In comp.os.linux.development.apps Chris Kotchey <[EMAIL PROTECTED]> wrote:
> In particular, I'm looking at a current source code distribution (for
> Glade), and I'm trying to answer for myself the simple question "where is
> the right place to insert a -Dxxx compile definition so that it is used in
> my next compilation, given that there are several Makefiles present (in
> several directories), and they were all generated auto-magically?"
> Does anybody know of a nice explanation of what the flow is of all these
> programs, how they work, etc.? And most importantly, where *IS* the right
> place to add a -D compile option?
If you're "adding" it for yourself, what I usually do is pass it to
configure, ala (in sh-flavored shells):
CFLAGS="-Dmyoption" ./configure
That propogates it through all the automagic files, as well as during
the configure tests themselves. It also makes it easier to build
binary packages, if you do that sort of thing.
If you're "adding" it as part of the actuall distributed version, then
you should make a check if it's needed in configure.in and have it
replaced in the output.
--
Matt Gauthier <[EMAIL PROTECTED]>
------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Detecting applications faults
Date: 31 Aug 2000 22:54:46 GMT
In article <[EMAIL PROTECTED]>, Rosimildo da Silva wrote:
>Hi,
>
>Is there any mechanism under Linux to detect when an
>application, Daemon, etc that caused a core dump.
[...]
Only an indirect one. If a process does a fork() a. exec()
the parent can determine whether the child process terminated
with a core dump (which needs not to be written if the limit
for a core file has been set to zero). See the documentation
for wait() and waitpid() whereby waitpid() is a BSD extension.
>Windows NT has a mechanism called "Application Error Debug"
>that automatically calls a debug to handle the crash.
>The default one installed is "Dr Watson".
[...]
They knew why ;)
Okay, no, there is nothing like that, so for "needs to
run and restarted" stuff use something else. See before,
as a small startup wrapper can do the job. If just the
restart is the problem see the man page for init and
inittab.
Cheers,
Juergen
--
\ Real name : J�rgen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
** 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
******************************