Search code examples
operating-systemkernelsystem-callsfreebsd

How to create a system call for FreeBSD kernel


I want to add new syscall to freeBSD kernel and I want to change syscalls.master file in /usr/src/sys/kern/syscalls.master. But this file is not existing in this path and /usr/src path is empty. What is wrong in this scenario?

Thanks in advance!


Solution

  • The first work for creating a system call is getting the source from svn. The first step is to determine which version of FreeBSD is being used with uname command.

    uname -r
    

    I have 10.3-RELEASE of freeBSD then I get this version from svn with the following command.

    svnlite checkout https://svn.freebsd.org/base/releng/10.3 /usr/src