Hi all After reading the info on kernelnewbies.org , I removed the links i had made and restored the original copies I had saved. Also in the syscall defn file, I changed #include<sys/time.h> to linux/time.h.I also included -I/usr/src/linux/include in the Makefile for the syscall file . Now the kernel compiles with no errors. But user pgm does not see the new call. Error: at line 5,undefined reference to __NR_mycall and some other error regarding errno. The user pgm is : #include<stdio.h> #include<sys/time.h> #include<asm/unistd.h> _syscall1(int, mycall, struct timeval*,t); main() { int ret; struct timeval t; ret = mycall(&t); } In /usr/src/linux/include/asm/unistd.h, i added #define __NR_mycall 191 In /usr/src/linux/arch/i386/kernel/entry.S, i added .long SYMBOL_NAME(sys_maycall) I also changed the Makefile in the source tree where i put the defnition of the syscall to include the new dir and its object files. Is there anything else that shuld be done and I have left out? Thanx in advance Narasimhamurthy Giri, Clemson University Computer Science Dept. ------------------------------------------------------------------------------- Judge not lest ye be judged yourself. ------------------------------------------------------------------------------- On Wed, 13 Mar 2002, Seth Arnold wrote: > On Wed, Mar 13, 2002 at 07:42:58PM -0500, Narasimhamurthy Giridhar wrote: > > The include files for this are > > > > #include<asm/uaccess.h> > > #include<sys/time.h> > > <sys/time.h> is an include file provided by glibc (or your system C > library) -- it is not a kernel include file. Try <linux/time.h> instead. > > > #include<linux/kernel.h> > > > > This gives a lot of parse errors in uaccess.h and many files it includes > > like sched.h etc. .. errors like semicolon missing and } missing. > > I think I've seen these errors mostly when a type definition is broken. > (either typedef or struct or union..) > > > Before compiling, I made certain links : > > > > /usr/include/asm a link to /usr/src/linux/include/asm > > > > and /usr/include/linux a link to /usr/src/linux/include/linux. > > Absolutely not. This was the norm for 1.2.x series kernels, and may have > been normal for 2.0.x kernels, but I think 2.2 (and most definately 2.4) > do not put includes in /usr/include/ -- /usr/include/ is used for user- > land programs, and is not to be used when compiling kernels. glibc > provides its own kernel headers in /usr/include/linux -- and > applications must be able to communicate with glibc, which does the > major work for communicating with the kernel. > > Take a look at the example modules on kernelnewbies.org, as well as the > FAQ; these are explained pretty well there. > > If you have access to a debian machine, install the kernel-package > package, and read /usr/share/doc/kernel-package/*eadme*eader -- it is a > great description of the new setup. > > Cheers! > > -- > UniNet InfoSec Conference April 15-19 http://infosec.uninet.edu > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/