From: Grant Likely <grant.likely@secretlab.ca>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 9/9] Add support for cloning Linux git trees
Date: Thu, 16 Oct 2008 17:09:13 -0600 [thread overview]
Message-ID: <fa686aa40810161609k3dd259abo7f10b4ed0d871163@mail.gmail.com> (raw)
In-Reply-To: <20081016211449.GE11249@mx.loc>
On Thu, Oct 16, 2008 at 3:14 PM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> On Thu, Oct 16, 2008 at 02:33:01PM -0600, Grant Likely wrote:
>>From: Grant Likely <grant.likely@secretlab.ca>
>>
>>Add an option in Linux advanced configuration to clone a git repository
>>directly (without a snapshot tarball).
>>
>>---
>>
>>This patch depends on the earlier patch to add the variable
>>$(LINUX26_VERSION_MOD) because the value of $(LINUX26_VERSION) is set
>>to 'git' here, but the kernel could report just about any version string.
Hi Bernhard, thanks for the comments. Replies below.
>>+if BR2_LINUX26_GIT
>>+config BR2_LINUX26_GIT_URL
>>+ string "git URL"
>>+ default "file:///path/to/git/tree/linux-2.6/"
>>+ help
>>+ URL to git repository
>>+
>>+ Any git URL works here, but you may find it more efficient to
>>+ clone from a tree on the same local filesystem using the file:///
>>+ protocol. The file:/// protocol allows git to hardlink to the
>>+ respository database which is faster and is requires less disk
>>+ space.
>>+
>>+config BR2_LINUX26_GIT_BRANCH
>>+ string "git branch"
>>+ default "master"
>>+ help
>>+ Name of branch to use in get repository
>>+endif
>>+
>> # -----------------------------------------------
>>
>> menu "Patches"
>>@@ -418,6 +447,7 @@ config BR2_LINUX26_VERSION
>> default "2.6.22.10" if BR2_LINUX_2_6_22_10
>> default "$(BR2_KERNEL_CURRENT_VERSION)"if BR2_LINUX_2_6_STABLE
>
> looking at the URI of this file. No wonder.
Umm, I don't know what you are referring to here. Are you referring
to using 'git' as the value of BR2_LINUX26_VERSION instead of the full
URL?
>> default $(BR2_CUSTOM_LINUX26_VERSION) if BR2_LINUX26_CUSTOM
>>+ default "git" if BR2_LINUX26_GIT
>>
>> menu "Linux Kernel Configuration"
>>
>>@@ -218,6 +219,14 @@ ifneq ($(DOWNLOAD_LINUX26_VERSION),$(LINUX26_VERSION))
>> mv -f $(PROJECT_BUILD_DIR)/linux-$(DOWNLOAD_LINUX26_VERSION) $(LINUX26_DIR)
>> endif
>> touch $@
>>+else
>>+$(LINUX26_DIR)/.unpacked:
>>+ @echo "*** Cloning kernel git tree"
>>+ git clone --depth 1 $(BR2_LINUX26_GIT_URL) $(LINUX26_DIR)
>>+ cd $(LINUX26_DIR) && \
>>+ git reset --hard origin/$(BR2_LINUX26_GIT_BRANCH)
>>+ touch $@
>>+endif # BR2_LINUX26_GIT
>
> I've done something like this for libtool, and i *think* that i will not
> waste _that_ much bandwith over and over again. Not my call, though.
It should be okay. Using the --depth flag keeps the download size to
the bear minimum. Using it on current mainline results in ~100MB of
git repo (as opposed to ~50MB for a bz2 tarball and ~300MB for a full
git clone). Also, in the help text I recommend to use a local git
tree to keep clone bandwidth costs to a minimum.
>>@@ -499,6 +508,9 @@ linux-status:
>
> linux-status. If you have make, you most likely have grep, too.
>
>> @echo BR2_LINUX26_CUSTOM=$(BR2_LINUX26_CUSTOM)
>> @echo BR2_CUSTOM_LINUX26_PATCH_SITE=$(BR2_CUSTOM_LINUX26_PATCH_SITE)
>> @echo BR2_CUSTOM_LINUX26_PATCH=$(BR2_CUSTOM_LINUX26_PATCH)
>>+ @echo BR2_LINUX26_GIT=$(BR2_LINUX26_GIT)
>>+ @echo BR2_LINUX26_GIT_URL=$(BR2_LINUX26_GIT_URL)
>>+ @echo BR2_LINUX26_GIT_BRANCH=$(BR2_LINUX26_GIT_BRANCH)
>> @echo BR2_LINUX_BSP_PATCH=$(BR2_LINUX_BSP_PATCH)
>> @echo BR2_PACKAGE_LINUX_USE_KCONFIG=$(BR2_PACKAGE_LINUX_USE_KCONFIG)
>> @echo BR2_PACKAGE_LINUX_USE_DEFCONFIG=$(BR2_PACKAGE_LINUX_USE_DEFCONFIG)
>>
I had mostly just been following the existing lead. I can drop this
change if it is preferred.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-10-16 23:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 20:32 [Buildroot] [PATCH 1/9] Typo fix in toolchain/external-toolchain/ext-tool.mk Grant Likely
2008-10-16 20:32 ` [Buildroot] [PATCH 2/9] Fix link flags of mtdutils Grant Likely
2008-10-16 20:51 ` Thomas Petazzoni
2008-10-16 21:15 ` hartleys
2008-10-16 21:22 ` Bernhard Reutner-Fischer
2008-10-16 21:38 ` Thomas Petazzoni
2008-10-16 21:47 ` Thomas Petazzoni
2008-10-16 20:32 ` [Buildroot] [PATCH 3/9] Add support for multilib external toolchains Grant Likely
2008-10-17 16:40 ` Shinya Kuribayashi
2010-01-12 11:06 ` Thomas Petazzoni
2010-01-12 19:15 ` Grant Likely
2008-10-16 20:32 ` [Buildroot] [PATCH 4/9] Add Xilinx UARTLITE and MPC5200 PSC device files (serial ports) Grant Likely
2008-10-17 10:24 ` Peter Korsgaard
2008-10-16 20:32 ` [Buildroot] [PATCH 5/9] Refactor invocation of make for kernel compiles Grant Likely
2008-10-16 21:55 ` Markus Heidelberg
2008-10-16 23:03 ` Grant Likely
2008-10-16 20:32 ` [Buildroot] [PATCH 6/9] Ask the kernel source where it will install modules Grant Likely
2008-10-30 9:52 ` [Buildroot] [PATCH 6/9] Ask the kernel source where it will installmodules Hans-Christian Egtvedt
2008-10-30 11:57 ` Hans-Christian Egtvedt
2008-10-30 13:20 ` [Buildroot] [PATCH 6/9] Ask the kernel source where it will install modules Thomas Petazzoni
2008-10-30 13:23 ` Grant Likely
2008-10-30 13:44 ` Thomas Petazzoni
2008-10-30 13:27 ` Hans-Christian Egtvedt
2008-10-30 14:04 ` Hans-Christian Egtvedt
2008-10-16 20:32 ` [Buildroot] [PATCH 7/9] Add last resort setting of $(LINUX26_BINLOC) for kernel image filename Grant Likely
2008-10-16 20:32 ` [Buildroot] [PATCH 8/9] RFC: Remove HOSTCFLAGS from kernel compile Grant Likely
2008-10-16 21:09 ` Bernhard Reutner-Fischer
2008-10-16 23:11 ` Grant Likely
2008-10-16 20:33 ` [Buildroot] [PATCH 9/9] Add support for cloning Linux git trees Grant Likely
2008-10-16 21:14 ` Bernhard Reutner-Fischer
2008-10-16 23:09 ` Grant Likely [this message]
2008-10-17 7:38 ` Bernhard Reutner-Fischer
2008-10-17 10:20 ` [Buildroot] [PATCH 1/9] Typo fix in toolchain/external-toolchain/ext-tool.mk Peter Korsgaard
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=fa686aa40810161609k3dd259abo7f10b4ed0d871163@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=buildroot@busybox.net \
/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