linux: add support for custom Mercurial repository
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Mon, 2 Sep 2013 20:07:54 +0000 (22:07 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 26 Oct 2013 23:51:09 +0000 (01:51 +0200)
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Config.in.legacy
linux/Config.in
linux/linux.mk

index 6cdd4e37af56c88e865a0ca3b13378d60d7e8a41..82b9579fd956bc50970360f13ce3c9d7d138bf11 100644 (file)
@@ -109,6 +109,36 @@ config BR2_PACKAGE_MODULE_INIT_TOOLS
          The 'module-init-tools' package has been removed, since it
          has been depracated upstream and replaced by 'kmod'.
 
+config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL
+       string "linux: the git repository URL option has been renamed"
+       help
+         The option BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL has
+         been renamed to
+         BR2_LINUX_KERNEL_CUSTOM_REPO_URL.
+
+config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL_WRAP
+       bool
+       default y if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != ""
+       select BR2_LEGACY
+
+# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL is still referenced from
+# linux/Config.in
+
+config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION
+       string "linux: the git repository version option has been renamed"
+       help
+         The option BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION has
+         been renamed to
+         BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION.
+
+config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP
+       bool
+       default y if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != ""
+       select BR2_LEGACY
+
+# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from
+# linux/Config.in
+
 ###############################################################################
 comment "Legacy options removed in 2013.08"
 
index 52291d8d71c8f1dfdd414eaaf1c65de34f917e35..a12102adf0411622956942326ae6eef2b8479017 100644 (file)
@@ -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,32 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
        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"
+       default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL \
+               if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != ""  # legacy
+
+config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
+       string "Custom repository version"
+       default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \
+               if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != ""  # legacy
        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.11.6" 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 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_GIT || BR2_LINUX_KERNEL_CUSTOM_HG
 
 #
 # Patch selection
index 901ce25c7c7f4827a6e94733d4b4710d0ce3cf87..29a3fd3ac0ce5aabdb672b47c2ca86a81bf966f0 100644 (file)
@@ -14,8 +14,11 @@ LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
 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