ia64/xen-unstable
changeset 17957:7dee3b001d9f
[BUILD] Support cloning Linux tree from a git repository.
Integrate the linux-2.6-tip tree as linux-2.6-tip-latest
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Integrate the linux-2.6-tip tree as linux-2.6-tip-latest
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Jul 03 10:45:46 2008 +0100 (2008-07-03) |
parents | 20215b87d0f3 |
children | 3f3510b35268 |
files | buildconfigs/mk.linux-2.6-tip-latest buildconfigs/src.git-clone |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/buildconfigs/mk.linux-2.6-tip-latest Thu Jul 03 10:45:46 2008 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +XEN_LINUX_SOURCE ?= git-clone 1.5 +LINUX_VER ?= 2.6-x86-latest 1.6 + 1.7 +IMAGE_TARGET ?= bzImage vmlinux 1.8 + 1.9 +XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config 1.10 + 1.11 +XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git 1.12 +XEN_LINUX_GIT_REMOTENAME ?= x86 1.13 +XEN_LINUX_GIT_REMOTEBRANCH ?= auto-latest 1.14 + 1.15 +EXTRAVERSION ?= 1.16 + 1.17 +include buildconfigs/mk.linux-2.6-common
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/buildconfigs/src.git-clone Thu Jul 03 10:45:46 2008 +0100 2.3 @@ -0,0 +1,60 @@ 2.4 +# Mercurial 2.5 +GIT ?= git 2.6 + 2.7 +LINUX_SRCDIR ?= linux-$(LINUX_VER).git 2.8 + 2.9 +# The URL of the remote GIT repository 2.10 +ifeq ($(XEN_LINUX_GIT_URL),) 2.11 +.ERROR: XEN_LINUX_GIT_URL not specified 2.12 +endif 2.13 + 2.14 +# The name to use for the remote repository 2.15 +XEN_LINUX_GIT_REMOTENAME ?= origin 2.16 + 2.17 +# The branch in the remote repository 2.18 +ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),) 2.19 +.ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified 2.20 +endif 2.21 + 2.22 +XEN_LINUX_GIT_LOCALBRANCH ?= master 2.23 + 2.24 +# Set XEN_LINUX_GITREV to update to a particlar revision. 2.25 +XEN_LINUX_GITREV ?= 2.26 + 2.27 +$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE) 2.28 + @set -e ; if [ -d $(LINUX_SRCDIR) ] && [ ! -d $(GIT_DIR) ] ; then \ 2.29 + echo "$(LINUX_SRCDIR) exists but is not a git repository." 1>&2 ; \ 2.30 + false ; \ 2.31 + fi 2.32 + 2.33 + @set -e ; if [ ! -e $(LINUX_SRCDIR)/.git ] ; then \ 2.34 + mkdir $(LINUX_SRCDIR) ; \ 2.35 + cd $(LINUX_SRCDIR) ; \ 2.36 + $(GIT) init-db ; \ 2.37 + fi 2.38 + 2.39 + @set -e ; cd $(LINUX_SRCDIR) ; \ 2.40 + if ! $(GIT) remote | grep -q $(XEN_LINUX_GIT_REMOTENAME) ; then \ 2.41 + echo "Adding remote git repository \`$(XEN_LINUX_GIT_URL)' as \`$(XEN_LINUX_GIT_REMOTENAME)'" ; \ 2.42 + $(GIT) remote add $(XEN_LINUX_GIT_REMOTENAME) $(XEN_LINUX_GIT_URL) ; \ 2.43 + fi 2.44 + 2.45 + @echo "Updating remote \`$(XEN_LINUX_GIT_REMOTENAME)'" 2.46 + @cd $(LINUX_SRCDIR) && $(GIT) fetch $(XEN_LINUX_GIT_REMOTENAME) 2.47 + 2.48 + @set -e ; cd $(LINUX_SRCDIR) ; \ 2.49 + if ! $(GIT) branch -l | grep -q $(XEN_LINUX_GIT_LOCALBRANCH) ; then \ 2.50 + $(GIT) branch --track $(XEN_LINUX_GIT_LOCALBRANCH) \ 2.51 + $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \ 2.52 + $(GIT) checkout ; \ 2.53 + fi 2.54 + 2.55 + @ set -e ; cd $(LINUX_SRCDIR) ; \ 2.56 + if [ -n "$(XEN_LINUX_GITREV)" ] ; then \ 2.57 + echo "Updating $(LINUX_SRCDIR) to revision \'$(XEN_LINUX_GITREV)'." ; \ 2.58 + $(GIT) reset --hard $(XEN_LINUX_GITREV) ; \ 2.59 + else \ 2.60 + $(GIT) reset --hard $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \ 2.61 + fi 2.62 + 2.63 + touch $@