Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 35953

New system call in kernel 3.8.2

$
0
0
I must add my own system call which will print this text: "hello world!" in terminal.
There is a lot of guides and videos to add a new system call but they all are old and they aren't working above kernel 3.3.0 . So anybody know how to add a new systemcall in kernel 3.8.2 Fedora 18 32 or 64

i used this guide but it doesn't work

1 down vote


"How to add a new Linux kernel API in 3.3 version? -- for 64 bits OS

get kernel codes from www.kernel.org.

wget http://www.kernel.org/pub/linux/kern...-3.3.1.tar.bz2

Upzip it with command ‘tar xvfj XXX” to a folder For example : /root/kernel tar xvfj linux-3.3.1.tar.bz2

Edit file “/root/kernel/linux-3.3.1/arch/x86/syscalls/syscall_64.tbl” Add new line

312 64 husky1 sys_husky1

Eidt file “/root/kernel/linux-3.3.1/include/linux/syscalls.h” Add new function declaration

asmlinkage long sys_husky1(int fd);

before the line “#endif”

Add a new c file under “/root/kernel/linux-3.3.1/arch/x86/kernel” (I am using x86 CPU) Example :

Edit “/root/kernel/linux-3.3.1/arch/x86/kernel/Makefile” Add a new line “obj-y += husky.o”

goto /root/kernel/linux-3.3.1 folder and run command “make –j8”
"

Can anybody help me?

Viewing all articles
Browse latest Browse all 35953

Trending Articles