From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How to test a syscall prior to compiling the kernel
Date: Tue, 3 Jun 2014 21:19:35 -0700 [thread overview]
Message-ID: <20140604041935.GB30014@kroah.com> (raw)
In-Reply-To: <CAEK-7JKk4cTekTesdjGyN6NpPAXcWcr2uetrCZ+mr6jUBKL8MQ@mail.gmail.com>
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
next prev parent reply other threads:[~2014-06-04 4:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 3:22 How to test a syscall prior to compiling the kernel Dipanjan Das
2014-06-04 3:52 ` Greg KH
2014-06-04 3:59 ` Dipanjan Das
2014-06-04 4:14 ` Augusto Mecking Caringi
2014-06-04 4:19 ` Greg KH [this message]
[not found] ` <CAOUBrm3BQyVJys4++o6zPUVxp7+dDSvPiF9MFpOUzSLpyzhN7g@mail.gmail.com>
2014-06-04 8:24 ` navid Rahimi
2014-06-04 15:51 ` Andev
2014-06-04 17:56 ` Valdis.Kletnieks at vt.edu
2014-06-04 18:33 ` Andev
2014-06-04 18:42 ` Greg KH
2014-06-04 19:02 ` Andev
2014-06-04 22:14 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140604041935.GB30014@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).