Lots of articles and posts on internet tell how to install the kernel sources for FreeBSD x-RELEASE versions, but none of them for X-STABLE.
For example, my FreeBSD version is 10.2-STABLE.
How can I install its kernel sources?
This method worked for me:
# pkg install devel/subversion # svn checkout https://svn0.us-west.freebsd.org/base/stable/10 /usr/src # cd /usr/src # make clean In order to find the sources for any other (i.e: future, older... etc) version, note the path in the URL: change 10 by 11 when published... and so on.
P.S: I don't know if the latest 'make clean' line is mandatory. I issued it, and the compilation worked.