Linux-Development-Sys Digest #959, Volume #7 Sun, 18 Jun 00 02:13:52 EDT
Contents:
Re: equivalent to NT registry ("Alex DeLarge")
Running a.out? (Stephen Speicher)
Re: Linux/windows library ([EMAIL PROTECTED])
Re: O_LARGEFILE support (Otis Gospodnetic)
Help:Implementing paging algorithms on the Linux kernel(for virtual (Fran Benz)
Re: Running a.out? ([EMAIL PROTECTED])
How to check the remained disk size in Linux ("Nera")
Re: How to check the remained disk size in Linux (Alexander Viro)
Re: __P prefix in pthreads.h (Geoff Marshall)
Re: Help with Compiler Errors ("Dmitriy A. Fedorov")
difference between kmalloc and vmalloc (Jieun Lee)
Re: Catch system calls from an apps? ("Douglas Kilpatrick")
Get an ide-contr. working on a mips? (Erik Niessen)
Re: Kernel memory and DMA (Brett Johnson)
Re: Help with Compiler Errors (Kaz Kylheku)
Re: [Help:] Problems with NFS Daemon under 2.2.16 kernel (Kaz Kylheku)
Re: Help with Compiler Errors (David Weis)
Re: Loading RedHat 6.2 onto Toshiba Satellite 2655XDVD ("simon")
----------------------------------------------------------------------------
From: "Alex DeLarge" <[EMAIL PROTECTED]>
Subject: Re: equivalent to NT registry
Date: Sat, 17 Jun 2000 23:06:04 +0100
<[EMAIL PROTECTED]> wrote in message news:8idq1j$291$[EMAIL PROTECTED]...
> hi,
> I am new to linux drivers.
> I would like to know if their is anything in linux, equivalent to
> registry in NT,
> I want to store some driver specific information across reboots.
> The information should be accessible to user mode programs.
The NT registry is a double-edged sword. On the one hand, it gives you an
easy structured centralised point of administration. On the other hand, it
gives you a centralised point of administration. The words eggs, basket and
'all in one' spring to mind. The best place to stick stuff would either be
in the specific user home folder or /etc. Check the Unix file hierachy
standard (fhs) document for more info.
>
> regards
> jeseem
>
--
Alex DeLarge: 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.01(a)rc6/0.03
------------------------------
From: Stephen Speicher <[EMAIL PROTECTED]>
Subject: Running a.out?
Date: Sat, 17 Jun 2000 20:25:24 -0700
I have an executable from an older machine in a.out format, and
when I try to run it on a Redhat 6.1 system I get the error
message:
Exec format error. Binary file not executable.
Is there any way to run these a.out executables on the newer
RH 6.1 system?
Stephen
[EMAIL PROTECTED]
You can always tell a pioneer by the arrows in his back.
Printed using 100% recycled electrons.
========================================================
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Linux/windows library
Date: Sun, 18 Jun 2000 00:28:12 GMT
If you would like to be on the development end of this and you program
in C, let me know. It would be very easy to develop a lib that
inplements standerd GUI and system calls especially with GTK+.
Chris.
On Fri, 09 Jun 2000 19:12:26 +0200, Arnaud Westenberg
<[EMAIL PROTECTED]> wrote:
>Hi all,
>
>I would like to implement a library for both Linux and windows (perhaps
>more). The library has to talk with the different device drivers of both
>OS's. Therefore there must be some sort layer between the drivers and
>the lib.
>
>The lib would be (L)GPL.
>
>The lib would implement a higher level network protocol for a specific
>network. (not sure if I should call it a lib or a stack) Functionality
>must be (amongst other):
>
>- Network management
>- Error management
>- Communication standards
>
>I beleive the specifications conform with ISO layer 7.
>
>There are no implementations of the protocol yet, certainly not GPL.
>
>I would like some tips regarding:
>
>- The layer between the drivers and the lib, how to keep things simlpe,
>wich programming language would be most suitable etc.
>
>- The lib itself, I was thinking of java or tcl, any other suggestions?
>
>The lib must be used on embedded hardware, so I'm not sure wether java
>is a good choice.
>
>What are your experiences/opinions/suggestions?
>
>
>Thanks
>
>Greetings Arnaud
------------------------------
From: Otis Gospodnetic <[EMAIL PROTECTED]>
Subject: Re: O_LARGEFILE support
Date: Sun, 18 Jun 2000 02:39:21 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Michael Kerrisk) wrote:
> Under the open(2) man page it states that the O_LARGEFILE flag does
> the following:
>
> "On 32-bit systems that support the Large Files System, allow
> files whose sizes cannot be represented in 31 bits to be opened.
> The Linux kernel does not yet have the support for this (as of
> 2.1.130), but the flag definition is there and the userspace LFS
> interfaces are present in the glibc 2.1 test releases."
>
> Are there any currently existing file systems that support large files
> (Ext2 is limited to 2GB)? Does this situation change with 2.3/2.4?
> Does Ext2 allow large files in 2.4?
I heard that that is the case (2.4 kernel) but I am not 100% sure.
Otis
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Fran Benz <[EMAIL PROTECTED]>
Subject: Help:Implementing paging algorithms on the Linux kernel(for virtual
Date: Sat, 17 Jun 2000 22:22:43 -0300
> subject: Help. Implementing paging algorithms on the Linux kernel (for
virtual memory)
The Axon Research Group is a research group working on the C.University
of
Asuncion.
Our current research involves developing and implementing innovative
paging
strategies for virtual memory on OSes.
We have chosen Linux to implement several of these algorithms and test
them
for improved performance.
We've been enjoying hacking the Linux kernel, but we are getting a
little
jammed because we need accurate information on the kernel's paging
algorithm. The documentation that we've found doesn't seem to match our
kernel version. We're working with versions 2.2.15 and 2.2.14.
Maybe we're using a version that is so new that it doesn't have the
propper
documentation. We are willing to use an older version if it has good
documentation.
Any other valuable resources on kernel hacking in general and specially
memory management would be very useful.
We thank you for your comments and support.
Sincerely
Francisco Benza
Research Student
Axon Research Group
--
/*****************************************************
- "The trick is to keep breathing".
Shirley Manson
*****************************************************/
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Running a.out?
Date: Sun, 18 Jun 2000 04:07:15 GMT
Stephen Speicher <[EMAIL PROTECTED]> wrote:
> Is there any way to run these a.out executables on the newer
> RH 6.1 system?
Try 'modprobe binfmt_aout' You may also need to install the libc5
rpms.
--
Matt Gauthier <[EMAIL PROTECTED]>
------------------------------
From: "Nera" <[EMAIL PROTECTED]>
Subject: How to check the remained disk size in Linux
Date: Sun, 18 Jun 2000 12:57:43 +0800
Dear all
How to check the remained disk size in Linux, like under DOS?
Nera
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: How to check the remained disk size in Linux
Date: 18 Jun 2000 01:14:18 -0400
In article <8ihkeh$30r$[EMAIL PROTECTED]>,
Nera <[EMAIL PROTECTED]> wrote:
>Dear all
>
> How to check the remained disk size in Linux, like under DOS?
Dunno about DOS, under any UNIX it's df.
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
Date: Mon, 12 Jun 2000 21:53:36 -0400
From: Geoff Marshall <[EMAIL PROTECTED]>
Subject: Re: __P prefix in pthreads.h
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);
}
------------------------------
Date: Tue, 13 Jun 2000 21:23:45 -0400
From: "Dmitriy A. Fedorov" <[EMAIL PROTECTED]>
Subject: Re: Help with Compiler Errors
Timothy Sorrentino wrote:
>
> Linux, so I am quite lost right now! When I try to compile my driver, I
> get a lot of error messages about 'Dereferencing to incomplete pointer'
> among other error messages. Searching newsgroup postings, this error
> compile it by 'gcc -o tmdriver driver.c'
gcc -o tmdriver.o driver.c -c -O -D__KERNEL__ -DMODULE
-fno-strict-aliasing
and #include lots of headers.
------------------------------
Date: Tue, 13 Jun 2000 03:12:31 -0400
From: Jieun Lee <[EMAIL PROTECTED]>
Subject: difference between kmalloc and vmalloc
I have studied about linux kernel(ver. 1.0)... and I didn't understand
the difference kmalloc and vmalloc." In kmalloc, it service the
allocation of the real memory. but in vmalloc, it used to allocate the
kernel linear space. " What's mean?
I think the vmalloc can allocate only the linear space of "kernel".. and
then the kmalloc can allocate only the user linear space? ... I was
confused.. please help me..
------------------------------
Date: Wed, 14 Jun 2000 23:42:41 -0400
From: "Douglas Kilpatrick" <[EMAIL PROTECTED]>
Subject: Re: Catch system calls from an apps?
In article <[EMAIL PROTECTED]>, Gautier Fabrice
<[EMAIL PROTECTED]> wrote:
> For Example:
> I've a modified read() in my lib, and i want it to call the libc read()
> how do I make a distinction between both? What happens if I do
I don't know what the best way is. I used platform-specific extensions to
directly trap the system call.
If you can compile the program, the -wrap option of GNU's ld might work.
Otherwise (linux x86 specific):
#include <asm/unistd.h>
ssize_t trap_read(int fd, void *buf, size_t count)
{
long __res;
__asm__ volatile ("int $0x80"
: "=a" (__res)
: "0" (__NR_read), "b" ((long)fd), "c" ((long)buf),
"d" ((long)count));
__syscall_return(ssize_t,__res);
}
ssize_t read(int fd, void *buf, size_t count)
{
ssize_t retval;
do_whatever();
retval = trap_read(fd, buf, count);
do_another_thing(); return retval;
}
Actually trying to compile this runs into lots of fun problems:
1) The compiler complains about the symbol conflict, so you have to
compile without linking in libc.
2) The definition of errno is in libc or libpthread, so you have to
link in libc.
Needless to say, the combination of 1 & 2 makes things fun. I'm sure there
is a good way of doing it, but I didn't figure out what it was.
Doug
--
Doug Kilpatrick [EMAIL PROTECTED]
------------------------------
Date: Tue, 13 Jun 2000 16:40:26 -0400
From: Erik Niessen <[EMAIL PROTECTED]>
Subject: Get an ide-contr. working on a mips?
Hello,
I am trying to get a CMD-646 ide-controller working on an embedded
mips-platform.
Here is what I tried so far. I got the source from ftp.mips.com.
Compiled it and the
core-kernel is working now. I put the ide pci-card in and I changed the
setup file so
that ide_ops is using the std_ide_ops. I recompiled and try to boot,
but no luck.
Have a look at the output:
CMD646: IDE controller on PCI bus 00 dev 98
CMD646: not 100% native mode: will probe irqs later
EN: hwif->io_ports[IDE_SELECT_OFFSET]=0xfffe
probing for hda: present=0, media=32, probetype=ATA
Unable to handle kernel paging request at virtual address 0000fffe, epc
== 800c3
980, ra == 800c3958
Oops: 0001
It seems the IDE-driver is not yet ready for the mips? After some
debugging it seems
that the oops is at the line SELECT_DRIVE(hwif,drive) in ide-probe.c.
This line does
an OUT_BYTE and it uses the hwif->io_ports as input. That is incorrect
it should use
the base-address. So instead of the SELECT_DRIVE I did a OUT_BYTE with
base-address0 and I get the following output
CMD646: IDE controller on PCI bus 00 dev 98
CMD646: not 100% native mode: will probe irqs later
EN: hwif->io_ports[IDE_SELECT_OFFSET]=0xfffe
probing for hda: present=0, media=32, probetype=ATA
Unable to handle kernel paging request at virtual address 11fffffe, epc
== 800c3
970, ra == 800c3960
Oops: 0001
$0 : 00000000 800f0000 11fffffe 000000a0
$4 : 800f2194 00000001 00000034 1000fc01
$8 : 0000fc00 ffff00ff 00000001 00000000
$12: 800ddb30 00000020 80187335 80187336
$16: 11fffffe 80186bb0 80186bb0 80186b94
$20: 000000ec 80186bf8 80186bd2 80186be8
$24: 0000006b 00000064
$28: 80ff8000 80ff9e58 80186be2 800c3960
epc : 800c3970
Status: 1000fc03
Cause : 0080000c
Process swapper (pid: 1, stackpage=80ff8000)
Stack: 800dc010 80186c00 00000000 00000020 800dc044 800e7498 80186bd0
80186bb0
80186c00 00000000 80186b94 800c3ddc 00000000 00000000 80ffc7fc
80ffc800
800e95ac 1000fc01 1000fc01 80186cc1 80186be3 0000000a 00000000
80ff9ee8
80186b94 0000000a 00000001 80010428 04000000 00000000 80186be2
800c4af8
8016e94d 0000003c 06461095 00808000 00000001 00000001 00000001
00000001
00000001 ...
Call Trace: [<800dc010>] [<800dc044>] [<800c3ddc>] [<800c4af8>]
[<800682a4>] [<8
00dba78>] [<8006a258>] [<800682a4>] [<800682a4>] [<800682a4>]
[<800682b4>] [<800
7a03c>] [<800d4494>] [<8006a268>] [<8006a258>]
Code: 8c420af0 92430024 00501021 <a0430000> 3c04800e 0c01e776
2484c050 0c03
0cc4 00000000
Some questions:
- Can I safely use the OUT_BYTE function on the mips?
- How do I communicate with the ide-drive correctly?
- Maybe someone can give me a pointer that would solve my problem?
Thanks for reading so for and I hope someone can help me out.
Cheers,
Erik
------------------------------
Date: Fri, 16 Jun 2000 17:17:59 -0400
From: Brett Johnson <[EMAIL PROTECTED]>
Subject: Re: Kernel memory and DMA
Reply-To: [EMAIL PROTECTED]
Carlton Teel wrote:
>
> My company is currently using Solaris 7 on a project. We have a
> PCI board that needs to allocate kernel memory to do DMA tasks. With
> Solaris 7, our limit is 256 MB. We have been told by Sun that Solaris 8
> will support 1 GB when Update 2 of Solaris 8 is released. An
> application we plan on developing next year will need 3 GB of kernel
> memory locked down to do the DMA function. Does Linux support this? If
> so, is it different between the various distributions of Linux?
Wuf, that is one honkin' DMA buffer! What platform are you wanting to
run Linux on? Be aware that on the IA32 platform, you're restricted to
a maximum of 4gig physical RAM.
There are a couple of approaches to getting memory for a DMA buffer:
1) you can call alloc_pages, but that's limited to 64k per allocation.
So, if you want 3gig of contiguous memory, you'll have to call it a
lot of times, and hope the memory is all allocated contiguously!
2) you can tell the kernel not to use the upper 3gig of physical RAM
before it boots, then map this memory into kernel space later. This
is done from the lilo prompt as you're booting up, i.e.:
lilo: linux mem=1024M
on a 4gig machine this will leave 3gigs of RAM unused by the kernel,
then the driver for your card is free to map & use this memory.
Cheers!
--
Brett Johnson <[EMAIL PROTECTED]>
HP Technical Solutions Laboratory
- i n v e n t -
------------------------------
Date: Tue, 13 Jun 2000 17:01:06 -0400
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Help with Compiler Errors
Reply-To: [EMAIL PROTECTED]
On Tue, 13 Jun 2000 20:25:39 GMT, Timothy Sorrentino <[EMAIL PROTECTED]> wrote:
>Greetings,
> This is my first attempt at writing a driver and I am also new to
>Linux, so I am quite lost right now! When I try to compile my driver, I
>
>get a lot of error messages about 'Dereferencing to incomplete pointer'
>among other error messages.
[snip ]
>Searching newsgroup postings, this error
>seems to be caused a lot by out of date libraries or programs.
You can't use your system libraries in the kernel.
>static int TMpci_open(struct inode * inode, struct file * filp)
>{
> MOD_INC_USE_COUNT;
> switch (MINOR(inode->i_rdev)) // !!! Derefrencing pointer to
>incomplete type
Do you know what an incomplete type is? It's a type that is declared when a
struct or union tag is introduced without the struct body, or when an array is
declared without a dimension. You cannot define objects having an incomplete
type, nor can you dereference pointers to incomplete types.
What is likely happening is that you have not included the correct header which
defines the complete type ``struct inode''. Thus the type ``struct inode'' in
this scope then comes from the function's own parameter declaration, which
makes it an incomplete type.
--
#exclude <windows.h>
------------------------------
Date: Sat, 17 Jun 2000 00:30:03 -0400
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: [Help:] Problems with NFS Daemon under 2.2.16 kernel
Reply-To: [EMAIL PROTECTED]
On Fri, 16 Jun 2000 20:58:54 +0200, Jose Manuel Benitez Sanchez
<[EMAIL PROTECTED]> wrote:
>Jun 14 12:21:46 bahia rpc.nfsd: nfssvc: Function not implemented
Jose, you did not compile the NFS server kernel code! Reconfigure your
kernel, and say yes to be prompted for new, experimental and incomplete
code. Then the NFS server configuration option will be available to you.
--
#exclude <windows.h>
------------------------------
Date: Tue, 13 Jun 2000 16:48:11 -0400
From: David Weis <[EMAIL PROTECTED]>
Subject: Re: Help with Compiler Errors
A few things I noticed:
Make sure you are putting the array declaration for TMpci_mem_fops before
you are using it, unless it has a forward declaration.
Be sure you are including the file linux/fs.h
david
On Tue, 13 Jun 2000, Timothy Sorrentino wrote:
> Greetings,
> This is my first attempt at writing a driver and I am also new to
> Linux, so I am quite lost right now! When I try to compile my driver, I
>
> get a lot of error messages about 'Dereferencing to incomplete pointer'
> among other error messages. Searching newsgroup postings, this error
> seems to be caused a lot by out of date libraries or programs. I'm not
> sure if that's what's causing me trouble - the compiler also reports
> that there is an error 'Dereferencing to incomplete pointer' in Time.h
> of the Linux distribution, leading me to believe that some of my Linux
> components might need to updated. Has anyone else ran in to this and
> can help me get my driver to compile? Is it out of date libraries or an
>
> error in my code?
>
> If it helps, I just installed Red Hat 6.1 and have not upgraded any
> packages. I have Libc 6 2.1.2 and 'gcc --version' reports 'egcs
> 2.91.66'
>
> TIA,
> Tim
>
> Here's a portion of the code with errors, if it's useful: I'm tyring to
>
> compile it by 'gcc -o tmdriver driver.c'
> Let me know if I need to provide more info
>
> static int TMpci_open(struct inode * inode, struct file * filp)
> {
> MOD_INC_USE_COUNT;
> switch (MINOR(inode->i_rdev)) // !!! Derefrencing pointer to
> incomplete type
> {
> case 1:
> if (noBoard)
> return -ENODEV;
> filp->f_op = &TMpci_mem_fops; // !!! Derefrencing pointer to
> incomplete type
> break;
> default:
> return -ENODEV;
> }
> return 0;
> }
>
> static int TMpci_close(struct inode * inode, struct file * filp)
> {
> MOD_DEC_USE_COUNT;
> return 0;
> }
>
> struct file_operations TMpci_fops = { // !!! Has initializer but
> incomplete type
> NULL, // lseek
> NULL, // read
> NULL, // write
> NULL, // readdir
> NULL, // poll
> NULL, // ioctl
> NULL, // mmap
> TMpci_open, // open
> NULL, // flush
> TMpci_close, // release
> NULL, // fsync
> NULL, // fasync
> NULL, // check_media_change
> NULL, // revalidate
> NULL // lock
> };
>
>
>
>
>
>
--
David Weis | 10520 New York Ave, Des Moines, IA 50322
[EMAIL PROTECTED] | Voice 515-278-0133 Ext 231
| http://www.perfectionlearning.com/
When they took the Fourth Amendment, I was quiet because I didn't deal drugs.
When they took the Fifth Amendment, I was quiet because I was innocent.
When they took the Second Amendment, I was quiet because I didn't own a gun.
Now they've taken the First Amendment and I can't say anything.
------------------------------
Date: Sat, 17 Jun 2000 07:43:18 -0400
From: "simon" <[EMAIL PROTECTED]>
Subject: Re: Loading RedHat 6.2 onto Toshiba Satellite 2655XDVD
for anyone running on Laptops check out
http://www.cs.utexas.edu/users/kharker/linux-laptop/
or http://www.cjnetworks.com/~jeffrey/linux/ or
http://www.cs.utexas.edu/users/kharker/linux-laptop/volunteer.html
I am currently running mandrake 7.0 on an acer512dx but am not happy with
the kernel am about to try it with 2.2.14 this kernel works great with
slackware 7.0 , this is the best success distro on this laptop so far apart
from redhat 5.2 which was great but I had to upgrade nearly everything for
kernel and pcmcia , I have not had much luck with my isdn card yet though.
------------------------------
** 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
******************************