aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-12-08 10:32:48 +0000
committerEwan Mellor <ewan@xensource.com>2006-12-08 10:32:48 +0000
commite0abcedc4994deeb7119eeed4f709713e46ab2cc (patch)
treebdb1c00b36d5a2a98551e3f3be1e30b3f7f4242a /tools/xm-test
parent7953e4aa37ebcdb7ad6603512d798de0dd5df77e (diff)
downloadxen-e0abcedc4994deeb7119eeed4f709713e46ab2cc.tar.gz
xen-e0abcedc4994deeb7119eeed4f709713e46ab2cc.tar.bz2
xen-e0abcedc4994deeb7119eeed4f709713e46ab2cc.zip
Download and symlink the i386 version of the ramdisk when running on x86_64.
This means that people don't need to explicitly set BR_ARCH. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/xm-test')
-rw-r--r--tools/xm-test/ramdisk/Makefile.am8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/xm-test/ramdisk/Makefile.am b/tools/xm-test/ramdisk/Makefile.am
index 14bfc9267c..b6c59d60e5 100644
--- a/tools/xm-test/ramdisk/Makefile.am
+++ b/tools/xm-test/ramdisk/Makefile.am
@@ -34,6 +34,7 @@ HVM_SCRIPT = bin/create_disk_image
XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER)-$(BR_ARCH).img
+XMTEST_DL_IMG = $(shell echo $(XMTEST_VER_IMG) | sed -e 's/x86_64/i386/g')
EXTRA_ROOT_DIRS = sys
@@ -83,7 +84,12 @@ disk.img: existing
existing:
@if [ -n "$(INITRD)" ] && [ ! -f $(XMTEST_VER_IMG) ] ; then \
- wget $(INITRD)/$(XMTEST_VER_IMG); \
+ if [ ! -f $(XMTEST_DL_IMG) ] ; then \
+ wget $(INITRD)/$(XMTEST_DL_IMG); \
+ fi; \
+ if [ "$(XMTEST_DL_IMG)" != "$(XMTEST_VER_IMG)" ] ; then \
+ ln -s $(XMTEST_DL_IMG) $(XMTEST_VER_IMG); \
+ fi \
fi
@if [ -f $(XMTEST_VER_IMG) ] ; then \
ln -sf $(XMTEST_VER_IMG) initrd.img; \