I installed kernel 13.0-RC5 but want to do download the sources

That worked, but where do I find the kernel sources for this, via git or subversion.
[ I deleted /usr/src by accident and want to repopulate it for this specific kernel ]
 
Branches for 13 aren't in subversion. Most light-weight variant with git (single branch, no history):
git clone https://git.freebsd.org/src.git --depth 1 --branch releng/13.0 /usr/src

Single branch with history:
git clone https://git.freebsd.org/src.git --branch releng/13.0 --single-branch /usr/src

Full repo (and still checkout 13.0 branch):
git clone https://git.freebsd.org/src.git --branch releng/13.0 /usr/src

The "tiny" flavor of git is enough for this (package: git-tiny, port: devel/git@tiny).

Then, if you're not at all interested in actually using git, you could also use net/gitup
 
Error :
error: pathspec 'releng/13' did not match any file(s) known to git.
[ So i'm left with an installed kernel without sources :)]
 
They are also included online: 13.0-RC5 - the src.txz. If you want them to be extracted in /usr/src you can (among others) use: tar --unlink -C / -xvPjf src.txz).
 
Then you mistyped the command. I missed the .0 part before editing my post, but still, if git thinks this is a path, you didn't give it as argument to the --branch option.
 
Any of the 3 I presented. It depends on whether you want history or other branches in your local clone.

And if you don't care about history and branches at all, I suggest you have a look at net/gitup instead.
 
Note that if using gitup, you may need to edit /usr/local/etc/gitup.conf. It defaults to pulling 11.4. You have to find the section marked release, and change the default 11.3 to 13.0.
For using git, I have page on it at https://srobb.net/fbsdgit.html. But as I only need it for pulling source, and not many of the other things one can do with it, net/gitup is sufficient for me.
 
Why not use the distribution media? Like mount the memstick installer and extract src?
Source code is located at /usr/freebsd-dist/src.txz
Why would you need to download it if you just installed it. Obviously you have the source.
 
Back
Top