From mboxrd@z Thu Jan 1 00:00:00 1970 From: rahimi.nv@gmail.com (navid Rahimi) Date: Wed, 4 Jun 2014 12:54:05 +0430 Subject: How to test a syscall prior to compiling the kernel In-Reply-To: References: <20140604035223.GA28272@kroah.com> <20140604041935.GB30014@kroah.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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 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