ia64/xen-unstable

view tools/xm-test/ramdisk/Makefile.am @ 9347:8fda66ee616b

Add mounting /sys for 2.6 xm-test images.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@dyn9047022152.beaverton.ibm.com
date Tue Mar 21 01:10:46 2006 +0100 (2006-03-21)
parents b41e19644271
children b427e44d0d6c
line source
2 EXTRA_DIST = skel configs patches
4 BR_TAR = buildroot-20060215.tar.bz2
5 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
6 #BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
7 BR_SRC = buildroot
8 BR_IMG = $(BR_SRC)/rootfs.i386.ext2
10 BR_ROOT = build_i386/root
12 HVM_SCRIPT = bin/create_disk_image
14 XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
15 XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
17 EXTRA_ROOT_DIRS = sys
19 if HVM
20 all: initrd.img disk.img
21 else
22 all: initrd.img
23 endif
25 $(BR_TAR):
26 wget $(BR_URL)
28 $(BR_SRC): $(BR_TAR)
29 tar xjf $(BR_TAR)
31 $(BR_IMG): $(BR_SRC)
32 cp configs/buildroot $(BR_SRC)/.config
33 cp configs/busybox $(BR_SRC)/package/busybox/busybox.config
34 cp configs/uClibc $(BR_SRC)/toolchain/uClibc/uClibc.config
35 (for i in patches/buildroot/*.patch; do \
36 cd $(BR_SRC) && patch -p1 <../$$i && cd ..; done )
37 cd $(BR_SRC) && make oldconfig && make
39 $(XMTEST_VER_IMG): $(BR_IMG)
40 chmod a+x skel/etc/init.d/rcS
41 (cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
42 | (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
43 cd $(BR_SRC) && make
44 cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
46 initrd.img: $(XMTEST_VER_IMG)
47 ln -sf $(XMTEST_VER_IMG) initrd.img
49 disk.img: existing
50 chmod a+x $(HVM_SCRIPT)
51 @if test ! "$(HVMKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
52 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -k $(HVMKERNEL) \
53 -d $(DRVDIR); \
54 elif test "$(HVMKERNEL)" = "no" -a ! "$(DRVDIR)" = "no"; then \
55 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -d $(DRVDIR); \
56 elif test ! "$(HVMKERNEL)" = "no" -a "$(DRVDIR)" = "no"; then \
57 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG) -k $(HVMKERNEL); \
58 else \
59 $(HVM_SCRIPT) -r $(XMTEST_VER_IMG); \
60 fi
62 existing:
63 @if test -n "$(INITRD)"; then \
64 wget $(INITRD)/$(XMTEST_VER_IMG); \
65 fi
66 @if [ -f $(XMTEST_VER_IMG) ] ; then \
67 ln -sf $(XMTEST_VER_IMG) initrd.img; \
68 else \
69 echo Error, $(XMTEST_VER_IMG) not found; \
70 false; \
71 fi
73 clean-local: am_config_clean-local
75 am_config_clean-local:
76 rm -Rf buildroot
77 rm -f *~
78 rm -f initrd.img
79 rm -f $(BR_TAR)
80 rm -f disk.img