# HG changeset patch # User smh22@tempest.cl.cam.ac.uk # Date 1106847213 0 # Node ID 25f3f22927e9bb394071e576f0f6536926197b26 # Parent 08e173bd9db1f7dd31f5ff1bd6b76f8a72323548# Parent de9af8f0cdf1ad9a0b3bb10c6cc0289dd0580c80 bitkeeper revision 1.1159.1.539 (41f925edsOM-7RHXmwoPRFfYwoxtEw) Merge tempest.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk into tempest.cl.cam.ac.uk:/local/scratch/smh22/xen-unstable.bk diff -r 08e173bd9db1 -r 25f3f22927e9 .rootkeys --- a/.rootkeys Wed Jan 26 09:53:46 2005 +0000 +++ b/.rootkeys Thu Jan 27 17:33:33 2005 +0000 @@ -313,8 +313,8 @@ 413cb3b5eKxnzoodEqaWn2wrPnHWnA netbsd-2. 413cb3b5F56TvQWAmO5TsuzhtzLFPQ netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c 413cb3b53nyOv1OIeDSsCXhBFDXvJA netbsd-2.0-xen-sparse/sys/nfs/files.nfs 413aa1d0oNP8HXLvfPuMe6cSroUfSA patches/linux-2.6.9/agpgart.patch -40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Make.defs 3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Makefile +40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Rules.mk 4124b307nRyK3dhn1hAsvrY76NuV3g tools/check/Makefile 4124b307vHLUWbfpemVefmaWDcdfag tools/check/README 4124b307jt7T3CHysgl9LijNHSe1tA tools/check/check_brctl diff -r 08e173bd9db1 -r 25f3f22927e9 Makefile --- a/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -11,7 +11,7 @@ INSTALL_DIR := $(INSTALL) -d -m0755 INSTALL_DATA := $(INSTALL) -m0644 INSTALL_PROG := $(INSTALL) -m0755 -KERNELS ?= linux-2.6-xen0 linux-2.6-xenU linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU +KERNELS ?= *2.6* # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU # You may use wildcards in the above e.g. KERNELS=*2.4* @@ -21,6 +21,12 @@ XKERNELS := $(foreach kernel, $(KERNELS) export DESTDIR +# Export target architecture overrides to Xen and Linux sub-trees. +ifneq ($(TARGET_ARCH),) +SUBARCH := $(subst x86_32,i386,$(TARGET_ARCH)) +export TARGET_ARCH SUBARCH +endif + include buildconfigs/Rules.mk .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper @@ -146,9 +152,20 @@ help: @echo ' with extreme care!)' # Use this target with extreme care! +uninstall: DESTDIR= +uninstall: D=$(DESTDIR) uninstall: - cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen - rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*" + [ ! -d $(D)/etc/xen ] || mv -f $(D)/etc/xen $(D)/etc/xen.old + rm -rf $(D)/etc/init.d/xend* + rm -rf $(D)/usr/lib/libxc* $(D)/usr/lib/libxutil* + rm -rf $(D)/usr/lib/python/xen $(D)/usr/include/xen + rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h + rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen* + rm -rf $(D)/usr/sbin/netfix + rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm $(D)/var/lib/xen + rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace* + rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm + rm -rf $(D)/boot/*xen* # Legacy targets for compatibility linux24: diff -r 08e173bd9db1 -r 25f3f22927e9 install.sh --- a/install.sh Wed Jan 26 09:53:46 2005 +0000 +++ b/install.sh Thu Jan 27 17:33:33 2005 +0000 @@ -24,7 +24,7 @@ fi echo "Installing Xen from '$src' to '$dst'..." cd $src/boot -(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read mv +(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read m v do l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1) [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0 diff -r 08e173bd9db1 -r 25f3f22927e9 tools/Make.defs --- a/tools/Make.defs Wed Jan 26 09:53:46 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -# -*- mode: Makefile; -*- -XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc -XEN_LIBXC = $(XEN_ROOT)/tools/libxc -XEN_LIBXUTIL = $(XEN_ROOT)/tools/libxutil diff -r 08e173bd9db1 -r 25f3f22927e9 tools/Rules.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/Rules.mk Thu Jan 27 17:33:33 2005 +0000 @@ -0,0 +1,15 @@ +# -*- mode: Makefile; -*- + +XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc +XEN_LIBXC = $(XEN_ROOT)/tools/libxc +XEN_LIBXUTIL = $(XEN_ROOT)/tools/libxutil + +ifeq ($(TARGET_ARCH),x86_32) +CFLAGS += -m32 -march=i686 +LDFLAGS += -m elf_i386 +endif + +ifeq ($(TARGET_ARCH),x86_64) +CFLAGS += -m64 +LDFLAGS += -m elf_x86_64 +endif diff -r 08e173bd9db1 -r 25f3f22927e9 tools/libxc/Makefile --- a/tools/libxc/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/libxc/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -10,7 +10,7 @@ SONAME = libxc.so.$(MAJOR) CC = gcc XEN_ROOT = ../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk vpath %c $(XEN_LIBXUTIL) INCLUDES += -I $(XEN_LIBXUTIL) @@ -70,8 +70,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)/usr/lib $(INSTALL_DIR) $(DESTDIR)/usr/include $(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib - ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR) - ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so + ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR) + ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so $(INSTALL_DATA) xc.h $(DESTDIR)/usr/include clean: diff -r 08e173bd9db1 -r 25f3f22927e9 tools/libxutil/Makefile --- a/tools/libxutil/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/libxutil/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -4,7 +4,7 @@ INSTALL_DATA = $(INSTALL) -m0644 INSTALL_PROG = $(INSTALL) -m0755 INSTALL_DIR = $(INSTALL) -d -m0755 -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk CC = gcc diff -r 08e173bd9db1 -r 25f3f22927e9 tools/misc/Makefile --- a/tools/misc/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/misc/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -3,10 +3,10 @@ INSTALL_PROG = $(INSTALL) -m0755 INSTALL_DIR = $(INSTALL) -d -m0755 XEN_ROOT=../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk -CC = gcc -CFLAGS = -Wall -Werror -O3 +CC = gcc +CFLAGS += -Wall -Werror -O3 INCLUDES += -I $(XEN_XC) INCLUDES += -I $(XEN_LIBXC) @@ -27,7 +27,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)/usr/sbin $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin - $(MAKE) -C miniterm install +# No sense in installing miniterm on the Xen box. +# $(MAKE) -C miniterm install clean: $(RM) *.o $(TARGETS) *~ diff -r 08e173bd9db1 -r 25f3f22927e9 tools/python/Makefile --- a/tools/python/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/python/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -1,9 +1,12 @@ + +XEN_ROOT = ../.. +include $(XEN_ROOT)/tools/Rules.mk all: - python setup.py build + CFLAGS="$(CFLAGS)" python setup.py build install: all - python setup.py install --home="$(DESTDIR)/usr" + CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" clean: rm -rf build *.pyc *.pyo *.o *.a *~ diff -r 08e173bd9db1 -r 25f3f22927e9 tools/python/xen/lowlevel/xu/xu.c --- a/tools/python/xen/lowlevel/xu/xu.c Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/python/xen/lowlevel/xu/xu.c Thu Jan 27 17:33:33 2005 +0000 @@ -82,12 +82,12 @@ static int xcs_ctrl_fd = -1; /* control static int xcs_data_fd = -1; /* data connection to the xcs server. */ static u32 xcs_session_id = 0; -int xcs_ctrl_send(xcs_msg_t *msg); -int xcs_ctrl_read(xcs_msg_t *msg); -int xcs_data_send(xcs_msg_t *msg); -int xcs_data_read(xcs_msg_t *msg); +static int xcs_ctrl_send(xcs_msg_t *msg); +static int xcs_ctrl_read(xcs_msg_t *msg); +static int xcs_data_send(xcs_msg_t *msg); +static int xcs_data_read(xcs_msg_t *msg); -int xcs_connect(char *ip, short port) +static int xcs_connect(char *ip, short port) { struct sockaddr_in addr; int ret, flags; @@ -170,22 +170,6 @@ int xcs_connect(char *ip, short port) goto data_fd_fail; } - /* Haven't put type binding hooks into Xend yet. */ - /* for now, register for everything: */ - /* - msg.type = XCS_MSG_BIND; - msg.u.bind.port = PORT_WILDCARD; - msg.u.bind.type = TYPE_WILDCARD; - xcs_ctrl_send(&msg); - xcs_ctrl_read(&msg); - - if (msg.result != XCS_RSLT_OK) - { - printf("error binding!\n"); - goto data_fd_fail; - } - printf("successfully connected to xcs.\n"); - */ return 0; data_fd_fail: @@ -201,66 +185,43 @@ fail: } -void xcs_disconnect(void) +static void xcs_disconnect(void) { - printf("xcs_disconnect called!\n"); close(xcs_data_fd); xcs_data_fd = -1; close(xcs_ctrl_fd); xcs_ctrl_fd = -1; } -int xcs_ctrl_read(xcs_msg_t *msg) +static int xcs_ctrl_read(xcs_msg_t *msg) { int ret; ret = read(xcs_ctrl_fd, msg, sizeof(xcs_msg_t)); - if (ret != sizeof(xcs_msg_t)) { - printf("xu-xcs: ctrl read error (%d)\n", errno); - /* TODO: set xcs_fd to -1 if the connection has been dropped. */ - } else { - printf("xu-xcs: read! fd: %d, type: %u\n", xcs_ctrl_fd, msg->type); - } return ret; } -int xcs_ctrl_send(xcs_msg_t *msg) +static int xcs_ctrl_send(xcs_msg_t *msg) { int ret; ret = send(xcs_ctrl_fd, msg, sizeof(xcs_msg_t), 0); - if (ret != sizeof(xcs_msg_t) ) - { - printf("xu-xcs: ctrl send error(%d)\n", errno); - /* TODO: set xcs_fd to -1 if the connection has been dropped. */ - } else { - printf("xu-xcs: sent! fd: %d, type: %u\n", xcs_ctrl_fd, msg->type); - } return ret; } -int xcs_data_read(xcs_msg_t *msg) +static int xcs_data_read(xcs_msg_t *msg) { int ret; ret = read(xcs_data_fd, msg, sizeof(xcs_msg_t)); - if (ret != sizeof(xcs_msg_t)) { - printf("xu-xcs: ctrl read error (%d)\n", errno); - /* TODO: set xcs_fd to -1 if the connection has been dropped. */ - } return ret; } -int xcs_data_send(xcs_msg_t *msg) +static int xcs_data_send(xcs_msg_t *msg) { int ret; ret = send(xcs_data_fd, msg, sizeof(xcs_msg_t), 0); - if (ret != sizeof(xcs_msg_t) ) - { - printf("xu-xcs: ctrl send error(%d)\n", errno); - /* TODO: set xcs_fd to -1 if the connection has been dropped. */ - } return ret; } @@ -302,7 +263,6 @@ static PyObject *xu_notifier_read(PyObje if ( !PyArg_ParseTuple(args, "") ) return NULL; - printf("xu_notifier_read()\n"); while ((!REQ_RING_FULL) && (!RSP_RING_FULL)) { @@ -318,7 +278,7 @@ static PyObject *xu_notifier_read(PyObje break; return PyErr_SetFromErrno(PyExc_IOError); } - printf("notifier got msg type %u\n", ent->msg.type); + switch (ent->msg.type) { case XCS_REQUEST: @@ -337,26 +297,21 @@ static PyObject *xu_notifier_read(PyObje return PyInt_FromLong(ret); default: - printf("Throwing away xcs msg type: %u\n", ent->msg.type); + /*printf("Throwing away xcs msg type: %u\n", ent->msg.type);*/ free(ent); } } if (!REQ_RING_EMPTY) { - printf("nfy: req: %d\n", - REQ_RING_ENT(req_cons)->msg.u.control.local_port); return PyInt_FromLong(REQ_RING_ENT(req_cons)->msg.u.control.local_port); } if (!RSP_RING_EMPTY) { - printf("nfy: rsp: %d\n", - RSP_RING_ENT(rsp_cons)->msg.u.control.local_port); return PyInt_FromLong(RSP_RING_ENT(rsp_cons)->msg.u.control.local_port); } - printf("nfy: returning None\n"); Py_INCREF(Py_None); return Py_None; } @@ -484,7 +439,6 @@ static PyObject *xu_notifier_new(PyObjec xu_notifier_object *xun; int i; -printf("xu_notifier_new()\n"); if ( !PyArg_ParseTuple(args, "") ) return NULL; @@ -506,6 +460,7 @@ static PyObject *xu_notifier_getattr(PyO static void xu_notifier_dealloc(PyObject *self) { + xcs_disconnect(); PyObject_Del(self); } @@ -1119,9 +1074,6 @@ static PyObject *xu_port_read_request(Py if ((ent == NULL) || (ent->msg.u.control.remote_dom != xup->remote_dom)) goto none; - -printf("read request (%d:%d)\n", ent->msg.u.control.msg.type, - ent->msg.u.control.msg.subtype); cmsg = &ent->msg.u.control.msg; xum = PyObject_New(xu_message_object, &xu_message_type); @@ -1138,7 +1090,6 @@ printf("read request (%d:%d)\n", ent->ms return (PyObject *)xum; none: -printf("read request - NO REQUEST!\n"); Py_INCREF(Py_None); return Py_None; @@ -1187,9 +1138,6 @@ static PyObject *xu_port_read_response(P if ((ent == NULL) || (ent->msg.u.control.remote_dom != xup->remote_dom)) goto none; - -printf("read response (%d:%d)\n", ent->msg.u.control.msg.type, - ent->msg.u.control.msg.subtype); cmsg = &ent->msg.u.control.msg; xum = PyObject_New(xu_message_object, &xu_message_type); @@ -1206,7 +1154,6 @@ printf("read response (%d:%d)\n", ent->m return (PyObject *)xum; none: -printf("read response - NO RESPONSE!\n"); Py_INCREF(Py_None); return Py_None; @@ -1242,8 +1189,7 @@ static PyObject *xu_port_request_to_read xcs_msg_ent_t *ent; int found = 0; unsigned i; - -printf("xu_port_request_to_read()\n"); + if ( !PyArg_ParseTuple(args, "") ) return NULL; @@ -1274,8 +1220,7 @@ static PyObject *xu_port_response_to_rea xcs_msg_ent_t *ent; int found = 0; unsigned i; - -printf("xu_port_response_to_read()\n"); + if ( !PyArg_ParseTuple(args, "") ) return NULL; @@ -1327,9 +1272,6 @@ static PyObject *xu_port_register(PyObje &type) ) return NULL; - printf("REGISTER : Dom: %3d Port: %3d Type:%3d\n", - xup->remote_dom, xup->local_port, type); - msg.type = XCS_MSG_BIND; msg.u.bind.port = xup->local_port; msg.u.bind.type = type; @@ -1338,7 +1280,6 @@ static PyObject *xu_port_register(PyObje if (msg.result != XCS_RSLT_OK) { - printf(" : REGISTRATION FAILED! (%d)\n", msg.result); return PyInt_FromLong(0); } @@ -1357,9 +1298,6 @@ static PyObject *xu_port_deregister(PyOb &type) ) return NULL; - printf("DEREGISTER: Dom: %3d Port: %3d Type:%3d\n", - xup->remote_dom, xup->local_port, type); - msg.type = XCS_MSG_UNBIND; msg.u.bind.port = xup->local_port; msg.u.bind.type = type; @@ -1368,7 +1306,6 @@ static PyObject *xu_port_deregister(PyOb if (msg.result != XCS_RSLT_OK) { - printf(" : DEREGISTRATION FAILED! (%d)\n", msg.result); return PyInt_FromLong(0); } diff -r 08e173bd9db1 -r 25f3f22927e9 tools/vnet/vnet-module/Makefile-2.4 --- a/tools/vnet/vnet-module/Makefile-2.4 Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/vnet/vnet-module/Makefile-2.4 Thu Jan 27 17:33:33 2005 +0000 @@ -61,7 +61,6 @@ CFLAGS += -Wno-trigraphs CFLAGS += -Wno-unused-function CFLAGS += -Wno-unused-parameter -CFLAGS += -g CFLAGS += -O2 CFLAGS += -fno-strict-aliasing CFLAGS += -fno-common diff -r 08e173bd9db1 -r 25f3f22927e9 tools/vnet/vnetd/Makefile --- a/tools/vnet/vnetd/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/vnet/vnetd/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -21,7 +21,7 @@ all: vnetd #---------------------------------------------------------------------------- XEN_ROOT = ../../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk VNETD_INSTALL_DIR = /usr/sbin @@ -42,7 +42,6 @@ INCLUDES += -I$(GC_INCLUDE) CPPFLAGS += -D USE_GC #---------------------------------------------------------------------------- -CFLAGS += -g CFLAGS += -Wall CFLAGS += $(INCLUDES) $(LIBS) diff -r 08e173bd9db1 -r 25f3f22927e9 tools/x2d2/Makefile --- a/tools/x2d2/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/x2d2/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -1,8 +1,8 @@ XEN_ROOT=../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk CC = gcc -CFLAGS = -Wall -Werror -g +CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing CFLAGS += -I $(XEN_XC) CFLAGS += -I $(XEN_LIBXC) diff -r 08e173bd9db1 -r 25f3f22927e9 tools/xcs/Makefile --- a/tools/xcs/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/xcs/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -2,7 +2,7 @@ # Andrew Warfield, 2004 XEN_ROOT=../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk XCS_INSTALL_DIR = /usr/sbin diff -r 08e173bd9db1 -r 25f3f22927e9 tools/xentrace/Makefile --- a/tools/xentrace/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/xentrace/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -4,10 +4,10 @@ INSTALL_DIR = $(INSTALL) -d -m0755 INSTALL_DATA = $(INSTALL) -m0644 XEN_ROOT=../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk CC = gcc -CFLAGS = -Wall -Werror -O3 +CFLAGS += -Wall -Werror -O3 CFLAGS += -I $(XEN_XC) CFLAGS += -I $(XEN_LIBXC) diff -r 08e173bd9db1 -r 25f3f22927e9 tools/xfrd/Makefile --- a/tools/xfrd/Makefile Wed Jan 26 09:53:46 2005 +0000 +++ b/tools/xfrd/Makefile Thu Jan 27 17:33:33 2005 +0000 @@ -9,7 +9,7 @@ INSTALL_PROG = $(INSTALL) -m0755 INSTALL_DIR = $(INSTALL) -d -m0755 XEN_ROOT = ../.. -include $(XEN_ROOT)/tools/Make.defs +include $(XEN_ROOT)/tools/Rules.mk XFRD_INSTALL_DIR = /usr/sbin @@ -36,9 +36,7 @@ endif CC := gcc -CFLAGS += -g -CFLAGS += -Wall -CFLAGS += -Werror +CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing CFLAGS += $(INCLUDES) # Make gcc generate dependencies. CFLAGS += -Wp,-MD,.$(@F).d diff -r 08e173bd9db1 -r 25f3f22927e9 xen/Rules.mk --- a/xen/Rules.mk Wed Jan 26 09:53:46 2005 +0000 +++ b/xen/Rules.mk Thu Jan 27 17:33:33 2005 +0000 @@ -6,14 +6,15 @@ perfc ?= n trace ?= n optimize ?= y -# Currently supported architectures: -# {COMPILE,TARGET}_ARCH := x86 -# {COMPILE,TARGET}_SUBARCH := x86_32 | x86_64 -COMPILE_ARCH := x86 -COMPILE_SUBARCH := $(shell uname -m | sed -e s/i.86/x86_32/) +# Currently supported architectures: x86_32, x86_64 +COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/) +TARGET_ARCH ?= $(COMPILE_ARCH) -TARGET_ARCH ?= $(COMPILE_ARCH) -TARGET_SUBARCH ?= $(COMPILE_SUBARCH) +# Set ARCH/SUBARCH appropriately. +COMPILE_SUBARCH := $(COMPILE_ARCH) +TARGET_SUBARCH := $(COMPILE_ARCH) +COMPILE_ARCH := $(patsubst x86%,x86,$(COMPILE_ARCH)) +TARGET_ARCH := $(patsubst x86%,x86,$(TARGET_ARCH)) TARGET := $(BASEDIR)/xen HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)