0

Hello!
how can i view the source code of my distro? i mean, do we need that if we were to create a new system call?
btw, i'm using centos 5.6

thank you in advance

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by rubberman
0

how can i view the source code of my distro?

I have not used CentOS, but in the Linux distros I have used, the kernel source code is generally found in the directory pointed to by the /usr/src/linux symlink.

do we need that if we were to create a new system call?

I would say have to say "No". For system calls, you would need to concentrate on the /usr/include/sys directory, and especially the unistd.h header file to be found in that directory.

Have a look at this article: http://en.wikipedia.org/wiki/Unistd.h

0

You can enable the source code repository and download/install the kernel source code with the yum command. Alternatively, you can download the kernel source code RPM file from a CentOS mirror site and install it directly, again with either yum or rpm commands. And yes, you will need the kernel source if you are going to add your own system call. I would strongly suggest that you do some studying of how to configure, build, and install custom kernels. There are a lot of documentation, manuals, etc on both the kernel.org and tldp.org (The Linux Documentation Project) web sites that will help a lot.

Edited by rubberman

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.