linux/uboot: add support for custom Mercurial repositories
PATCH 1/1 linux/uboot: add support for custom Mercurial repositories
This small patch series adds support for custom Mercurial repositories. The last patch also lines up the configuration options between git/mercurial, but can be left out if it isn't deemed desirable.
--- boot/uboot/Config.in | 20 ++++++++++++++------ boot/uboot/uboot.mk | 5 ++++- linux/Config.in | 29 +++++++++++++++++++---------- linux/linux.mk | 5 ++++- 4 files changed, 41 insertions(+), 18 deletions(-)
PATCH 1/1 linux: add support for custom Mercurial repository
--- linux/Config.in | 27 ++++++++++++++++++--------- linux/linux.mk | 5 ++++- 2 files changed, 22 insertions(+), 10 deletions(-)
linux/Config.in +18 -9
@@ -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,25 +68,28 @@ 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" - default "HEAD" - depends on BR2_LINUX_KERNEL_CUSTOM_GIT +config BR2_LINUX_KERNEL_CUSTOM_REPO_URL + string "URL of custom repository" + +config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION + string "Custom repository version" + default "HEAD" if BR2_LINUX_KERNEL_CUSTOM_GIT + default "tip" if BR2_LINUX_KERNEL_CUSTOM_HG 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.8.3" if BR2_LINUX_KERNEL_3_8 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
linux/linux.mk +4 -1
@@ -13,8 +13,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.bz2 # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
PATCH 1/1 u-boot: add support for custom Mercurial repository
In reply to Thomas De Schampheleire--- boot/uboot/Config.in | 15 +++++++++------ boot/uboot/uboot.mk | 5 ++++- 2 files changed, 13 insertions(+), 7 deletions(-)
boot/uboot/Config.in +9 -6
@@ -47,6 +47,9 @@ config BR2_TARGET_UBOOT_CUSTOM_TARBALL config BR2_TARGET_UBOOT_CUSTOM_GIT bool "Custom Git repository" +config BR2_TARGET_UBOOT_CUSTOM_HG + bool "Custom Mercurial repository" + endchoice if BR2_TARGET_UBOOT_CUSTOM_TARBALL
@@ -66,7 +69,7 @@ config BR2_TARGET_UBOOT_VERSION default "2011.09" if BR2_TARGET_UBOOT_2011_09 default "2011.06" if BR2_TARGET_UBOOT_2011_06 default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL - default $BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION if BR2_TARGET_UBOOT_CUSTOM_GIT + default $BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR string "custom patch dir"
@@ -77,13 +80,13 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR Most users may leave this empty -if BR2_TARGET_UBOOT_CUSTOM_GIT +if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG -config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL - string "URL of custom Git repository" +config BR2_TARGET_UBOOT_CUSTOM_REPO_URL + string "URL of custom repository" -config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION - string "Custom Git version" +config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION + string "Custom repository version" endif
boot/uboot/uboot.mk +4 -1
@@ -17,8 +17,11 @@ UBOOT_TARBALL = $(call qstrip,$(BR2_TARG UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL))) UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL)) else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y) -UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL)) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = git +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = hg else # Handle stable official U-Boot versions UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot
PATCH 1/1 linux/uboot: line-up repository-related configuration options
In reply to Thomas De SchampheleireAlthough the configuration options for custom repository locations and versions are very similar between the linux and uboot packages, there are some minor differences. This patch lines up both packages.
---
Note: one remaining difference is that there are help texts in linux for options BR2_LINUX_KERNEL_CUSTOM_GIT and BR2_LINUX_KERNEL_CUSTOM_HG. I didn't add them to uboot because it seems a bit redundant, but if you prefer we can line this up as well (either add help texts to uboot or remove them from linux).
boot/uboot/Config.in | 5 +++++ linux/Config.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-)
boot/uboot/Config.in +5 -0
@@ -87,6 +87,11 @@ config BR2_TARGET_UBOOT_CUSTOM_REPO_URL config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION string "Custom repository version" + default "HEAD" if BR2_TARGET_UBOOT_CUSTOM_GIT + default "tip" if BR2_TARGET_UBOOT_CUSTOM_HG + help + Revision to use in the typical format used by Git/Mercurial + E.G. a sha id, a tag, branch, .. endif
linux/Config.in +1 -1
@@ -47,7 +47,7 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL specific kernel source tarball config BR2_LINUX_KERNEL_CUSTOM_GIT - bool "Custom Git tree" + bool "Custom Git repository" help This option allows Buildroot to get the Linux kernel source code from a Git repository.