On Sun, Jan 24, 2021 at 01:08:05PM +0900, Yasuhiro Kimura wrote:
From: Steve Kargl <s...@troutmask.apl.washington.edu>
Subject: Getting /usr/src to match specific git hash?
Date: Sat, 23 Jan 2021 19:58:52 -0800

Suppose one has an empty /usr/src.

Suppose further that one had to re-install a 32-bit
i386-*-freebsd with the 24 Dec 2020 image available
from freebsd.org.

uname -a for the booted kernel shows

% uname -a
FreeBSD mobile 13.0-CURRENT FreeBSD 13.0-CURRENT #0 \
3cc0c0d66a0-c255241(main)-dirty: Thu Dec 24 05:43:23 UTC 2020 \
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/i386.i386/sys/GENERIC i386

How does one use git to pull the exact sources that match
this specifc kernel?

cd /usr
git clone https://git.freebsd.org/src.git
cd src
git checkout 3cc0c0d66a0

I have the exact same issue. The installation I have is:

13.0-CURRENT #0 2ed50808d2b-c254384(main): Thu Nov 12 10:03:35 UTC 2020

The method described doesn't work for me for some reason:

[...]
root@rpi4:/usr # git clone https://git.freebsd.org/src.git Cloning into 'src'...
remote: Enumerating objects: 377505, done.
remote: Counting objects: 100% (377505/377505), done.
remote: Compressing objects: 100% (26583/26583), done.
remote: Total 3831969 (delta 371848), reused 350922 (delta 350922), pack-reused 
3454464
Receiving objects: 100% (3831969/3831969), 1.14 GiB | 6.28 MiB/s, done.
Resolving deltas: 100% (3034679/3034679), done.
Updating files: 100% (85162/85162), done.
root@rpi4:/usr # cd src
root@rpi4:/usr/src # git checkout 2ed50808d2b error: pathspec '2ed50808d2b' did not match any file(s) known to git

thanks,
--
J.

Attachment: signature.asc
Description: PGP signature

Reply via email to