Index: xen-3.2-testing/unmodified_drivers/linux-2.6/mkbuildtree =================================================================== --- xen-3.2-testing.orig/unmodified_drivers/linux-2.6/mkbuildtree +++ xen-3.2-testing/unmodified_drivers/linux-2.6/mkbuildtree @@ -13,16 +13,30 @@ C=$PWD if [ -n "$XEN" -a -d "$XEN" ]; then XEN=$(cd $XEN && pwd) else - XEN=$C/../../xen + XEN=/usr/src/linux/include/xen fi if [ -n "$XL" -a -d "$XL" ]; then XL=$(cd $XL && pwd) else - XL=$C/../../linux-2.6.18-xen.hg + XL=/usr/src/linux +fi +cd "$(dirname "$0")" + +if [ -n "$ALT_KMP_OS" -a "$ALT_KMP_OS" == other ]; then + XL=$C/linux-2.6-xen-sparse + XEN=$C/linux-2.6-xen-sparse/include/xen fi for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do + # TEMPORARY - Don't link entire directory until the accel.c fix is in the kernel cvs + if echo $d | egrep -q netfront; then + ln -sf ${XL}/drivers/xen/netfront/netfront.c netfront + ln -sf ${XL}/drivers/xen/netfront/netfront.h netfront + cp -p ../../linux-2.6-xen-sparse/drivers/xen/netfront/accel.c netfront + continue + fi + # END TEMPORARY if ! echo $d | egrep -q back; then lndir $d $(basename $d) > /dev/null 2>&1 fi @@ -39,7 +53,7 @@ ln -sf ${XL}/drivers/xen/core/reboot.c p mkdir -p include/asm include/xen lndir -silent ${XL}/include/xen include/xen -ln -nsf ${XEN}/include/public include/xen/interface +ln -nsf ${XEN}/interface include/xen/interface # Need to be quite careful here: we don't want the files we link in to # risk overriding the native Linux ones (in particular, system.h must Index: xen-3.2-testing/unmodified_drivers/linux-2.6/overrides.mk =================================================================== --- xen-3.2-testing.orig/unmodified_drivers/linux-2.6/overrides.mk +++ xen-3.2-testing/unmodified_drivers/linux-2.6/overrides.mk @@ -4,6 +4,11 @@ # # (i.e. we need the native config for things like -mregparm, but # a Xen kernel to find the right headers) +ifeq ($(ALT_KMP_OS),other) + SPARSEINCLUDE := -I$(M)/../../linux-2.6-xen-sparse/include/xen -I$(M)/../../linux-2.6-xen-sparse/include + SPARSEINCLUDE += $(CPPFLAGS) + CPPFLAGS = $(SPARSEINCLUDE) +endif EXTRA_CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205 EXTRA_CFLAGS += -DCONFIG_XEN_COMPAT=0xffffff EXTRA_CFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H