Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2016 08:19:22 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Nan Xiao <nan@chinadtrace.org>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: A question about downloading FreeBSD kernel code
Message-ID:  <alpine.BSF.2.20.1607040811050.89438@wonkity.com>
In-Reply-To: <2016070420234846698317@chinadtrace.org>
References:  <2016070420234846698317@chinadtrace.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Jul 2016, Nan Xiao wrote:

> Hi all,
>
> I want to install FreeBSD kernel source files, and my FreeBSD kernel version is:
>
> # freebsd-version -k
> 10.3-RELEASE-p4
>
> But from ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/, there is only 10.3-RELEASE code.
> So is it mapping to my kernel version (10.3-RELEASE-p4)? Or where should I download the right
> 10.3-RELEASE-p4 code?
>
> Thanks very much in advance!

Usually, uname -a will show the revision number of the code in use. 
That revision number can be used to check out the correct version of the 
source from the repository.  For example, on a 10-STABLE system I have 
here:

uname -a
FreeBSD lightning 10.3-STABLE FreeBSD 10.3-STABLE #0 r302243: Mon Jun 27 19:27:54 MDT 2016     root@lightning:/usr/obj/usr/src/sys/LIGHTNING  amd64

So this is built from revision 302243 of the source.

If /usr/src exists, it is deleted to make sure there is no old source in 
there:

rm -rf /usr/src

Then check out the source for that revision.  I use 'svn' here because I 
have installed the Subversion port, but svnlite is in the base system 
and usually works the same.

Source for a -RELEASE system will come from the releng branch, so your 
checkout will look like this (the nnnnnn coming from the uname -a 
output):

svn checkout -r nnnnnn https://svn.freebsd.org/base/releng/10.3 /usr/src



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1607040811050.89438>