Adding syscall to embedded Linux
Posted on 2014-01-27
I'm trying to a new system call to my embedded system, but for some reason I cannot get it to compile. The new <sys/my_time.h> is always not found.
Essentially I am trying to create a function that will pass back the number of jiffies from the kernel. I have looked at several post on google, but they do not help to resolve the compilation issue I am having.
Linux 2.4-8 using uCLibc-0.9.8.
This system is quite particular, so it may be difficult to provide much assistance. But I have already performed the following steps. If there is anything that I am missing, please let me know.
1. Added "sys_my_time" to "call.S" (hosting the syscall table).
2. Added "__NR_my_time 257" to unistd.h.
3. Added function implementation to sys.c. (where "times()" has been implemented)
4. Added "my_time.h" file to uclibc/include/sys" directory. (same as "times.h").
5. Added "my_time.c" file to uclibc/libc/sysdeps/linux/common" directory. (same as "times.c")