How to test a syscall prior to compiling the kernel

navid Rahimi rahimi.nv at gmail.com
Wed Jun 4 04:24:05 EDT 2014


there is a video on youtube , its length is just ~14 min . search that
, look at that.
don't worry about wasting time . it add a simple syscall , and call it
from userspace code for testing, all in ~14 min .

google is your friend

best wishes,
-navid

On Wed, Jun 4, 2014 at 8:49 AM, Greg KH <greg at kroah.com> wrote:
> On Wed, Jun 04, 2014 at 09:29:39AM +0530, Dipanjan Das wrote:
>>
>> Hi Greg,
>>
>> You have misunderstood the question. That, too, because me being too brief.
>>
>> What I tried to mean is NOT to test the syscall after the modified kernel is
>> compiled and booted. That's easy.
>>
>> To add the syscall to the kernel, one needs to drop a C code implementing the
>> body of the call itself to some appropriate location of the kernel source tree.
>> Isn't it so? I am doing that for the first time and want to be sure that the
>> compilation, especially the includes work. Otherwise, the kernel compilation
>> may throw an error midway, thereby wasting my time.
>
> There are lots of example tutorials online for how to add a syscall to
> the kernel, have you tried them?  It should not take long to rebuild the
> kernel if you add a single syscall.  You can always just rebuild a
> single directory, or a single file, if you are worried about long build
> times to find syntax errors in your code.
>
> Try doing the build for one file first, as you do development, to not
> have to worry about build times.  Or, build on a ram disk, that goes
> much faster :)
>
> Hope this helps,
>
> greg k-h
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



More information about the Kernelnewbies mailing list