WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] stubdom: fixes to compile with qemu-xen

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] stubdom: fixes to compile with qemu-xen
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Thu, 10 Jul 2008 12:28:49 +0100
Delivery-date: Thu, 10 Jul 2008 04:29:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
stubdom: fixes to compile with qemu-xen

This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now #include
each other through a mini-os/ prefix, so that we can turn all -I into
-isystem and still be sure that we include Mini-OS headers (and not
qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r aab9fbd6ffa0 extras/mini-os/Config.mk
--- a/extras/mini-os/Config.mk  Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/Config.mk  Thu Jul 10 12:16:12 2008 +0100
@@ -38,20 +38,20 @@
 # This must be before include minios.mk!
 include $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
 
-extra_incl := $(foreach dir,$(EXTRA_INC),-I$(realpath 
$(MINI-OS_ROOT)/include/$(dir)))
+extra_incl := $(foreach dir,$(EXTRA_INC),-isystem $(realpath 
$(MINI-OS_ROOT)/include/$(dir)))
 
-DEF_CPPFLAGS += -I$(realpath $(MINI-OS_ROOT)/include)
+DEF_CPPFLAGS += -isystem $(realpath $(MINI-OS_ROOT)/include)
 DEF_CPPFLAGS += -D__MINIOS__
 
 ifeq ($(libc),y)
 DEF_CPPFLAGS += -DHAVE_LIBC
-DEF_CPPFLAGS += -I$(realpath $(MINI-OS_ROOT)/include/posix)
-DEF_CPPFLAGS += -I$(realpath $(XEN_ROOT)/tools/xenstore)
+DEF_CPPFLAGS += -isystem $(realpath $(MINI-OS_ROOT)/include/posix)
+DEF_CPPFLAGS += -isystem $(realpath $(XEN_ROOT)/tools/xenstore)
 endif
 
 ifneq ($(LWIPDIR),)
 lwip=y
 DEF_CPPFLAGS += -DHAVE_LWIP
-DEF_CPPFLAGS += -I$(LWIPDIR)/src/include
-DEF_CPPFLAGS += -I$(LWIPDIR)/src/include/ipv4
+DEF_CPPFLAGS += -isystem $(LWIPDIR)/src/include
+DEF_CPPFLAGS += -isystem $(LWIPDIR)/src/include/ipv4
 endif
diff -r aab9fbd6ffa0 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/Makefile   Thu Jul 10 12:16:12 2008 +0100
@@ -55,6 +55,8 @@
 .PHONY: links
 links: $(ARCH_LINKS)
        [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
+       [ -e include/mini-os ] || ln -sf . include/mini-os
+       [ -e include/$(TARGET_ARCH_FAM)/mini-os ] || ln -sf . 
include/$(TARGET_ARCH_FAM)/mini-os
 
 .PHONY: arch_lib
 arch_lib:
@@ -89,7 +91,7 @@
 endif
 
 $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds
-       $(LD) -r -d $(LDFLAGS) $^ $(APP_LDLIBS) --undefined main -o $@
+       $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@
 
 $(OBJ_DIR)/$(TARGET): links $(OBJS) $(OBJ_DIR)/$(TARGET)_app.o arch_lib
        $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJ_DIR)/$(TARGET)_app.o $(OBJS) 
$(LDARCHLIB) $(LDLIBS) -o $@.o
diff -r aab9fbd6ffa0 extras/mini-os/include/arch/cc.h
--- a/extras/mini-os/include/arch/cc.h  Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/arch/cc.h  Thu Jul 10 12:16:12 2008 +0100
@@ -10,8 +10,8 @@
 #define __LWIP_ARCH_CC_H__
 
 /*   Typedefs for the types used by lwip - */
-#include <os.h>
-#include <types.h>
+#include <mini-os/os.h>
+#include <mini-os/types.h>
 #include <time.h>
 typedef  u8  u8_t;
 typedef  s8  s8_t;
@@ -46,7 +46,7 @@
 
 /*   If the compiler does not provide memset() this file must include a */
 /*   definition of it, or include a file which defines it. */
-#include <lib.h>
+#include <mini-os/lib.h>
 
 /*   This file must either include a system-local <errno.h> which defines */
 /*   the standard *nix error codes, or it should #define LWIP_PROVIDE_ERRNO */
diff -r aab9fbd6ffa0 extras/mini-os/include/arch/sys_arch.h
--- a/extras/mini-os/include/arch/sys_arch.h    Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/arch/sys_arch.h    Thu Jul 10 12:16:12 2008 +0100
@@ -9,9 +9,9 @@
 #ifndef __LWIP_ARCH_SYS_ARCH_H__
 #define __LWIP_ARCH_SYS_ARCH_H__
 
-#include <os.h>
-#include <xmalloc.h>
-#include <semaphore.h>
+#include <mini-os/os.h>
+#include <mini-os/xmalloc.h>
+#include <mini-os/semaphore.h>
 
 typedef struct semaphore *sys_sem_t;
 #define SYS_SEM_NULL ((sys_sem_t) NULL)
diff -r aab9fbd6ffa0 extras/mini-os/include/blkfront.h
--- a/extras/mini-os/include/blkfront.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/blkfront.h Thu Jul 10 12:16:12 2008 +0100
@@ -1,6 +1,6 @@
-#include <wait.h>
+#include <mini-os/wait.h>
 #include <xen/io/blkif.h>
-#include <types.h>
+#include <mini-os/types.h>
 struct blkfront_dev;
 struct blkfront_aiocb
 {
diff -r aab9fbd6ffa0 extras/mini-os/include/byteswap.h
--- a/extras/mini-os/include/byteswap.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/byteswap.h Thu Jul 10 12:16:12 2008 +0100
@@ -3,7 +3,7 @@
 
 /* Unfortunately not provided by newlib.  */
 
-#include <types.h>
+#include <mini-os/types.h>
 static inline uint16_t bswap_16(uint16_t x)
 {
     return
diff -r aab9fbd6ffa0 extras/mini-os/include/console.h
--- a/extras/mini-os/include/console.h  Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/console.h  Thu Jul 10 12:16:12 2008 +0100
@@ -36,8 +36,8 @@
 #ifndef _LIB_CONSOLE_H_
 #define _LIB_CONSOLE_H_
 
-#include<os.h>
-#include<traps.h>
+#include<mini-os/os.h>
+#include<mini-os/traps.h>
 #include<stdarg.h>
 
 void print(int direct, const char *fmt, va_list args);
diff -r aab9fbd6ffa0 extras/mini-os/include/err.h
--- a/extras/mini-os/include/err.h      Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/err.h      Thu Jul 10 12:16:12 2008 +0100
@@ -1,7 +1,7 @@
 #ifndef _ERR_H
 #define _ERR_H
 
-#include <errno.h>
+#include <mini-os/errno.h>
 
 /*
  * Kernel pointers have redundant information, so we can use a
diff -r aab9fbd6ffa0 extras/mini-os/include/errno.h
--- a/extras/mini-os/include/errno.h    Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/errno.h    Thu Jul 10 12:16:12 2008 +0100
@@ -1,7 +1,7 @@
 #ifndef _ERRNO_H
 #define _ERRNO_H
 
-#include <errno-base.h>
+#include <mini-os/errno-base.h>
 
 typedef int error_t;
 
@@ -113,7 +113,7 @@
 #define EFTYPE          132     /* Inappropriate file type or format */
 
 #ifdef HAVE_LIBC
-#include <sched.h>
+#include <mini-os/sched.h>
 extern int errno;
 #define ERRNO
 #define errno (get_current()->reent._errno)
diff -r aab9fbd6ffa0 extras/mini-os/include/events.h
--- a/extras/mini-os/include/events.h   Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/events.h   Thu Jul 10 12:16:12 2008 +0100
@@ -19,7 +19,7 @@
 #ifndef _EVENTS_H_
 #define _EVENTS_H_
 
-#include<traps.h>
+#include<mini-os/traps.h>
 #include<xen/event_channel.h>
 
 typedef void (*evtchn_handler_t)(evtchn_port_t, struct pt_regs *, void *);
diff -r aab9fbd6ffa0 extras/mini-os/include/fbfront.h
--- a/extras/mini-os/include/fbfront.h  Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/fbfront.h  Thu Jul 10 12:16:12 2008 +0100
@@ -1,6 +1,6 @@
 #include <xen/io/kbdif.h>
 #include <xen/io/fbif.h>
-#include <wait.h>
+#include <mini-os/wait.h>
 
 /* from <linux/input.h> */
 #ifndef BTN_LEFT
diff -r aab9fbd6ffa0 extras/mini-os/include/fs.h
--- a/extras/mini-os/include/fs.h       Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/fs.h       Thu Jul 10 12:16:12 2008 +0100
@@ -2,8 +2,8 @@
 #define __FS_H__
 
 #include <xen/io/fsif.h>
-#include <semaphore.h>
-#include <types.h>
+#include <mini-os/semaphore.h>
+#include <mini-os/types.h>
 
 struct fs_import 
 {
diff -r aab9fbd6ffa0 extras/mini-os/include/hypervisor.h
--- a/extras/mini-os/include/hypervisor.h       Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/hypervisor.h       Thu Jul 10 12:16:12 2008 +0100
@@ -13,7 +13,7 @@
 #ifndef _HYPERVISOR_H_
 #define _HYPERVISOR_H_
 
-#include <types.h>
+#include <mini-os/types.h>
 #include <xen/xen.h>
 #if defined(__i386__)
 #include <hypercall-x86_32.h>
@@ -24,7 +24,7 @@
 #else
 #error "Unsupported architecture"
 #endif
-#include <traps.h>
+#include <mini-os/traps.h>
 
 /*
  * a placeholder for the start of day information passed up from the hypervisor
diff -r aab9fbd6ffa0 extras/mini-os/include/ia64/atomic.h
--- a/extras/mini-os/include/ia64/atomic.h      Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/ia64/atomic.h      Thu Jul 10 12:16:12 2008 +0100
@@ -38,7 +38,7 @@
 
 #if !defined(__ASSEMBLY__)
 
-#include <types.h>
+#include <mini-os/types.h>
 
 
 /*
diff -r aab9fbd6ffa0 extras/mini-os/include/ia64/efi.h
--- a/extras/mini-os/include/ia64/efi.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/ia64/efi.h Thu Jul 10 12:16:12 2008 +0100
@@ -32,7 +32,7 @@
 #ifndef _EFI_H_
 #define _EFI_H_
 
-#include "types.h"
+#include <mini-os/types.h>
 
 
 #define EFIWARN(a)                      (a)
diff -r aab9fbd6ffa0 extras/mini-os/include/ia64/endian.h
--- a/extras/mini-os/include/ia64/endian.h      Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/ia64/endian.h      Thu Jul 10 12:16:12 2008 +0100
@@ -26,7 +26,7 @@
 #if !defined(_ENDIAN_H_)
 #define _ENDIAN_H_
 
-#include "types.h"
+#include <mini-os/types.h>
 
 
 #if !defined(__ASSEMBLY__)
diff -r aab9fbd6ffa0 extras/mini-os/include/ia64/hypercall-ia64.h
--- a/extras/mini-os/include/ia64/hypercall-ia64.h      Thu Jul 10 11:26:42 
2008 +0100
+++ b/extras/mini-os/include/ia64/hypercall-ia64.h      Thu Jul 10 12:16:12 
2008 +0100
@@ -34,8 +34,8 @@
 #ifndef __HYPERCALL_H__
 #define __HYPERCALL_H__
 
-#include "lib.h"       /* memcpy() */
-#include "errno.h"     /* ENOSYS() */
+#include <mini-os/lib.h>       /* memcpy() */
+#include <mini-os/errno.h>     /* ENOSYS() */
 #include <xen/event_channel.h>
 #include <xen/sched.h>
 #include <xen/version.h>
diff -r aab9fbd6ffa0 extras/mini-os/include/ia64/os.h
--- a/extras/mini-os/include/ia64/os.h  Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/ia64/os.h  Thu Jul 10 12:16:12 2008 +0100
@@ -27,15 +27,15 @@
 
 #if !defined(__ASSEMBLY__)
 
-#include "types.h"
+#include <mini-os/types.h>
 #include "endian.h"
 #include "ia64_cpu.h"
 #include "atomic.h"
 #include "efi.h"
 #include "sal.h"
 #include "pal.h"
-#include "hypervisor.h"
-#include <kernel.h>
+#include <mini-os/hypervisor.h>
+#include <mini-os/kernel.h>
 
 
 typedef uint64_t paddr_t;              /* Physical address. */
diff -r aab9fbd6ffa0 extras/mini-os/include/lib.h
--- a/extras/mini-os/include/lib.h      Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/lib.h      Thu Jul 10 12:16:12 2008 +0100
@@ -99,13 +99,13 @@
 char * strcat(char * dest, const char * src);
 char  *strdup(const char *s);
 #endif
-#include <console.h>
+#include <mini-os/console.h>
 
 #define RAND_MIX 2654435769U
 
 int rand(void);
 
-#include <xenbus.h>
+#include <mini-os/xenbus.h>
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
diff -r aab9fbd6ffa0 extras/mini-os/include/linux/types.h
--- a/extras/mini-os/include/linux/types.h      Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/linux/types.h      Thu Jul 10 12:16:12 2008 +0100
@@ -1,5 +1,5 @@
 #ifndef _LINUX_TYPES_H_
 #define _LINUX_TYPES_H_
-#include <types.h>
+#include <mini-os/types.h>
 typedef u64 __u64;
 #endif /* _LINUX_TYPES_H_ */
diff -r aab9fbd6ffa0 extras/mini-os/include/mm.h
--- a/extras/mini-os/include/mm.h       Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/mm.h       Thu Jul 10 12:16:12 2008 +0100
@@ -35,10 +35,10 @@
 #error "Unsupported architecture"
 #endif
 
-#include <lib.h>
+#include <mini-os/lib.h>
 
-#include <arch_limits.h>
-#include <arch_mm.h>
+#include <mini-os/arch_limits.h>
+#include <mini-os/arch_mm.h>
 
 #define STACK_SIZE_PAGE_ORDER __STACK_SIZE_PAGE_ORDER
 #define STACK_SIZE __STACK_SIZE
diff -r aab9fbd6ffa0 extras/mini-os/include/netfront.h
--- a/extras/mini-os/include/netfront.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/netfront.h Thu Jul 10 12:16:12 2008 +0100
@@ -1,4 +1,4 @@
-#include <wait.h>
+#include <mini-os/wait.h>
 #ifdef HAVE_LWIP
 #include <lwip/netif.h>
 #endif
diff -r aab9fbd6ffa0 extras/mini-os/include/pcifront.h
--- a/extras/mini-os/include/pcifront.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/pcifront.h Thu Jul 10 12:16:12 2008 +0100
@@ -1,4 +1,4 @@
-#include <types.h>
+#include <mini-os/types.h>
 #include <xen/io/pciif.h>
 struct pcifront_dev;
 struct pcifront_dev *init_pcifront(char *nodename);
diff -r aab9fbd6ffa0 extras/mini-os/include/posix/limits.h
--- a/extras/mini-os/include/posix/limits.h     Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/posix/limits.h     Thu Jul 10 12:16:12 2008 +0100
@@ -1,7 +1,7 @@
 #ifndef _POSIX_LIMITS_H
 #define _POSIX_LIMITS_H
 
-#include <arch_limits.h>
+#include <mini-os/arch_limits.h>
 
 #define CHAR_BIT        8
 
diff -r aab9fbd6ffa0 extras/mini-os/include/posix/sys/select.h
--- a/extras/mini-os/include/posix/sys/select.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/posix/sys/select.h Thu Jul 10 12:16:12 2008 +0100
@@ -2,6 +2,7 @@
 #define _POSIX_SELECT_H
 
 #include <sys/time.h>
+#include <lwip/sockets.h>
 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, 
struct timeval *timeout);
 
 #endif /* _POSIX_SELECT_H */
diff -r aab9fbd6ffa0 extras/mini-os/include/posix/unistd.h
--- a/extras/mini-os/include/posix/unistd.h     Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/posix/unistd.h     Thu Jul 10 12:16:12 2008 +0100
@@ -2,8 +2,7 @@
 #define _POSIX_UNISTD_H
 
 #include_next <unistd.h>
-#include <sys/select.h>
-#include <arch_limits.h>
+#include <mini-os/arch_limits.h>
 
 #define getpagesize() __PAGE_SIZE
 
diff -r aab9fbd6ffa0 extras/mini-os/include/sched.h
--- a/extras/mini-os/include/sched.h    Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/sched.h    Thu Jul 10 12:16:12 2008 +0100
@@ -1,9 +1,12 @@
 #ifndef __SCHED_H__
 #define __SCHED_H__
 
-#include <list.h>
-#include <time.h>
-#include <arch_sched.h>
+#include <mini-os/list.h>
+#include <mini-os/time.h>
+#include <mini-os/arch_sched.h>
+#ifdef HAVE_LIBC
+#include <sys/reent.h>
+#endif
 
 struct thread
 {
diff -r aab9fbd6ffa0 extras/mini-os/include/semaphore.h
--- a/extras/mini-os/include/semaphore.h        Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/semaphore.h        Thu Jul 10 12:16:12 2008 +0100
@@ -1,8 +1,8 @@
 #ifndef _SEMAPHORE_H_
 #define _SEMAPHORE_H_
 
-#include <wait.h>
-#include <spinlock.h>
+#include <mini-os/wait.h>
+#include <mini-os/spinlock.h>
 
 /*
  * Implementation of semaphore in Mini-os is simple, because 
diff -r aab9fbd6ffa0 extras/mini-os/include/spinlock.h
--- a/extras/mini-os/include/spinlock.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/spinlock.h Thu Jul 10 12:16:12 2008 +0100
@@ -1,7 +1,7 @@
 #ifndef __ASM_SPINLOCK_H
 #define __ASM_SPINLOCK_H
 
-#include <lib.h>
+#include <mini-os/lib.h>
 
 /*
  * Your basic SMP spinlocks, allowing only a single CPU anywhere
@@ -12,7 +12,7 @@
 } spinlock_t;
 
 
-#include "arch_spinlock.h"
+#include <mini-os/arch_spinlock.h>
 
 
 #define SPINLOCK_MAGIC 0xdead4ead
diff -r aab9fbd6ffa0 extras/mini-os/include/sys/lock.h
--- a/extras/mini-os/include/sys/lock.h Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/sys/lock.h Thu Jul 10 12:16:12 2008 +0100
@@ -5,7 +5,7 @@
 
 /* Due to inclusion loop, we can not include sched.h, so have to hide things */
 
-#include <waittypes.h>
+#include <mini-os/waittypes.h>
 
 
 typedef struct {
diff -r aab9fbd6ffa0 extras/mini-os/include/time.h
--- a/extras/mini-os/include/time.h     Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/time.h     Thu Jul 10 12:16:12 2008 +0100
@@ -19,7 +19,7 @@
 
 #ifndef _MINIOS_TIME_H_
 #define _MINIOS_TIME_H_
-#include <types.h>
+#include <mini-os/types.h>
 
 /*
  * System Time
diff -r aab9fbd6ffa0 extras/mini-os/include/wait.h
--- a/extras/mini-os/include/wait.h     Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/wait.h     Thu Jul 10 12:16:12 2008 +0100
@@ -1,9 +1,9 @@
 #ifndef __WAIT_H__
 #define __WAIT_H__
 
-#include <sched.h>
-#include <os.h>
-#include <waittypes.h>
+#include <mini-os/sched.h>
+#include <mini-os/os.h>
+#include <mini-os/waittypes.h>
 
 #define DEFINE_WAIT(name)                               \
 struct wait_queue name = {                              \
diff -r aab9fbd6ffa0 extras/mini-os/include/waittypes.h
--- a/extras/mini-os/include/waittypes.h        Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/waittypes.h        Thu Jul 10 12:16:12 2008 +0100
@@ -1,7 +1,7 @@
 #ifndef __WAITTYPE_H__
 #define __WAITTYPE_H__
 
-#include <list.h>
+#include <mini-os/list.h>
 
 struct thread;
 struct wait_queue
diff -r aab9fbd6ffa0 extras/mini-os/include/x86/arch_sched.h
--- a/extras/mini-os/include/x86/arch_sched.h   Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/x86/arch_sched.h   Thu Jul 10 12:16:12 2008 +0100
@@ -2,7 +2,7 @@
 #ifndef __ARCH_SCHED_H__
 #define __ARCH_SCHED_H__
 
-#include <arch_limits.h>
+#include "arch_limits.h"
 
 static inline struct thread* get_current(void)
 {
diff -r aab9fbd6ffa0 extras/mini-os/include/x86/arch_spinlock.h
--- a/extras/mini-os/include/x86/arch_spinlock.h        Thu Jul 10 11:26:42 
2008 +0100
+++ b/extras/mini-os/include/x86/arch_spinlock.h        Thu Jul 10 12:16:12 
2008 +0100
@@ -3,7 +3,7 @@
 #ifndef __ARCH_ASM_SPINLOCK_H
 #define __ARCH_ASM_SPINLOCK_H
 
-#include <lib.h>
+#include <mini-os/lib.h>
 #include "os.h"
 
 
diff -r aab9fbd6ffa0 extras/mini-os/include/x86/os.h
--- a/extras/mini-os/include/x86/os.h   Thu Jul 10 11:26:42 2008 +0100
+++ b/extras/mini-os/include/x86/os.h   Thu Jul 10 12:16:12 2008 +0100
@@ -16,9 +16,9 @@
 
 
 #ifndef __ASSEMBLY__
-#include <types.h>
-#include <hypervisor.h>
-#include <kernel.h>
+#include <mini-os/types.h>
+#include <mini-os/hypervisor.h>
+#include <mini-os/kernel.h>
 
 #define USED    __attribute__ ((used))
 
diff -r aab9fbd6ffa0 extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h      Thu Jul 10 
11:26:42 2008 +0100
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h      Thu Jul 10 
12:16:12 2008 +0100
@@ -33,7 +33,7 @@
 #include <xen/xen.h>
 #include <xen/sched.h>
 #include <xen/nmi.h>
-#include <mm.h>
+#include <mini-os/mm.h>
 
 #define __STR(x) #x
 #define STR(x) __STR(x)
diff -r aab9fbd6ffa0 extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
--- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h      Thu Jul 10 
11:26:42 2008 +0100
+++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h      Thu Jul 10 
12:16:12 2008 +0100
@@ -36,7 +36,7 @@
 
 #include <xen/xen.h>
 #include <xen/sched.h>
-#include <mm.h>
+#include <mini-os/mm.h>
 
 #define __STR(x) #x
 #define STR(x) __STR(x)
diff -r aab9fbd6ffa0 stubdom/Makefile
--- a/stubdom/Makefile  Thu Jul 10 11:26:42 2008 +0100
+++ b/stubdom/Makefile  Thu Jul 10 12:16:13 2008 +0100
@@ -3,11 +3,13 @@
 
 export XEN_OS=MiniOS
 
+CONFIG_QEMU=ioemu
+
 export stubdom=y
 export debug=y
 include $(XEN_ROOT)/Config.mk
 
-IOEMU_OPTIONS=--disable-vnc-tls 
+IOEMU_OPTIONS=--disable-sdl --disable-opengl --disable-gfx-check 
--disable-vnc-tls --disable-brlapi --disable-kqemu
 ZLIB_VERSION=1.2.3
 LIBPCI_VERSION=2.2.9
 NEWLIB_VERSION=1.16.0
@@ -48,10 +51,12 @@
 # Do not use host headers and libs
 GCC_INSTALL = $(shell gcc -print-search-dirs | sed -n -e 's/install: 
\(.*\)/\1/p')
 TARGET_CPPFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__
-TARGET_CFLAGS += -nostdinc
-TARGET_CPPFLAGS += -isystem $(realpath $(MINI_OS)/include/posix)
+TARGET_CPPFLAGS += -nostdinc
+TARGET_CPPFLAGS += -isystem $(abspath $(MINI_OS)/include/posix)
 TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include
 TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include
+TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-cvs/src/include
+TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-cvs/src/include/ipv4
 TARGET_CPPFLAGS += -I$(CURDIR)/include
 
 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
@@ -149,6 +154,7 @@
 mk-headers:
        mkdir -p include/xen && \
           ln -sf $(addprefix ../../,$(wildcard 
$(XEN_ROOT)/xen/include/public/*.h)) include/xen && \
+          ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 
arch-x86 hvm io xsm) include/xen && \
           ( [ -h include/xen/sys ] || ln -sf 
../../$(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \
          mkdir -p include/xen-foreign && \
          ln -sf $(addprefix ../../,$(wildcard 
$(XEN_ROOT)/tools/include/xen-foreign/*)) include/xen-foreign/ && \
@@ -165,10 +171,21 @@
          ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \
          ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . )
        mkdir -p ioemu
+ifeq ($(CONFIG_QEMU),ioemu)
        [ -h ioemu/Makefile ] || ( cd ioemu && \
-         ln -sf ../$(XEN_ROOT)/tools/ioemu/* . && \
-         ([ ! -h config-host.h ] || rm -f config-host.h) && \
-         ([ ! -h config-host.mak ] || rm -f config-host.mak) )
+         ln -sf ../$(XEN_ROOT)/tools/ioemu/* .)
+else
+       [ -h ioemu/Makefile ] || ( cd ioemu && \
+         ln -sf $(CONFIG_QEMU)/* . && \
+          rm -fr i386-dm && \
+          rm -fr i386-stubdom && \
+          mkdir i386-dm && \
+          mkdir i386-stubdom && \
+         ln -sf $(CONFIG_QEMU)/i386-dm/* i386-dm/ && \
+         ln -sf $(CONFIG_QEMU)/i386-stubdom/* i386-stubdom/ )
+endif
+       [ ! -h ioemu/config-host.h ] || rm -f ioemu/config-host.h
+       [ ! -h ioemu/config-host.mak ] || rm -f ioemu/config-host.mak
        $(MAKE) -C $(MINI_OS) links
 
 TARGETS_MINIOS=$(addprefix mini-os-,$(TARGETS))
@@ -193,10 +210,17 @@
 
 .PHONY: ioemu
 ioemu: cross-zlib cross-libpci mk-headers libxc
+ifeq ($(CONFIG_QEMU),ioemu)
        [ -f ioemu/config-host.mak ] || \
          ( cd ioemu ; \
           XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh 
configure --prefix=/usr --enable-stubdom $(IOEMU_OPTIONS))
        CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu 
LWIPDIR=$(CURDIR)/lwip-cvs TOOLS=
+else
+       [ -f ioemu/config-host.mak ] || \
+         ( cd ioemu ; \
+          CONFIG_STUBDOM=yes XEN_ROOT=$(abspath $(XEN_ROOT)) 
XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh ./xen-setup 
--cc=$(CC) --disable-gcc-check $(IOEMU_OPTIONS))
+       CPPFLAGS= TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu 
LWIPDIR=$(CURDIR)/lwip-cvs TOOLS= CONFIG_STUBDOM=yes
+endif
 
 ######
 # caml
@@ -233,8 +257,13 @@
 ########
 
 .PHONY: ioemu-stubdom
+ifeq ($(CONFIG_QEMU),ioemu)
+ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-dm-stubdom/qemu.a 
$(CURDIR)/ioemu/i386-dm-stubdom/libqemu.a
+else
+ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a 
$(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a
+endif
 ioemu-stubdom: mini-os-ioemu lwip-cvs libxc ioemu
-       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_QEMU 
$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) 
OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-cvs 
APP_OBJS="$(CURDIR)/ioemu/i386-dm-stubdom/qemu.a 
$(CURDIR)/ioemu/i386-dm-stubdom/libqemu.a"
+       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_QEMU 
$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) 
OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-cvs APP_OBJS="$(APP_OBJS)"
 
 CAMLLIB = $(shell ocamlc -where)
 .PHONY: caml-stubdom
@@ -302,7 +331,7 @@
 # clean downloads
 .PHONY: downloadclean
 downloadclean: patchclean
-       rm -f newlib-$(ZLIB_VERSION).tar.gz
+       rm -f newlib-$(NEWLIB_VERSION).tar.gz
        rm -f zlib-$(ZLIB_VERSION).tar.gz
        rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] stubdom: fixes to compile with qemu-xen, Samuel Thibault <=