Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to add a systemcall to Linux, but in training data we need to change the file linux/arch/i386/kernel/entry.S or arch/x86/kernel/syscall_table_32.S. I can not found the files. I looked and could not find and I have not a folder named i386. please Help me. is Necessary.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

First of all you need the source code of the Linux kernel. You can download it at kernel.org or you install the package linux-source from Ubuntu. In the latter case you'll find some patches from Ubuntu applied.

Usually the sources live under /usr/src. If you have unpacked the files there or installed the package, you'll find the tree you mentioned above. So the most recent kernel version has a file called entry_32.S and entry_64.S in the subdirectory arch/x86/kernel. The part after arch has the name x86 and not i386 as you mentioned. If you want to use i386 you should choose a kernel version below 3.7, because i386 was removed from 3.7 on.

share|improve this answer

the entry_64.S file isn't the equivalent file that you need to modify... depending on what you want to do. If you're in the business of adding a custom syscall to your kernel, modify the file /arch/x86/syscalls/syscall_64.tbl .

share|improve this answer
    
** entry_64.S isn't equivalent to the syscall table, but it is to entry.S –  jazzyfresh Mar 8 '13 at 9:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.