2

I am trying to write my own system call in linux kernel version 3.8.8. I searched on the internet and there are steps how to do it. Especially this link http://franksthinktank.com/howto/addsyscall/ is good. However. even though I followed all the steps it didn't work. I got an error saying that no rule to make target needed by kernel/built-in.

Then I tried to move the systemcall in one of the .c files in kernel directory, it didn't work either. I am trying to follow the example in the above link as practice. Actually what I want to do is to get the time of the system so I need to access xtime variable of the system. So, I must implement my system call in timekeeping.c file.

I was wondering which files exactly I change in kernel version 3.8.8 in order to implement a system call?

Thank you.

4

1 回答 1

0

我的内核版本:3.8.1

发行版:Ubuntu 12.04

  1. 做一些准备(下载源,和一些必要的包)
  2. 修改“ linux-3.8.1/kernel”中的“ sys.c ”实现系统调用功能
  3. 修改“ linux-3.8.1/arch/x86/syscalls/”中的“ syscall_32.tbl ”添加索书号
  4. 使先生正确
  5. 制作菜单配置
  6. 使 -j4 > /dev/null
  7. 制作modules_install
  8. 进行安装
  9. 更新 grub
  10. 重启

您可以保持“ unistd.h ”不变

于 2013-05-04T15:08:08.303 回答