ia64/xen-unstable

view tools/xm-test/ramdisk/Makefile.am @ 9961:1d2a0e2ef8f7

The buildroot xm-test grabs is no longer present, this patch fixes it.
Made it a minor release bump for xm-test so old ramdisk will work. The
ramdisk is functionally the same.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@dyn9047022152.beaverton.ibm.com
date Sun May 07 21:41:36 2006 +0100 (2006-05-07)
parents 59161a85a281
children deabbf60bb46
line source
1 INITRD ?= http://xm-test.xensource.com/ramdisks
3 EXTRA_DIST = skel configs patches
5 BR_TAR = buildroot-20060427.tar.bz2
6 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
7 #BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
8 BR_SRC = buildroot
9 BR_IMG = $(BR_SRC)/rootfs.i386.ext2
11 BR_ROOT = build_i386/root
13 HVM_SCRIPT = bin/create_disk_image
15 XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
16 XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
18 EXTRA_ROOT_DIRS = sys
20 if HVM
21 all: initrd.img disk.img
22 else
23 all: initrd.img
24 endif
26 $(BR_TAR):
27 wget $(BR_URL)
29 $(BR_SRC): $(BR_TAR)
30 tar xjf $(BR_TAR)
32 $(BR_IMG): $(BR_SRC)
33 cp configs/buildroot $(BR_SRC)/.config
34 cp configs/busybox $(BR_SRC)/package/busybox/busybox.config
35 cp configs/uClibc $(BR_SRC)/toolchain/uClibc/uClibc.config
36 (for i in patches/buildroot/*.patch; do \
37 cd $(BR_SRC) && patch -p1 <../$$i && cd ..; done )
38 cd $(BR_SRC) && make oldconfig && make
40 $(XMTEST_VER_IMG): $(BR_IMG)
41 chmod a+x skel/etc/init.d/rcS
42 (cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
43 | (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
44 cd $(BR_SRC) && make
45 cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
47 initrd.img: $(XMTEST_VER_IMG)
48 ln -sf $(XMTEST_VER_IMG) initrd.img
50 disk.img: existing
51 chmod a+x $(HVM_SCRIPT)
52 @if test ! "$(HVMKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
53 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -k $(HVMKERNEL) \
54 -d $(DRVDIR); \
55 elif test "$(HVMKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
56 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -d $(DRVDIR); \
57 elif test ! "$(HVMKERNEL)" = "no" -a "$(DRVDIR)" = "no"; then \
58 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -k $(HVMKERNEL); \
59 else \
60 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG); \
61 fi
63 existing:
64 @if [ -n "$(INITRD)" ] && [ ! -f $(XMTEST_VER_IMG) ] ; then \
65 wget $(INITRD)/$(XMTEST_VER_IMG); \
66 fi
67 @if [ -f $(XMTEST_VER_IMG) ] ; then \
68 ln -sf $(XMTEST_VER_IMG) initrd.img; \
69 else \
70 echo Error, $(XMTEST_VER_IMG) not found; \
71 false; \
72 fi
74 clean-local: am_config_clean-local
76 am_config_clean-local:
77 rm -Rf buildroot
78 rm -f *~
79 rm -f initrd.img
80 rm -f $(BR_TAR)
81 rm -f disk.img