stubdom: enable compilation by default on x86*
Also use a newlib snapshot instead of the slow cvs checkout.
diff -r 517206bf3df2 Makefile
--- a/Makefile Fri Jul 04 19:28:41 2008 +0100
+++ b/Makefile Fri Jul 04 19:49:49 2008 +0100
@@ -15,12 +15,13 @@
# build and install everything into the standard system directories
.PHONY: install
-install: install-xen install-kernels install-tools install-docs
+install: install-xen install-kernels install-tools install-stubdom install-docs
.PHONY: build
build: kernels
$(MAKE) -C xen build
$(MAKE) -C tools build
+ $(MAKE) -C stubdom build
$(MAKE) -C docs build
# The test target is for unit tests that can run without an installation. Of
@@ -33,7 +34,7 @@
# build and install everything into local dist directory
.PHONY: dist
dist: DESTDIR=$(DISTDIR)/install
-dist: dist-xen dist-kernels dist-tools dist-docs
+dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs
$(INSTALL_DIR) $(DISTDIR)/check
$(INSTALL_DATA) ./COPYING $(DISTDIR)
$(INSTALL_DATA) ./README $(DISTDIR)
@@ -44,10 +45,11 @@
@: # do nothing
# Legacy dist targets
-.PHONY: xen tools kernels docs
+.PHONY: xen tools stubdom kernels docs
xen: dist-xen
tools: dist-tools
kernels: dist-kernels
+stubdom: dist-stubdom
docs: dist-docs
.PHONY: prep-kernels
@@ -65,6 +67,10 @@
.PHONY: install-kernels
install-kernels:
for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
+
+.PHONY: install-stubdom
+install-stubdom:
+ $(MAKE) -C stubdom install
.PHONY: install-docs
install-docs:
@@ -102,6 +108,7 @@
clean::
$(MAKE) -C xen clean
$(MAKE) -C tools clean
+ $(MAKE) -C stubdom crossclean
$(MAKE) -C docs clean
# clean, but blow away kernel build tree plus tarballs
@@ -109,6 +116,7 @@
distclean:
$(MAKE) -C xen distclean
$(MAKE) -C tools distclean
+ $(MAKE) -C stubdom distclean
$(MAKE) -C docs distclean
rm -rf dist patches/tmp
for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
@@ -132,6 +140,7 @@
@echo ' install-xen - build and install the Xen hypervisor'
@echo ' install-tools - build and install the control tools'
@echo ' install-kernels - build and install guest kernels'
+ @echo ' install-stubdom - build and install the stubdomain images'
@echo ' install-docs - build and install user documentation'
@echo ''
@echo 'Building targets:'
@@ -140,6 +149,7 @@
@echo ' trees then make dist'
@echo ' xen - build and install Xen hypervisor'
@echo ' tools - build and install tools'
+ @echo ' stubdomain - build and install the stubdomain images'
@echo ' kernels - build and install guest kernels'
@echo ' kbuild - synonym for make kernels'
@echo ' docs - build and install user documentation'
diff -r 517206bf3df2 stubdom/Makefile
--- a/stubdom/Makefile Fri Jul 04 19:28:41 2008 +0100
+++ b/stubdom/Makefile Fri Jul 04 19:49:49 2008 +0100
@@ -11,7 +11,7 @@
IOEMU_OPTIONS=--disable-vnc-tls
ZLIB_VERSION=1.2.3
LIBPCI_VERSION=2.2.9
-NEWLIB_DATE=2008-01-01
+NEWLIB_VERSION=1.16.0
LWIP_DATE=2008-06-01
GRUB_DATE=2008-06-01
@@ -25,10 +25,12 @@
ifeq ($(GNU_TARGET_ARCH), i686)
TARGET_CFLAGS=
NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
+STUBDOM_SUPPORTED=1
endif
ifeq ($(GNU_TARGET_ARCH), x86_64)
TARGET_CFLAGS=-mno-red-zone
NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
+STUBDOM_SUPPORTED=1
endif
ifeq ($(GNU_TARGET_ARCH), ia64)
TARGET_CFLAGS=-mconstant-gp
@@ -57,26 +59,34 @@
TARGETS=ioemu c caml grub
.PHONY: all
-all: ioemu-stubdom c-stubdom pv-grub
+all: build
+ifeq ($(STUBDOM_SUPPORTED),1)
+build: ioemu-stubdom c-stubdom pv-grub
+else
+build:
+endif
##############
# Cross-newlib
##############
-newlib-cvs:
- cvs -z 9 -d :pserver:anoncvs@xxxxxxxxxxxxxxxxxx:/cvs/src co -D
$(NEWLIB_DATE) newlib
- mv src newlib-cvs
+newlib-$(NEWLIB_VERSION).tar.gz:
+ $(WGET)
ftp://sources.redhat.com/pub/newlib/newlib-$(NEWLIB_VERSION).tar.gz
+
+newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
+ tar xzf $<
patch -d $@ -p0 < newlib.patch
+ touch $@
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
.PHONY: cross-newlib
cross-newlib: $(NEWLIB_STAMPFILE)
-$(NEWLIB_STAMPFILE): newlib-cvs
+$(NEWLIB_STAMPFILE): newlib-$(NEWLIB_VERSION)
mkdir -p newlib-build
( cd newlib-build && \
- CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS)
$(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD)
RANLIB_FOR_TARGET=$(RANLIB) ../newlib-cvs/configure --prefix=$(CROSS_PREFIX)
--verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long
--disable-multilib && \
+ CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS)
$(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD)
RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure
--prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf
--enable-newlib-io-long-long --disable-multilib && \
$(MAKE) && \
- $(MAKE) install )
+ DESTDIR= $(MAKE) install )
############
# Cross-zlib
@@ -237,14 +247,21 @@
# install
#########
+ifeq ($(STUBDOM_SUPPORTED),1)
install: install-ioemu install-grub
+else
+install:
+endif
-install-ioemu: mini-os-ioemu/mini-os.gz
+install-ioemu: ioemu-stubdom
+ $(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/bin"
$(INSTALL_PROG) stubdom-dm "$(DESTDIR)/usr/lib/xen/bin"
- $(INSTALL_PROG) $< "$(DESTDIR)/usr/lib/xen/boot/ioemu-stubdom.gz"
+ $(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
+ $(INSTALL_PROG) mini-os-ioemu/mini-os.gz
"$(DESTDIR)/usr/lib/xen/boot/ioemu-stubdom.gz"
-install-grub: mini-os-grub/mini-os.gz
- $(INSTALL_PROG) $< "$(DESTDIR)/usr/lib/xen/boot/pv-grub.gz"
+install-grub: pv-grub
+ $(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
+ $(INSTALL_PROG) mini-os-grub/mini-os.gz
"$(DESTDIR)/usr/lib/xen/boot/pv-grub.gz"
#######
# clean
@@ -272,13 +289,14 @@
# clean patched sources
.PHONY: patchclean
patchclean: crossclean
- rm -fr newlib-cvs
+ rm -fr newlib-$(NEWLIB_VERSION)
rm -fr lwip-cvs
rm -fr grub-cvs
# clean downloads
.PHONY: downloadclean
downloadclean: patchclean
+ rm -f newlib-$(ZLIB_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
|