Post by Patrick DoylePost by Samuel MartinHi,
Post by Patrick DoyleSo I'm sitting here watching my buildroot make do a complete clone of
the Linux kernel, where I have told it that I want a specific sha1
commit and I started wondering...
Why not do a shallow clone?
It tries, but cannot (see
https://git.buildroot.org/buildroot/tree/support/download/git#n34)
Oh bummer...
I wonder why git-clone -b doesn't accept a sha1sum. Oh well.
Oh, here's the answer (from
Post by Patrick DoyleIs there a way to fetch based on SHA id's instead of named references?
No, out of security concerns; imagine you included some proprietary
source code by mistake, and undo the damage by forcing a push with a
branch that does not have the incriminating code. Usually you do not
control the garbage-collection on the server, yet you still do not want
other people to fetch "by SHA-1".
Oh well.
Post by Patrick DoyleSo how do you folks handle pinning a revision of, for example, the
kernel? I naively assumed that I would specify
BR2_LINUX_KERNEL_CUSTOM_REPO_URL and
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION, which appears to do what I want,
but it seems wasteful to have to clone the whole Linux repo just to
get that one clone.
I suppose I could tell menuconfig that the (Atmel) kernel I am cloning
is available on github somehow and have the magic "fetch a sha1sum
from github" work. I'll go think about that for a bit.
No, that doesn't seem to work either. linux.mk doesn't use $(call
github). Oh well.
I suppose I could add support for that... does that seem useful to
folks other than I?
--wpd