From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Tim Harvey <tharvey@gateworks.com>
Cc: buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] how to get buildroot to update a git repo that has changes? (ie building HEAD vs a specific SHA)
Date: Sat, 07 May 2022 23:05:52 +0300 [thread overview]
Message-ID: <8735hl9kdt.fsf@tarshish> (raw)
In-Reply-To: <CAJ+vNU3KHR+J0y9o3CVOC+1zA6G3=kQG2G_bQ2PSegFho8c9BA@mail.gmail.com>
Hi Tim,
On Fri, May 06 2022, Tim Harvey wrote:
> On Thu, May 5, 2022 at 8:21 PM Baruch Siach <baruch@tkos.co.il> wrote:
>> On Thu, May 05 2022, Tim Harvey wrote:
>> > Greetings,
>> >
>> > I use buildroot to build a Linux kernel+ramdisk using:
>> > BR2_LINUX_KERNEL_CUSTOM_GIT=y
>> > BR2_LINUX_KERNEL_CUSTOM_REPO_URL=<gitrepo>
>> > BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION=<gitbranch>
>> >
>> > When the upstream branch changes I would like to build that kernel but
>> > I find that buildroot caches the repo in dl/linux/.git and doesn't
>> > seem to know how to check to see if there are new commits.
>> >
>> > I realize that this is atypical as typically you want to configure
>> > buildroot for a specific package gitsha/tag.
>> >
>> > How would I go about getting buildroot to update the repo? I don't
>> > particularly want to rm dl/linux I want to instead somehow check to
>> > see if the repo needs a refresh then refresh it without a massive
>> > network download.
>>
>> Using a branch name for _VERSION is not supported. See the rationale in
>> the manual section 18.6.2, note on LIBFOO_VERSION description.
>>
>> https://buildroot.org/downloads/manual/manual.html
>>
>> You might want to consider using OVERRIDE_SRCDIR to make Buildroot build
>> your local kernel source tree. See section 8.14.6 in the manual.
>
> Thanks for the references. I do understand that it is not supported. I
> guess I was looking for a few simple lines of shell that would tell me
> if the cached repo was out of date so that I could remove it.
> # get branch from BR2 config
> KERNEL_BRANCH=$(grep BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION .config |
> cut -d= -f2 | tr -d \")
> # get the HEAD commit from the BR2 cache
> KERNEL_HEAD=$(git -C dl/linux/git/ rev-parse $KERNEL_BRANCH)
> ^^^ but I'm not sure how to check to see what the latest revision is
> on the remote branch?
Check 'git ls-remote'.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-05-07 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 23:17 [Buildroot] how to get buildroot to update a git repo that has changes? (ie building HEAD vs a specific SHA) Tim Harvey
2022-05-06 2:56 ` Matt Flax
2022-05-06 3:13 ` Baruch Siach via buildroot
2022-05-06 17:39 ` Tim Harvey
2022-05-07 20:05 ` Baruch Siach via buildroot [this message]
2022-05-11 15:28 ` Tim Harvey
2022-05-11 17:06 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735hl9kdt.fsf@tarshish \
--to=buildroot@buildroot.org \
--cc=baruch@tkos.co.il \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox