diff options
-rw-r--r-- | kconfig/uclibc-kconfigs/uclibc.kconfig | 19 | ||||
-rwxr-xr-x | mk/uclibc.mk | 20 |
2 files changed, 39 insertions, 0 deletions
diff --git a/kconfig/uclibc-kconfigs/uclibc.kconfig b/kconfig/uclibc-kconfigs/uclibc.kconfig index 0918008..84fdcff 100644 --- a/kconfig/uclibc-kconfigs/uclibc.kconfig +++ b/kconfig/uclibc-kconfigs/uclibc.kconfig @@ -40,8 +40,26 @@ choice config EMBTK_UCLIBC_VERSION_0_9_30 bool "uClibc-0.9.30" select EMBTK_UCLIBC_NEED_PATCH + config EMBTK_UCLIBC_VERSION_GIT + bool "Use a branch of uClibc git repository" + help + see http://git.uclibc.org/uClibc endchoice +config EMBTK_UCLIBC_GIT_BRANCH + string "Branch to use" + default "master" + depends on EMBTK_UCLIBC_VERSION_GIT + help + The branch of the git repository to use. + +config EMBTK_UCLIBC_GIT_REVISION + string "Revision to checkout" + default "HEAD" + depends on EMBTK_UCLIBC_VERSION_GIT + help + The revision of the git repository to checkout. + config EMBTK_UCLIBC_NEED_PATCH bool @@ -154,6 +172,7 @@ config EMBTK_UCLIBC_VERSION_STRING string default "0.9.30.1" if EMBTK_UCLIBC_VERSION_0_9_30_1 default "0.9.30" if EMBTK_UCLIBC_VERSION_0_9_30 + default "git" if EMBTK_UCLIBC_VERSION_GIT if KEMBTK_UCLIBC_TARGET_arm source kconfig/uclibc-kconfigs/uclibc-arm.kconfig diff --git a/mk/uclibc.mk b/mk/uclibc.mk index dcc8198..87fe7e0 100755 --- a/mk/uclibc.mk +++ b/mk/uclibc.mk @@ -25,6 +25,9 @@ UCLIBC_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_UCLIBC_VERSION_STRING))) UCLIBC_SITE := http://www.uclibc.org/downloads UCLIBC_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/uclibc +UCLIBC_GIT_SITE := git://git.busybox.net/uClibc +UCLIBC_GIT_BRANCH := $(subst ",,$(strip $(CONFIG_EMBTK_UCLIBC_GIT_BRANCH))) +UCLIBC_GIT_REVISION := $(subst ",,$(strip $(CONFIG_EMBTK_UCLIBC_GIT_REVISION))) UCLIBC_PACKAGE := uClibc-$(UCLIBC_VERSION).tar.bz2 UCLIBC_BUILD_DIR := $(TOOLS_BUILD)/uClibc-$(UCLIBC_VERSION) @@ -51,9 +54,26 @@ $(UCLIBC_BUILD_DIR)/.decompressed $(UCLIBC_BUILD_DIR)/.configured uclibc_download: $(call EMBTK_GENERIC_MESSAGE,"downloading uClibc-$(UCLIBC_VERSION) \ if necessary ...") +ifeq ($(CONFIG_EMBTK_UCLIBC_VERSION_GIT),y) + @test -e $(EMBTK)/src/uClibc-git || \ + git clone $(UCLIBC_GIT_SITE) $(EMBTK)/src/uClibc-git +ifneq ($(UCLIBC_GIT_BRANCH),master) + @-cd $(EMBTK)/src/uClibc-git; \ + git checkout master; \ + git pull; \ + git branch -D $(UCLIBC_GIT_BRANCH); \ + git checkout -b $(UCLIBC_GIT_BRANCH) origin/$(UCLIBC_GIT_BRANCH) +endif + @cd $(EMBTK)/src/uClibc-git; \ + git checkout $(UCLIBC_GIT_REVISION); \ + cd ..; \ + tar cjvf $(UCLIBC_PACKAGE) uClibc-$(UCLIBC_VERSION); \ + mv $(UCLIBC_PACKAGE) $(DOWNLOAD_DIR) +else @test -e $(DOWNLOAD_DIR)/$(UCLIBC_PACKAGE) || \ wget $(UCLIBC_SITE)/$(UCLIBC_PACKAGE) \ -O $(DOWNLOAD_DIR)/$(UCLIBC_PACKAGE) +endif ifeq ($(CONFIG_EMBTK_UCLIBC_NEED_PATCH),y) @test -e $(DOWNLOAD_DIR)/uClibc-$(UCLIBC_VERSION).patch || \ wget -O $(DOWNLOAD_DIR)/uClibc-$(UCLIBC_VERSION).patch \ |