LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-01-2011, 04:55 AM   #1
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Rep: Reputation: Disabled
linux kernel source code


i am a new linux user. i want to download linux kernel source code for understanding about system calls. At http://www.kernel.org/ i am getting several things. i am not getting what to download. i want entry.s file. can any one help me??
 
Old 11-01-2011, 05:06 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,053

Rep: Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670
If you can't get it from kernel.org (normally), you're looking for the wrong thing.
*Which* entry.S (note the capital) would you be looking for ?. And what did you download ?.

Perhaps you are jumping in the deep end.
 
Old 11-01-2011, 05:20 AM   #3
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
linux kernel source code

Quote:
Originally Posted by syg00 View Post
If you can't get it from kernel.org (normally), you're looking for the wrong thing.
*Which* entry.S (note the capital) would you be looking for ?. And what did you download ?.

Perhaps you are jumping in the deep end.
i am looking for this path...

linux/arch/i386/kernel/entry.S

i could not find i386.. actually, i have to add a new system call. i want help in that. whatever i studied till now, i found that i have to add number in unistd.h and in entry.S system calls table..( like this "ENTRY(sys_call_table)", i have to make another entry for my own system call. so, i want "entry.S".(its capital only). and, i read here only that for entry.S, i will need kernel source code. thats what, i want.. i am a new linux user. so, please, tell me what to do in detail. thatk you
 
Old 11-01-2011, 05:34 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Moved: This thread is more suitable in <Linux - Kernel> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 11-01-2011, 05:51 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
@www.kernel.org in the home page, look for stable releases (currently they are 3.0.4, 2.6.39.4, 2.6.38.8, 2.6.37.6), click on Full Source and you can start to download the tarball. If you need older releases, look for longterm versions in the same page or check in the kernel archives here: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/.
 
1 members found this post helpful.
Old 11-01-2011, 08:24 AM   #6
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
The closest I can find is linux/arch/x86/kernel/entry_32.S. Perhaps that?
 
1 members found this post helpful.
Old 11-01-2011, 09:06 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,053

Rep: Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670
The source trees for the x86 environments were merged some time back.
Blindly following some (apparently now outdated) document will get you nowhere. You need to be able to keep up (and adapt) as the kernel changes - which it does constantly.
 
1 members found this post helpful.
Old 11-02-2011, 12:45 AM   #8
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
As pointed by syg00 things might have changed from the time the document you are referring to was written, try out a few things and see what works.
 
Old 11-05-2011, 06:05 PM   #9
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
i want to make a new system call. i have edited all the files like
L/arch/x86/kernel/syscall_table_32.S
L/linux/include/asm-x86/unistd_32.h
L/include/linux/syscalls.h
i have changed the kernel makefile too
this is my system call
asmlinkage long sys_sysSum (int a, int b)
{
printk("calling sysSum\n");
return a+b;
}
bt, i am getting error
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’
what to do?? plz help..
 
Old 11-06-2011, 04:12 AM   #10
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
i have now compiled the kernel source code with my system call.
but, it is returning -1
please help me
 
Old 11-06-2011, 09:13 AM   #11
vardhan22
LQ Newbie
 
Registered: Nov 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
i got to know that, it is error no 38, function not implemented. can you please tell me in detail, what can be the cause? what is the problem??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where can i find linux kernel source code ? etika Linux - Newbie 4 04-14-2011 12:56 PM
[SOLVED] where is the kernel source code of linux? Gerwar Programming 2 03-07-2011 06:37 PM
How to download source code of the linux kernel? saagar Linux - Newbie 3 05-11-2009 04:07 PM
source code of linux kernel rohit83.ken Linux - Newbie 3 02-08-2008 07:49 PM
linux kernel source code legolas_t Programming 1 09-17-2004 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration