Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3 of 6 v2] linux: add support for custom Mercurial repository
Date: Mon, 12 Aug 2013 08:12:13 +0200	[thread overview]
Message-ID: <52087CBD.10501@mind.be> (raw)
In-Reply-To: <702ce86cc56aec78ac12.1374650580@BEANTN0L019720>

On 24/07/13 09:23, Thomas De Schampheleire wrote:
[snip]
> diff --git a/linux/Config.in b/linux/Config.in
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -52,6 +52,12 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT
>   	  This option allows Buildroot to get the Linux kernel source
>   	  code from a Git repository.
>   
> +config BR2_LINUX_KERNEL_CUSTOM_HG
> +	bool "Custom Mercurial repository"
> +	help
> +	  This option allows Buildroot to get the Linux kernel source
> +	  code from a Mercurial repository.
> +
>   endchoice
>   
>   config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
> @@ -62,24 +68,26 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL_L
>   	string "URL of custom kernel tarball"
>   	depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
>   
> -config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL
> -	string "URL of custom Git repository"
> -	depends on BR2_LINUX_KERNEL_CUSTOM_GIT
> +if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG
>   
> -config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION
> -	string "Custom Git version"
> -	depends on BR2_LINUX_KERNEL_CUSTOM_GIT
> +config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
> +	string "URL of custom repository"

 Given that string options can't be propagated from their legacy values, 
and since the name of an option isn't really that important, I'd keep 
the _GIT_ names for the mercurial options as well.

 If we do rename the option symbol names, then I would make sure that it 
is propagated:

	default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != ""

+ add a comment to the .legacy file so these hacks can be removed
eventually.

 Also, you have to change the symbol names in the defconfigs as well
(there are already 10 uses of this symbol).


 Regards,
 Arnout

> +
> +config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
> +	string "Custom repository version"
>   	help
> -	  Git revision to use in the format used by git rev-parse,
> +	  Revision to use in the typical format used by Git/Mercurial
>   	  E.G. a sha id, a tag, branch, ..
>   
> +endif
> +
>   config BR2_LINUX_KERNEL_VERSION
>   	string
>   	default "3.10.1" if BR2_LINUX_KERNEL_LATEST_VERSION
>   	default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS
>   	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION
>   	default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
> -	default $BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION if BR2_LINUX_KERNEL_CUSTOM_GIT
> +	default $BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION if BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_GIT
>   
>   #
>   # Patch selection
> diff --git a/linux/linux.mk b/linux/linux.mk
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -14,8 +14,11 @@ LINUX_TARBALL = $(call qstrip,$(BR2_LINU
>   LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
>   LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
>   else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
> -LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
> +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
>   LINUX_SITE_METHOD = git
> +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y)
> +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
> +LINUX_SITE_METHOD = hg
>   else
>   LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
>   # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2013-08-12  6:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24  7:22 [Buildroot] [PATCH 0 of 6 v2] linux/uboot: add support for custom Mercurial repositories Thomas De Schampheleire
2013-07-24  7:22 ` [Buildroot] [PATCH 1 of 6 v2] Config.in.legacy: update description Thomas De Schampheleire
2013-07-27 13:50   ` Thomas Petazzoni
2013-08-12  5:59   ` Arnout Vandecappelle
2013-08-13 16:31   ` Arnout Vandecappelle
2013-08-14 16:27     ` Thomas De Schampheleire
2013-07-24  7:22 ` [Buildroot] [PATCH 2 of 6 v2] linux: don't take HEAD as default for git repositories Thomas De Schampheleire
2013-08-12  6:02   ` Arnout Vandecappelle
2013-08-13 10:00   ` Thomas Petazzoni
2013-07-24  7:23 ` [Buildroot] [PATCH 3 of 6 v2] linux: add support for custom Mercurial repository Thomas De Schampheleire
2013-08-12  6:12   ` Arnout Vandecappelle [this message]
2013-08-12 10:54     ` Thomas De Schampheleire
2013-08-12 11:01       ` Arnout Vandecappelle
2013-08-13  9:09     ` Thomas Petazzoni
2013-08-13 16:30       ` Arnout Vandecappelle
2013-08-14 17:06         ` Thomas De Schampheleire
2013-08-17  8:13           ` Thomas De Schampheleire
2013-08-19 16:05             ` Arnout Vandecappelle
2013-08-20  8:36               ` Thomas De Schampheleire
2013-08-21  5:40                 ` Arnout Vandecappelle
2013-08-27 12:29                   ` Thomas De Schampheleire
2013-08-27 14:14                   ` Thomas De Schampheleire
2013-07-24  7:23 ` [Buildroot] [PATCH 4 of 6 v2] u-boot: " Thomas De Schampheleire
2013-07-24  7:23 ` [Buildroot] [PATCH 5 of 6 v2] linux/uboot: line-up repository-related configuration options Thomas De Schampheleire
2013-07-24  7:23 ` [Buildroot] [PATCH 6 of 6 v2] linux: mention 3.x.y kernels in 'custom version' help Thomas De Schampheleire

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=52087CBD.10501@mind.be \
    --to=arnout@mind.be \
    --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