[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC 4/5] Makefile: stubdom targets now depend on mini-os target



Provide mini-os url and revision in Config.mk

Introduce Makefile.mini-os which contains mini-os specific targets.
Target mini-os-dir clones mini-os tree from upstream.

Make various stubdom targets depend on mini-os-dir target. Make
subtree-force-update{,-all} depend on mini-os-dir-force-update. Also
make mktarball script generate mini-os archive.

Original mini-os directory is renamed to mini-os-intree to help reduce
patch length. That directory will be deleted in a separate patch.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 .gitignore                                              |  3 +++
 Config.mk                                               |  3 +++
 Makefile                                                | 17 +++++++++++------
 Makefile.mini-os                                        | 15 +++++++++++++++
[file rename output trimmed]
 tools/misc/mktarball                                    |  4 +++-
 156 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 Makefile.mini-os
[file rename output trimmed]

diff --git a/.gitignore b/.gitignore
index 33c2ca0..8d4bf4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -257,6 +257,9 @@ unmodified_drivers/linux-2.6/*.ko
 unmodified_drivers/linux-2.6/*.mod.c
 LibVNCServer*
 
+extras/mini-os-remote
+extras/mini-os
+
 tools/qemu-xen-dir-remote
 tools/qemu-xen-dir
 
diff --git a/Config.mk b/Config.mk
index 6324237..3473847 100644
--- a/Config.mk
+++ b/Config.mk
@@ -245,13 +245,16 @@ OVMF_UPSTREAM_URL ?= 
http://xenbits.xen.org/git-http/ovmf.git
 QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git
 QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
 SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git
+MINI_OS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/mini-os.git
 else
 OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git
 QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
 QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
+MINI_OS_UPSTREAM_URL ?= git://xenbits.xen.org/git-http/mini-os.git
 endif
 OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
+MINI_OS_UPSTREAM_REVISION ?= f354651f364dc86e316b8459e092d492bc2d1923
 QEMU_UPSTREAM_REVISION ?= master
 SEABIOS_UPSTREAM_REVISION ?= rel-1.7.5
 # Thu May 22 16:59:16 2014 -0400
diff --git a/Makefile b/Makefile
index 8196e25..c148118 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,9 @@ TARGS_DISTCLEAN=$(patsubst %, distclean-%, $(SUBSYSTEMS))
 export XEN_ROOT=$(CURDIR)
 include Config.mk
 
+# mini-os related targets
+include Makefile.mini-os
+
 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
 export XEN_TARGET_ARCH SUBARCH
 export DESTDIR
@@ -37,7 +40,7 @@ build-tools:
        $(MAKE) -C tools build
 
 .PHONY: build-stubdom
-build-stubdom: build-tools
+build-stubdom: mini-os-dir build-tools
        $(MAKE) -C stubdom build
 ifeq (x86_64,$(XEN_TARGET_ARCH))
        XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
@@ -84,7 +87,7 @@ install-tools:
        $(MAKE) -C tools install
 
 .PHONY: install-stubdom
-install-stubdom: install-tools
+install-stubdom: mini-os-dir install-tools
        $(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
        XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
@@ -125,11 +128,11 @@ rpmball: dist
        bash ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion 
--no-print-directory)
 
 .PHONY: subtree-force-update
-subtree-force-update:
+subtree-force-update: mini-os-dir-force-update
        $(MAKE) -C tools subtree-force-update
 
 .PHONY: subtree-force-update-all
-subtree-force-update-all:
+subtree-force-update-all: mini-os-dir-force-update
        $(MAKE) -C tools subtree-force-update-all
 
 # Make a source tarball, including qemu sub-trees.
@@ -161,7 +164,7 @@ clean-tools:
        $(MAKE) -C tools clean
 
 .PHONY: clean-stubdom
-clean-stubdom:
+clean-stubdom: mini-os-dir
        $(MAKE) -C stubdom crossclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
        XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
@@ -187,11 +190,13 @@ distclean-tools:
        $(MAKE) -C tools distclean
 
 .PHONY: distclean-stubdom
-distclean-stubdom:
+distclean-stubdom: mini-os-dir
        $(MAKE) -C stubdom distclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
        XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
+       rm -rf extras/mini-os
+       rm -rf extras/mini-os-remote
 
 .PHONY: distclean-docs
 distclean-docs:
diff --git a/Makefile.mini-os b/Makefile.mini-os
new file mode 100644
index 0000000..d87aced
--- /dev/null
+++ b/Makefile.mini-os
@@ -0,0 +1,15 @@
+.PHONY: mini-os-dir
+mini-os-dir:
+       GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh \
+                  $(MINI_OS_UPSTREAM_URL) \
+                  $(MINI_OS_UPSTREAM_REVISION) \
+                  $(XEN_ROOT)/extras/mini-os
+
+.PHONY: mini-os-dir-force-update
+mini-os-dir-force-update: mini-os-dir
+       set -ex; \
+       if [ "$(MINI_OS_UPSTREAM_REVISION)" ]; then \
+               cd extras/mini-os-remote; \
+               $(GIT) fetch origin; \
+               $(GIT) reset --hard $(MINI_OS_UPSTREAM_REVISION); \
+       fi


[file rename output trimmed]


diff --git a/tools/misc/mktarball b/tools/misc/mktarball
index aad1096..73282b5 100755
--- a/tools/misc/mktarball
+++ b/tools/misc/mktarball
@@ -6,7 +6,7 @@
 set -ex

 function git_archive_into {
-    mkdir "$2"
+    mkdir -p "$2"

     git --git-dir="$1"/.git \
        archive --format=tar HEAD | \
@@ -33,6 +33,8 @@ git_archive_into $xen_root/tools/qemu-xen-dir-remote 
$tdir/xen-$desc/tools/qemu-

 git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote 
$tdir/xen-$desc/tools/qemu-xen-traditional

+git_archive_into $xen_root/extras/mini-os-remote $tdir/xen-$desc/extras/mini-os
+
 GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc

 echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz"


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.