ia64/xen-unstable
changeset 18020:707e10c9a487
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@eu.citrix.com>
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@eu.citrix.com>
line diff
1.1 --- a/extras/mini-os/Config.mk Thu Jul 10 11:26:42 2008 +0100 1.2 +++ b/extras/mini-os/Config.mk Thu Jul 10 14:15:46 2008 +0100 1.3 @@ -38,20 +38,20 @@ EXTRA_INC = $(ARCH_INC) 1.4 # This must be before include minios.mk! 1.5 include $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk 1.6 1.7 -extra_incl := $(foreach dir,$(EXTRA_INC),-I$(realpath $(MINI-OS_ROOT)/include/$(dir))) 1.8 +extra_incl := $(foreach dir,$(EXTRA_INC),-isystem $(realpath $(MINI-OS_ROOT)/include/$(dir))) 1.9 1.10 -DEF_CPPFLAGS += -I$(realpath $(MINI-OS_ROOT)/include) 1.11 +DEF_CPPFLAGS += -isystem $(realpath $(MINI-OS_ROOT)/include) 1.12 DEF_CPPFLAGS += -D__MINIOS__ 1.13 1.14 ifeq ($(libc),y) 1.15 DEF_CPPFLAGS += -DHAVE_LIBC 1.16 -DEF_CPPFLAGS += -I$(realpath $(MINI-OS_ROOT)/include/posix) 1.17 -DEF_CPPFLAGS += -I$(realpath $(XEN_ROOT)/tools/xenstore) 1.18 +DEF_CPPFLAGS += -isystem $(realpath $(MINI-OS_ROOT)/include/posix) 1.19 +DEF_CPPFLAGS += -isystem $(realpath $(XEN_ROOT)/tools/xenstore) 1.20 endif 1.21 1.22 ifneq ($(LWIPDIR),) 1.23 lwip=y 1.24 DEF_CPPFLAGS += -DHAVE_LWIP 1.25 -DEF_CPPFLAGS += -I$(LWIPDIR)/src/include 1.26 -DEF_CPPFLAGS += -I$(LWIPDIR)/src/include/ipv4 1.27 +DEF_CPPFLAGS += -isystem $(LWIPDIR)/src/include 1.28 +DEF_CPPFLAGS += -isystem $(LWIPDIR)/src/include/ipv4 1.29 endif
2.1 --- a/extras/mini-os/Makefile Thu Jul 10 11:26:42 2008 +0100 2.2 +++ b/extras/mini-os/Makefile Thu Jul 10 14:15:46 2008 +0100 2.3 @@ -55,6 +55,8 @@ endif 2.4 .PHONY: links 2.5 links: $(ARCH_LINKS) 2.6 [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen 2.7 + [ -e include/mini-os ] || ln -sf . include/mini-os 2.8 + [ -e include/$(TARGET_ARCH_FAM)/mini-os ] || ln -sf . include/$(TARGET_ARCH_FAM)/mini-os 2.9 2.10 .PHONY: arch_lib 2.11 arch_lib: 2.12 @@ -89,7 +91,7 @@ OBJS := $(filter-out $(OBJ_DIR)/daytime. 2.13 endif 2.14 2.15 $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds 2.16 - $(LD) -r -d $(LDFLAGS) $^ $(APP_LDLIBS) --undefined main -o $@ 2.17 + $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@ 2.18 2.19 $(OBJ_DIR)/$(TARGET): links $(OBJS) $(OBJ_DIR)/$(TARGET)_app.o arch_lib 2.20 $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJ_DIR)/$(TARGET)_app.o $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o
3.1 --- a/extras/mini-os/include/arch/cc.h Thu Jul 10 11:26:42 2008 +0100 3.2 +++ b/extras/mini-os/include/arch/cc.h Thu Jul 10 14:15:46 2008 +0100 3.3 @@ -10,8 +10,8 @@ 3.4 #define __LWIP_ARCH_CC_H__ 3.5 3.6 /* Typedefs for the types used by lwip - */ 3.7 -#include <os.h> 3.8 -#include <types.h> 3.9 +#include <mini-os/os.h> 3.10 +#include <mini-os/types.h> 3.11 #include <time.h> 3.12 typedef u8 u8_t; 3.13 typedef s8 s8_t; 3.14 @@ -46,7 +46,7 @@ extern void lwip_die(char *fmt, ...); 3.15 3.16 /* If the compiler does not provide memset() this file must include a */ 3.17 /* definition of it, or include a file which defines it. */ 3.18 -#include <lib.h> 3.19 +#include <mini-os/lib.h> 3.20 3.21 /* This file must either include a system-local <errno.h> which defines */ 3.22 /* the standard *nix error codes, or it should #define LWIP_PROVIDE_ERRNO */
4.1 --- a/extras/mini-os/include/arch/sys_arch.h Thu Jul 10 11:26:42 2008 +0100 4.2 +++ b/extras/mini-os/include/arch/sys_arch.h Thu Jul 10 14:15:46 2008 +0100 4.3 @@ -9,9 +9,9 @@ 4.4 #ifndef __LWIP_ARCH_SYS_ARCH_H__ 4.5 #define __LWIP_ARCH_SYS_ARCH_H__ 4.6 4.7 -#include <os.h> 4.8 -#include <xmalloc.h> 4.9 -#include <semaphore.h> 4.10 +#include <mini-os/os.h> 4.11 +#include <mini-os/xmalloc.h> 4.12 +#include <mini-os/semaphore.h> 4.13 4.14 typedef struct semaphore *sys_sem_t; 4.15 #define SYS_SEM_NULL ((sys_sem_t) NULL)
5.1 --- a/extras/mini-os/include/blkfront.h Thu Jul 10 11:26:42 2008 +0100 5.2 +++ b/extras/mini-os/include/blkfront.h Thu Jul 10 14:15:46 2008 +0100 5.3 @@ -1,6 +1,6 @@ 5.4 -#include <wait.h> 5.5 +#include <mini-os/wait.h> 5.6 #include <xen/io/blkif.h> 5.7 -#include <types.h> 5.8 +#include <mini-os/types.h> 5.9 struct blkfront_dev; 5.10 struct blkfront_aiocb 5.11 {
6.1 --- a/extras/mini-os/include/byteswap.h Thu Jul 10 11:26:42 2008 +0100 6.2 +++ b/extras/mini-os/include/byteswap.h Thu Jul 10 14:15:46 2008 +0100 6.3 @@ -3,7 +3,7 @@ 6.4 6.5 /* Unfortunately not provided by newlib. */ 6.6 6.7 -#include <types.h> 6.8 +#include <mini-os/types.h> 6.9 static inline uint16_t bswap_16(uint16_t x) 6.10 { 6.11 return
7.1 --- a/extras/mini-os/include/console.h Thu Jul 10 11:26:42 2008 +0100 7.2 +++ b/extras/mini-os/include/console.h Thu Jul 10 14:15:46 2008 +0100 7.3 @@ -36,8 +36,8 @@ 7.4 #ifndef _LIB_CONSOLE_H_ 7.5 #define _LIB_CONSOLE_H_ 7.6 7.7 -#include<os.h> 7.8 -#include<traps.h> 7.9 +#include<mini-os/os.h> 7.10 +#include<mini-os/traps.h> 7.11 #include<stdarg.h> 7.12 7.13 void print(int direct, const char *fmt, va_list args);
8.1 --- a/extras/mini-os/include/err.h Thu Jul 10 11:26:42 2008 +0100 8.2 +++ b/extras/mini-os/include/err.h Thu Jul 10 14:15:46 2008 +0100 8.3 @@ -1,7 +1,7 @@ 8.4 #ifndef _ERR_H 8.5 #define _ERR_H 8.6 8.7 -#include <errno.h> 8.8 +#include <mini-os/errno.h> 8.9 8.10 /* 8.11 * Kernel pointers have redundant information, so we can use a
9.1 --- a/extras/mini-os/include/errno.h Thu Jul 10 11:26:42 2008 +0100 9.2 +++ b/extras/mini-os/include/errno.h Thu Jul 10 14:15:46 2008 +0100 9.3 @@ -1,7 +1,7 @@ 9.4 #ifndef _ERRNO_H 9.5 #define _ERRNO_H 9.6 9.7 -#include <errno-base.h> 9.8 +#include <mini-os/errno-base.h> 9.9 9.10 typedef int error_t; 9.11 9.12 @@ -113,7 +113,7 @@ typedef int error_t; 9.13 #define EFTYPE 132 /* Inappropriate file type or format */ 9.14 9.15 #ifdef HAVE_LIBC 9.16 -#include <sched.h> 9.17 +#include <mini-os/sched.h> 9.18 extern int errno; 9.19 #define ERRNO 9.20 #define errno (get_current()->reent._errno)
10.1 --- a/extras/mini-os/include/events.h Thu Jul 10 11:26:42 2008 +0100 10.2 +++ b/extras/mini-os/include/events.h Thu Jul 10 14:15:46 2008 +0100 10.3 @@ -19,7 +19,7 @@ 10.4 #ifndef _EVENTS_H_ 10.5 #define _EVENTS_H_ 10.6 10.7 -#include<traps.h> 10.8 +#include<mini-os/traps.h> 10.9 #include<xen/event_channel.h> 10.10 10.11 typedef void (*evtchn_handler_t)(evtchn_port_t, struct pt_regs *, void *);
11.1 --- a/extras/mini-os/include/fbfront.h Thu Jul 10 11:26:42 2008 +0100 11.2 +++ b/extras/mini-os/include/fbfront.h Thu Jul 10 14:15:46 2008 +0100 11.3 @@ -1,6 +1,6 @@ 11.4 #include <xen/io/kbdif.h> 11.5 #include <xen/io/fbif.h> 11.6 -#include <wait.h> 11.7 +#include <mini-os/wait.h> 11.8 11.9 /* from <linux/input.h> */ 11.10 #ifndef BTN_LEFT
12.1 --- a/extras/mini-os/include/fs.h Thu Jul 10 11:26:42 2008 +0100 12.2 +++ b/extras/mini-os/include/fs.h Thu Jul 10 14:15:46 2008 +0100 12.3 @@ -2,8 +2,8 @@ 12.4 #define __FS_H__ 12.5 12.6 #include <xen/io/fsif.h> 12.7 -#include <semaphore.h> 12.8 -#include <types.h> 12.9 +#include <mini-os/semaphore.h> 12.10 +#include <mini-os/types.h> 12.11 12.12 struct fs_import 12.13 {
13.1 --- a/extras/mini-os/include/hypervisor.h Thu Jul 10 11:26:42 2008 +0100 13.2 +++ b/extras/mini-os/include/hypervisor.h Thu Jul 10 14:15:46 2008 +0100 13.3 @@ -13,7 +13,7 @@ 13.4 #ifndef _HYPERVISOR_H_ 13.5 #define _HYPERVISOR_H_ 13.6 13.7 -#include <types.h> 13.8 +#include <mini-os/types.h> 13.9 #include <xen/xen.h> 13.10 #if defined(__i386__) 13.11 #include <hypercall-x86_32.h> 13.12 @@ -24,7 +24,7 @@ 13.13 #else 13.14 #error "Unsupported architecture" 13.15 #endif 13.16 -#include <traps.h> 13.17 +#include <mini-os/traps.h> 13.18 13.19 /* 13.20 * a placeholder for the start of day information passed up from the hypervisor
14.1 --- a/extras/mini-os/include/ia64/atomic.h Thu Jul 10 11:26:42 2008 +0100 14.2 +++ b/extras/mini-os/include/ia64/atomic.h Thu Jul 10 14:15:46 2008 +0100 14.3 @@ -38,7 +38,7 @@ 14.4 14.5 #if !defined(__ASSEMBLY__) 14.6 14.7 -#include <types.h> 14.8 +#include <mini-os/types.h> 14.9 14.10 14.11 /*
15.1 --- a/extras/mini-os/include/ia64/efi.h Thu Jul 10 11:26:42 2008 +0100 15.2 +++ b/extras/mini-os/include/ia64/efi.h Thu Jul 10 14:15:46 2008 +0100 15.3 @@ -32,7 +32,7 @@ 15.4 #ifndef _EFI_H_ 15.5 #define _EFI_H_ 15.6 15.7 -#include "types.h" 15.8 +#include <mini-os/types.h> 15.9 15.10 15.11 #define EFIWARN(a) (a)
16.1 --- a/extras/mini-os/include/ia64/endian.h Thu Jul 10 11:26:42 2008 +0100 16.2 +++ b/extras/mini-os/include/ia64/endian.h Thu Jul 10 14:15:46 2008 +0100 16.3 @@ -26,7 +26,7 @@ 16.4 #if !defined(_ENDIAN_H_) 16.5 #define _ENDIAN_H_ 16.6 16.7 -#include "types.h" 16.8 +#include <mini-os/types.h> 16.9 16.10 16.11 #if !defined(__ASSEMBLY__)
17.1 --- a/extras/mini-os/include/ia64/hypercall-ia64.h Thu Jul 10 11:26:42 2008 +0100 17.2 +++ b/extras/mini-os/include/ia64/hypercall-ia64.h Thu Jul 10 14:15:46 2008 +0100 17.3 @@ -34,8 +34,8 @@ 17.4 #ifndef __HYPERCALL_H__ 17.5 #define __HYPERCALL_H__ 17.6 17.7 -#include "lib.h" /* memcpy() */ 17.8 -#include "errno.h" /* ENOSYS() */ 17.9 +#include <mini-os/lib.h> /* memcpy() */ 17.10 +#include <mini-os/errno.h> /* ENOSYS() */ 17.11 #include <xen/event_channel.h> 17.12 #include <xen/sched.h> 17.13 #include <xen/version.h>
18.1 --- a/extras/mini-os/include/ia64/os.h Thu Jul 10 11:26:42 2008 +0100 18.2 +++ b/extras/mini-os/include/ia64/os.h Thu Jul 10 14:15:46 2008 +0100 18.3 @@ -27,15 +27,15 @@ 18.4 18.5 #if !defined(__ASSEMBLY__) 18.6 18.7 -#include "types.h" 18.8 +#include <mini-os/types.h> 18.9 #include "endian.h" 18.10 #include "ia64_cpu.h" 18.11 #include "atomic.h" 18.12 #include "efi.h" 18.13 #include "sal.h" 18.14 #include "pal.h" 18.15 -#include "hypervisor.h" 18.16 -#include <kernel.h> 18.17 +#include <mini-os/hypervisor.h> 18.18 +#include <mini-os/kernel.h> 18.19 18.20 18.21 typedef uint64_t paddr_t; /* Physical address. */
19.1 --- a/extras/mini-os/include/lib.h Thu Jul 10 11:26:42 2008 +0100 19.2 +++ b/extras/mini-os/include/lib.h Thu Jul 10 14:15:46 2008 +0100 19.3 @@ -99,13 +99,13 @@ char *strstr(const char *s1, const char 19.4 char * strcat(char * dest, const char * src); 19.5 char *strdup(const char *s); 19.6 #endif 19.7 -#include <console.h> 19.8 +#include <mini-os/console.h> 19.9 19.10 #define RAND_MIX 2654435769U 19.11 19.12 int rand(void); 19.13 19.14 -#include <xenbus.h> 19.15 +#include <mini-os/xenbus.h> 19.16 19.17 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 19.18
20.1 --- a/extras/mini-os/include/linux/types.h Thu Jul 10 11:26:42 2008 +0100 20.2 +++ b/extras/mini-os/include/linux/types.h Thu Jul 10 14:15:46 2008 +0100 20.3 @@ -1,5 +1,5 @@ 20.4 #ifndef _LINUX_TYPES_H_ 20.5 #define _LINUX_TYPES_H_ 20.6 -#include <types.h> 20.7 +#include <mini-os/types.h> 20.8 typedef u64 __u64; 20.9 #endif /* _LINUX_TYPES_H_ */
21.1 --- a/extras/mini-os/include/mm.h Thu Jul 10 11:26:42 2008 +0100 21.2 +++ b/extras/mini-os/include/mm.h Thu Jul 10 14:15:46 2008 +0100 21.3 @@ -35,10 +35,10 @@ 21.4 #error "Unsupported architecture" 21.5 #endif 21.6 21.7 -#include <lib.h> 21.8 +#include <mini-os/lib.h> 21.9 21.10 -#include <arch_limits.h> 21.11 -#include <arch_mm.h> 21.12 +#include <mini-os/arch_limits.h> 21.13 +#include <mini-os/arch_mm.h> 21.14 21.15 #define STACK_SIZE_PAGE_ORDER __STACK_SIZE_PAGE_ORDER 21.16 #define STACK_SIZE __STACK_SIZE
22.1 --- a/extras/mini-os/include/netfront.h Thu Jul 10 11:26:42 2008 +0100 22.2 +++ b/extras/mini-os/include/netfront.h Thu Jul 10 14:15:46 2008 +0100 22.3 @@ -1,4 +1,4 @@ 22.4 -#include <wait.h> 22.5 +#include <mini-os/wait.h> 22.6 #ifdef HAVE_LWIP 22.7 #include <lwip/netif.h> 22.8 #endif
23.1 --- a/extras/mini-os/include/pcifront.h Thu Jul 10 11:26:42 2008 +0100 23.2 +++ b/extras/mini-os/include/pcifront.h Thu Jul 10 14:15:46 2008 +0100 23.3 @@ -1,4 +1,4 @@ 23.4 -#include <types.h> 23.5 +#include <mini-os/types.h> 23.6 #include <xen/io/pciif.h> 23.7 struct pcifront_dev; 23.8 struct pcifront_dev *init_pcifront(char *nodename);
24.1 --- a/extras/mini-os/include/posix/limits.h Thu Jul 10 11:26:42 2008 +0100 24.2 +++ b/extras/mini-os/include/posix/limits.h Thu Jul 10 14:15:46 2008 +0100 24.3 @@ -1,7 +1,7 @@ 24.4 #ifndef _POSIX_LIMITS_H 24.5 #define _POSIX_LIMITS_H 24.6 24.7 -#include <arch_limits.h> 24.8 +#include <mini-os/arch_limits.h> 24.9 24.10 #define CHAR_BIT 8 24.11
25.1 --- a/extras/mini-os/include/posix/sys/select.h Thu Jul 10 11:26:42 2008 +0100 25.2 +++ b/extras/mini-os/include/posix/sys/select.h Thu Jul 10 14:15:46 2008 +0100 25.3 @@ -2,6 +2,7 @@ 25.4 #define _POSIX_SELECT_H 25.5 25.6 #include <sys/time.h> 25.7 +#include <lwip/sockets.h> 25.8 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); 25.9 25.10 #endif /* _POSIX_SELECT_H */
26.1 --- a/extras/mini-os/include/posix/unistd.h Thu Jul 10 11:26:42 2008 +0100 26.2 +++ b/extras/mini-os/include/posix/unistd.h Thu Jul 10 14:15:46 2008 +0100 26.3 @@ -2,8 +2,7 @@ 26.4 #define _POSIX_UNISTD_H 26.5 26.6 #include_next <unistd.h> 26.7 -#include <sys/select.h> 26.8 -#include <arch_limits.h> 26.9 +#include <mini-os/arch_limits.h> 26.10 26.11 #define getpagesize() __PAGE_SIZE 26.12
27.1 --- a/extras/mini-os/include/sched.h Thu Jul 10 11:26:42 2008 +0100 27.2 +++ b/extras/mini-os/include/sched.h Thu Jul 10 14:15:46 2008 +0100 27.3 @@ -1,9 +1,12 @@ 27.4 #ifndef __SCHED_H__ 27.5 #define __SCHED_H__ 27.6 27.7 -#include <list.h> 27.8 -#include <time.h> 27.9 -#include <arch_sched.h> 27.10 +#include <mini-os/list.h> 27.11 +#include <mini-os/time.h> 27.12 +#include <mini-os/arch_sched.h> 27.13 +#ifdef HAVE_LIBC 27.14 +#include <sys/reent.h> 27.15 +#endif 27.16 27.17 struct thread 27.18 {
28.1 --- a/extras/mini-os/include/semaphore.h Thu Jul 10 11:26:42 2008 +0100 28.2 +++ b/extras/mini-os/include/semaphore.h Thu Jul 10 14:15:46 2008 +0100 28.3 @@ -1,8 +1,8 @@ 28.4 #ifndef _SEMAPHORE_H_ 28.5 #define _SEMAPHORE_H_ 28.6 28.7 -#include <wait.h> 28.8 -#include <spinlock.h> 28.9 +#include <mini-os/wait.h> 28.10 +#include <mini-os/spinlock.h> 28.11 28.12 /* 28.13 * Implementation of semaphore in Mini-os is simple, because
29.1 --- a/extras/mini-os/include/spinlock.h Thu Jul 10 11:26:42 2008 +0100 29.2 +++ b/extras/mini-os/include/spinlock.h Thu Jul 10 14:15:46 2008 +0100 29.3 @@ -1,7 +1,7 @@ 29.4 #ifndef __ASM_SPINLOCK_H 29.5 #define __ASM_SPINLOCK_H 29.6 29.7 -#include <lib.h> 29.8 +#include <mini-os/lib.h> 29.9 29.10 /* 29.11 * Your basic SMP spinlocks, allowing only a single CPU anywhere 29.12 @@ -12,7 +12,7 @@ typedef struct { 29.13 } spinlock_t; 29.14 29.15 29.16 -#include "arch_spinlock.h" 29.17 +#include <mini-os/arch_spinlock.h> 29.18 29.19 29.20 #define SPINLOCK_MAGIC 0xdead4ead
30.1 --- a/extras/mini-os/include/sys/lock.h Thu Jul 10 11:26:42 2008 +0100 30.2 +++ b/extras/mini-os/include/sys/lock.h Thu Jul 10 14:15:46 2008 +0100 30.3 @@ -5,7 +5,7 @@ 30.4 30.5 /* Due to inclusion loop, we can not include sched.h, so have to hide things */ 30.6 30.7 -#include <waittypes.h> 30.8 +#include <mini-os/waittypes.h> 30.9 30.10 30.11 typedef struct {
31.1 --- a/extras/mini-os/include/time.h Thu Jul 10 11:26:42 2008 +0100 31.2 +++ b/extras/mini-os/include/time.h Thu Jul 10 14:15:46 2008 +0100 31.3 @@ -19,7 +19,7 @@ 31.4 31.5 #ifndef _MINIOS_TIME_H_ 31.6 #define _MINIOS_TIME_H_ 31.7 -#include <types.h> 31.8 +#include <mini-os/types.h> 31.9 31.10 /* 31.11 * System Time
32.1 --- a/extras/mini-os/include/wait.h Thu Jul 10 11:26:42 2008 +0100 32.2 +++ b/extras/mini-os/include/wait.h Thu Jul 10 14:15:46 2008 +0100 32.3 @@ -1,9 +1,9 @@ 32.4 #ifndef __WAIT_H__ 32.5 #define __WAIT_H__ 32.6 32.7 -#include <sched.h> 32.8 -#include <os.h> 32.9 -#include <waittypes.h> 32.10 +#include <mini-os/sched.h> 32.11 +#include <mini-os/os.h> 32.12 +#include <mini-os/waittypes.h> 32.13 32.14 #define DEFINE_WAIT(name) \ 32.15 struct wait_queue name = { \
33.1 --- a/extras/mini-os/include/waittypes.h Thu Jul 10 11:26:42 2008 +0100 33.2 +++ b/extras/mini-os/include/waittypes.h Thu Jul 10 14:15:46 2008 +0100 33.3 @@ -1,7 +1,7 @@ 33.4 #ifndef __WAITTYPE_H__ 33.5 #define __WAITTYPE_H__ 33.6 33.7 -#include <list.h> 33.8 +#include <mini-os/list.h> 33.9 33.10 struct thread; 33.11 struct wait_queue
34.1 --- a/extras/mini-os/include/x86/arch_sched.h Thu Jul 10 11:26:42 2008 +0100 34.2 +++ b/extras/mini-os/include/x86/arch_sched.h Thu Jul 10 14:15:46 2008 +0100 34.3 @@ -2,7 +2,7 @@ 34.4 #ifndef __ARCH_SCHED_H__ 34.5 #define __ARCH_SCHED_H__ 34.6 34.7 -#include <arch_limits.h> 34.8 +#include "arch_limits.h" 34.9 34.10 static inline struct thread* get_current(void) 34.11 {
35.1 --- a/extras/mini-os/include/x86/arch_spinlock.h Thu Jul 10 11:26:42 2008 +0100 35.2 +++ b/extras/mini-os/include/x86/arch_spinlock.h Thu Jul 10 14:15:46 2008 +0100 35.3 @@ -3,7 +3,7 @@ 35.4 #ifndef __ARCH_ASM_SPINLOCK_H 35.5 #define __ARCH_ASM_SPINLOCK_H 35.6 35.7 -#include <lib.h> 35.8 +#include <mini-os/lib.h> 35.9 #include "os.h" 35.10 35.11
36.1 --- a/extras/mini-os/include/x86/os.h Thu Jul 10 11:26:42 2008 +0100 36.2 +++ b/extras/mini-os/include/x86/os.h Thu Jul 10 14:15:46 2008 +0100 36.3 @@ -16,9 +16,9 @@ 36.4 36.5 36.6 #ifndef __ASSEMBLY__ 36.7 -#include <types.h> 36.8 -#include <hypervisor.h> 36.9 -#include <kernel.h> 36.10 +#include <mini-os/types.h> 36.11 +#include <mini-os/hypervisor.h> 36.12 +#include <mini-os/kernel.h> 36.13 36.14 #define USED __attribute__ ((used)) 36.15
37.1 --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h Thu Jul 10 11:26:42 2008 +0100 37.2 +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h Thu Jul 10 14:15:46 2008 +0100 37.3 @@ -33,7 +33,7 @@ 37.4 #include <xen/xen.h> 37.5 #include <xen/sched.h> 37.6 #include <xen/nmi.h> 37.7 -#include <mm.h> 37.8 +#include <mini-os/mm.h> 37.9 37.10 #define __STR(x) #x 37.11 #define STR(x) __STR(x)
38.1 --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h Thu Jul 10 11:26:42 2008 +0100 38.2 +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h Thu Jul 10 14:15:46 2008 +0100 38.3 @@ -36,7 +36,7 @@ 38.4 38.5 #include <xen/xen.h> 38.6 #include <xen/sched.h> 38.7 -#include <mm.h> 38.8 +#include <mini-os/mm.h> 38.9 38.10 #define __STR(x) #x 38.11 #define STR(x) __STR(x)
39.1 --- a/stubdom/Makefile Thu Jul 10 11:26:42 2008 +0100 39.2 +++ b/stubdom/Makefile Thu Jul 10 14:15:46 2008 +0100 39.3 @@ -3,11 +3,13 @@ MINI_OS = $(XEN_ROOT)/extras/mini-os 39.4 39.5 export XEN_OS=MiniOS 39.6 39.7 +CONFIG_QEMU=ioemu 39.8 + 39.9 export stubdom=y 39.10 export debug=y 39.11 include $(XEN_ROOT)/Config.mk 39.12 39.13 -IOEMU_OPTIONS=--disable-vnc-tls 39.14 +IOEMU_OPTIONS=--disable-sdl --disable-opengl --disable-gfx-check --disable-vnc-tls --disable-brlapi --disable-kqemu 39.15 ZLIB_VERSION=1.2.3 39.16 LIBPCI_VERSION=2.2.9 39.17 NEWLIB_VERSION=1.16.0 39.18 @@ -48,10 +50,12 @@ TARGET_CFLAGS += $(call cc-option,$(CC), 39.19 # Do not use host headers and libs 39.20 GCC_INSTALL = $(shell gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p') 39.21 TARGET_CPPFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__ 39.22 -TARGET_CFLAGS += -nostdinc 39.23 -TARGET_CPPFLAGS += -isystem $(realpath $(MINI_OS)/include/posix) 39.24 +TARGET_CPPFLAGS += -nostdinc 39.25 +TARGET_CPPFLAGS += -isystem $(abspath $(MINI_OS)/include/posix) 39.26 TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include 39.27 TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include 39.28 +TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-cvs/src/include 39.29 +TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-cvs/src/include/ipv4 39.30 TARGET_CPPFLAGS += -I$(CURDIR)/include 39.31 39.32 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib 39.33 @@ -149,6 +153,7 @@ lwip-cvs: 39.34 mk-headers: 39.35 mkdir -p include/xen && \ 39.36 ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) include/xen && \ 39.37 + ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) include/xen && \ 39.38 ( [ -h include/xen/sys ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \ 39.39 mkdir -p include/xen-foreign && \ 39.40 ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*)) include/xen-foreign/ && \ 39.41 @@ -165,10 +170,21 @@ mk-headers: 39.42 ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \ 39.43 ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . ) 39.44 mkdir -p ioemu 39.45 +ifeq ($(CONFIG_QEMU),ioemu) 39.46 [ -h ioemu/Makefile ] || ( cd ioemu && \ 39.47 - ln -sf ../$(XEN_ROOT)/tools/ioemu/* . && \ 39.48 - ([ ! -h config-host.h ] || rm -f config-host.h) && \ 39.49 - ([ ! -h config-host.mak ] || rm -f config-host.mak) ) 39.50 + ln -sf ../$(XEN_ROOT)/tools/ioemu/* .) 39.51 +else 39.52 + [ -h ioemu/Makefile ] || ( cd ioemu && \ 39.53 + ln -sf $(CONFIG_QEMU)/* . && \ 39.54 + rm -fr i386-dm && \ 39.55 + rm -fr i386-stubdom && \ 39.56 + mkdir i386-dm && \ 39.57 + mkdir i386-stubdom && \ 39.58 + ln -sf $(CONFIG_QEMU)/i386-dm/* i386-dm/ && \ 39.59 + ln -sf $(CONFIG_QEMU)/i386-stubdom/* i386-stubdom/ ) 39.60 +endif 39.61 + [ ! -h ioemu/config-host.h ] || rm -f ioemu/config-host.h 39.62 + [ ! -h ioemu/config-host.mak ] || rm -f ioemu/config-host.mak 39.63 $(MAKE) -C $(MINI_OS) links 39.64 39.65 TARGETS_MINIOS=$(addprefix mini-os-,$(TARGETS)) 39.66 @@ -193,10 +209,17 @@ libxc/libxenctrl.a libxc/libxenguest.a:: 39.67 39.68 .PHONY: ioemu 39.69 ioemu: cross-zlib cross-libpci mk-headers libxc 39.70 +ifeq ($(CONFIG_QEMU),ioemu) 39.71 [ -f ioemu/config-host.mak ] || \ 39.72 ( cd ioemu ; \ 39.73 XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh configure --prefix=/usr --enable-stubdom $(IOEMU_OPTIONS)) 39.74 CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip-cvs TOOLS= 39.75 +else 39.76 + [ -f ioemu/config-host.mak ] || \ 39.77 + ( cd ioemu ; \ 39.78 + 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)) 39.79 + CPPFLAGS= TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip-cvs TOOLS= CONFIG_STUBDOM=yes 39.80 +endif 39.81 39.82 ###### 39.83 # caml 39.84 @@ -233,8 +256,13 @@ grub: grub-cvs cross-newlib mk-headers 39.85 ######## 39.86 39.87 .PHONY: ioemu-stubdom 39.88 +ifeq ($(CONFIG_QEMU),ioemu) 39.89 +ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-dm-stubdom/qemu.a $(CURDIR)/ioemu/i386-dm-stubdom/libqemu.a 39.90 +else 39.91 +ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a 39.92 +endif 39.93 ioemu-stubdom: mini-os-ioemu lwip-cvs libxc ioemu 39.94 - 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" 39.95 + 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)" 39.96 39.97 CAMLLIB = $(shell ocamlc -where) 39.98 .PHONY: caml-stubdom 39.99 @@ -302,7 +330,7 @@ patchclean: crossclean 39.100 # clean downloads 39.101 .PHONY: downloadclean 39.102 downloadclean: patchclean 39.103 - rm -f newlib-$(ZLIB_VERSION).tar.gz 39.104 + rm -f newlib-$(NEWLIB_VERSION).tar.gz 39.105 rm -f zlib-$(ZLIB_VERSION).tar.gz 39.106 rm -f pciutils-$(LIBPCI_VERSION).tar.bz2 39.107