Fixes to the build system to compile as a stubdomain
PATCH 1/1 Fixes to the build system to compile as a stubdomain
Various fixes to the build system to compile as a stubdomain.
Signed-off-by Stefano Stabellini <[email protected]>
--- i386-stubdom/config.mak | 1 - i386-stubdom/hooks.mak | 6 +++--- xen-config-host.h | 11 +++++++++++ xen-config-host.mak | 4 ++++ xen-hooks.mak | 14 +++++++++++--- xen-setup | 9 ++++++++- 6 files changed, 37 insertions(+), 8 deletions(-) delete mode 100644 i386-stubdom/config.mak
i386-stubdom/config.mak deleted +0 -1
@@ -1 +0,0 @@ -include ../xen-config.mak
i386-stubdom/hooks.mak +3 -3
@@ -1,11 +1,11 @@ include ../xen-hooks.mak OBJS += block-vbd.o -OBJS += tpm_tis.o -QEMU_STUBDOM= libqemu.a +QEMU_STUBDOM= qemu.a -PROGS=$(QEMU_STUBDOM) +PROGS=$(QEMU_STUBDOM) libqemu.a +TOOLS= $(QEMU_STUBDOM): $(OBJS) $(AR) rcs $@ $^
xen-config-host.h +11 -0
@@ -1,3 +1,9 @@ +#ifdef __MINIOS__ +#define CONFIG_STUBDOM +#define NO_AIO 1 +#define NO_UNIX_SOCKETS 1 +#endif +extern char domain_name[64 ];extern int domid;
@@ -11,7 +17,9 @@ extern int domid;#include "xenctrl.h" #include "xs.h" +#ifndef CONFIG_STUBDOM #include "blktaplib.h" +#endif #ifndef XEN_CONFIG_HOST_BOOL_WAS_DEFINED # undef bool
@@ -32,6 +40,9 @@ extern int vcpus;void xenstore_parse_domain_config (int domid);void xenstore_read_vncpasswd (int domid,char *pwbuf,size_t pwbuflen); +#ifdef CONFIG_STUBDOM +extern struct BlockDriver bdrv_vbd; +#endif struct CharDriverState ;void xenstore_store_serial_port_info (int i,struct CharDriverState *chr,const char *devname);
xen-config-host.mak +4 -0
@@ -2,6 +2,10 @@ QEMU_ROOT ?= . XEN_ROOT ?= $(QEMU_ROOT)/../xen-unstable.hg include $(XEN_ROOT)/tools/Rules.mk +ifdef CONFIG_STUBDOM +TARGET_DIRS=i386-stubdom +else TARGET_DIRS=i386-dm +endif -include $(QEMU_ROOT)/xen-hooks.mak
xen-hooks.mak +11 -3
@@ -1,7 +1,6 @@ CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore CPPFLAGS+= -I$(XEN_ROOT)/tools/include -CPPFLAGS+= -I$(XEN_ROOT)/tools/blktap/lib SSE2 := $(call cc-option,-msse2,) ifeq ($(SSE2),-msse2)
@@ -20,7 +19,6 @@ CFLAGS += $(CMDLINE_CFLAGS) LIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest LIBS += -L$(XEN_ROOT)/tools/xenstore -lxenstore -LIBS += -L$(XEN_ROOT)/tools/blktap/lib -lblktap LDFLAGS := $(CFLAGS) $(LDFLAGS)
@@ -32,10 +30,20 @@ OBJS += xen_machine_pv.o OBJS += xenfb.o OBJS += xen_console.o OBJS += xen_machine_fv.o -OBJS += xen_blktap.o OBJS += exec-dm.o OBJS += pci_emulation.o + +ifdef CONFIG_STUBDOM +CPPFLAGS += $(TARGET_CPPFLAGS) +CONFIG_SDL= +CONFIG_AUDIO= +OBJS += xenfbfront.o +else +CPPFLAGS+= -I$(XEN_ROOT)/tools/blktap/lib +LIBS += -L$(XEN_ROOT)/tools/blktap/lib -lblktap +OBJS += xen_blktap.o OBJS += tpm_tis.o +endif ifdef CONFIG_STUBDOM CONFIG_PASSTHROUGH=1
xen-setup +8 -1
@@ -11,7 +11,14 @@ if test -f config-host.h; then mv config-host.h config-host.h~; fi ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr -target=i386-dm +if [ -n "$CONFIG_STUBDOM" ] +then + target=i386-stubdom + ln -sf ../i386-dm/hookslib.mak $target/ + (cd $target ; ln -sf ../i386-dm/*.[ch] .) +else + target=i386-dm +fi if [ "x$XEN_ROOT" != x ]; then echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak
Signature · 1 line
1.5.4.3