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

[Xen-changelog] [xen master] stubdom: support Mini-OS config for Mini-OS apps



commit c8777e62d9af845b5fd158684eaed10918fc5cf8
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Aug 30 16:53:39 2016 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Sep 2 09:54:42 2016 +0100

    stubdom: support Mini-OS config for Mini-OS apps
    
    Mini-OS apps need to be compiled with the appropriate config settings
    of Mini-OS, as there are various dependencies on those settings in
    header files included by the apps.
    
    Enhance stubdom Makefile to set the appropriate CPPFLAGS when calling
    the apps' make.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    [ wei: fold in change to Config.mk to update mini-os commit ]
---
 .gitignore                  |  1 +
 Config.mk                   |  6 +++---
 stubdom/Makefile            | 48 +++++++++++++++++++++++++++++++++------------
 stubdom/xenstore-minios.cfg |  1 +
 4 files changed, 40 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index d193820..a061f4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,7 @@ docs/pdf/
 docs/txt/
 extras/mini-os*
 install/*
+stubdom/*-minios-config.mk
 stubdom/autom4te.cache/
 stubdom/binutils-*
 stubdom/config.cache
diff --git a/Config.mk b/Config.mk
index 081ff69..1a3b86d 100644
--- a/Config.mk
+++ b/Config.mk
@@ -277,9 +277,9 @@ MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
 OVMF_UPSTREAM_REVISION ?= 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
 QEMU_UPSTREAM_REVISION ?= master
-MINIOS_UPSTREAM_REVISION ?= f27fa61a0c206bf372753f2020bbe5dc6028864c
-# Fri, 12 Aug 2016 11:32:57 +0100 (11:32 +0100)
-# x86/arch_mm.h: move p2m_chk_pfn to x86/mm.c
+MINIOS_UPSTREAM_REVISION ?= 0f6582dd71454dffba4bbb21258fea25becfdd00
+# Tue Aug 30 13:51:23 2016 +0200
+# mini-os: support "make config" for out-of-tree users
 
 SEABIOS_UPSTREAM_REVISION ?= rel-1.9.2
 # Tue, 1 Mar 2016 15:06:45 +0100 (16:06 +0200)
diff --git a/stubdom/Makefile b/stubdom/Makefile
index 2044d76..d7a47f0 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -425,13 +425,16 @@ libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: 
mk-headers-$(XEN_TARGET_ARCH) libxentooll
 # ioemu
 #######
 
+ioemu-minios-config.mk: $(CURDIR)/ioemu-minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: ioemu
-ioemu: cross-zlib cross-libpci libxc
+ioemu: cross-zlib cross-libpci libxc ioemu-minios-config.mk
        [ -f ioemu/config-host.mak ] || \
          ( $(buildmakevars2shellvars); \
            cd ioemu ; \
            LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) \
-           TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
+           TARGET_CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat 
ioemu-minios-config.mk)" \
            TARGET_CFLAGS="$(TARGET_CFLAGS)" \
            TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
            $(QEMU_ROOT)/xen-setup-stubdom )
@@ -441,33 +444,45 @@ ioemu: cross-zlib cross-libpci libxc
 # caml
 ######
 
+caml-minios-config.mk: $(CURDIR)/caml/minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: caml
 caml: $(CROSS_ROOT)
-       CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) 
DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) 
OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat caml-minios-config.mk)" 
CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ 
LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) 
OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/
 
 ###
 # C
 ###
 
+c-minios-config.mk: $(CURDIR)/c/minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: c
-c: $(CROSS_ROOT)
-       CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) 
DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) 
+c: $(CROSS_ROOT) c-minios-config.mk
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat c-minios-config.mk)" 
CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ 
LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) 
 
 ######
 # VTPM
 ######
 
+vtpm-minios-config.mk: $(CURDIR)/vtpm/minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: vtpm
-vtpm: cross-polarssl cross-tpmemu
-       XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS)" 
CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
+vtpm: cross-polarssl cross-tpmemu vtpm-minios-config.mk
+       XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS) 
$(shell cat vtpm-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
 
 ######
 # VTPMMGR
 ######
 
+vtpmmgr-minios-config.mk: $(CURDIR)/vtpmmgr/minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: vtpmmgr
-vtpmmgr: cross-polarssl
-       XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS)" 
CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
+vtpmmgr: cross-polarssl vtpmmgr-minios-config.mk
+       XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS) 
$(shell cat vtpmmgr-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
 
 ######
 # Grub
@@ -483,18 +498,24 @@ grub-upstream: grub-$(GRUB_VERSION).tar.gz
                patch -d $@ -p1 < $$i || exit 1; \
        done
 
+grub-$(XEN_TARGET_ARCH)-minios-config.mk: $(CURDIR)/grub/minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: grub
-grub: cross-polarssl grub-upstream $(CROSS_ROOT)
+grub: cross-polarssl grub-upstream $(CROSS_ROOT) 
grub-$(XEN_TARGET_ARCH)-minios-config.mk
        mkdir -p grub-$(XEN_TARGET_ARCH)
-       CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) 
DESTDIR= -C $@ OBJ_DIR=$(CURDIR)/grub-$(XEN_TARGET_ARCH)
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat 
grub-$(XEN_TARGET_ARCH)-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) 
DESTDIR= -C $@ OBJ_DIR=$(CURDIR)/grub-$(XEN_TARGET_ARCH)
 
 ##########
 # xenstore
 ##########
 
+xenstore-minios-config.mk: $(CURDIR)/xenstore-minios.cfg
+       MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C 
$(MINI_OS) config
+
 .PHONY: xenstore
-xenstore: $(CROSS_ROOT)
-       CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) 
DESTDIR= -C $@ xenstored.a CONFIG_STUBDOM=y
+xenstore: $(CROSS_ROOT) xenstore-minios-config.mk
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat xenstore-minios-config.mk)" 
CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ xenstored.a CONFIG_STUBDOM=y
 
 ########
 # minios
@@ -586,6 +607,7 @@ clean:
        $(MAKE) -C vtpmmgr clean
        rm -fr grub-$(XEN_TARGET_ARCH)
        rm -f $(STUBDOMPATH)
+       rm -f *-minios-config.mk
        [ ! -e libs-$(XEN_TARGET_ARCH)/toollog/Makefile ] || $(MAKE) DESTDIR= 
-C libs-$(XEN_TARGET_ARCH)/toollog clean
        [ ! -e libs-$(XEN_TARGET_ARCH)/evtchn/Makefile ] || $(MAKE) DESTDIR= -C 
libs-$(XEN_TARGET_ARCH)/evtchn clean
        [ ! -e libs-$(XEN_TARGET_ARCH)/gnttab/Makefile ] || $(MAKE) DESTDIR= -C 
libs-$(XEN_TARGET_ARCH)/gnttab clean
diff --git a/stubdom/xenstore-minios.cfg b/stubdom/xenstore-minios.cfg
index 6a09cce..931caea 100644
--- a/stubdom/xenstore-minios.cfg
+++ b/stubdom/xenstore-minios.cfg
@@ -5,3 +5,4 @@ CONFIG_KBDFRONT=n
 CONFIG_CONSFRONT=n
 CONFIG_XENBUS=n
 CONFIG_LWIP=n
+XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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