debuggers.hg

view tools/firmware/etherboot/Makefile @ 16996:42369d21641d

hvm: Etherboot for E100 NIC
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 31 16:23:35 2008 +0000 (2008-01-31)
parents f3b418afc6be
children bb0477a0e9f2
line source
2 EB_VERSION=5.4.2
4 override XEN_TARGET_ARCH = x86_32
5 XEN_ROOT = ../../..
6 include $(XEN_ROOT)/tools/Rules.mk
8 D=etherboot-$(EB_VERSION)
9 T=etherboot-$(EB_VERSION).tar.gz
10 E=etherboot-build
12 NICS = rtl8139 eepro100
14 ROM_ZHS = $(addprefix eb-, $(addsuffix .zrom.h, $(NICS)))
16 all: eb-roms.h
18 eb-%.zrom.h: $E/src/Config
19 $(MAKE) -C $E/src bin/$*.zrom
20 ../hvmloader/mkhex etherboot_$* <$E/src/bin/$*.zrom >$@.new
21 mv -f $@.new $@
23 eb-rom-list.h: make-eb-rom-list $E/src/bin/Roms
24 ./$^ $(NICS) >$@.new && mv -f $@.new $@
26 eb-roms.h: eb-rom-list.h $(ROM_ZHS)
27 cat $^ >$@.new && mv -f $@.new $@
29 $E/src/Config: $T Config
30 rm -rf $D $E
31 tar zxf $T
32 cat Config >>$D/src/Config
33 @
34 # override many of the settings in Config
35 echo ARCH=i386 >>$D/src/Config
36 echo "HOST_CC=$(HOSTCC)" >>$D/src/Config
37 echo "CPP=$(CPP)" >>$D/src/Config
38 echo "CC=$(CC)" >>$D/src/Config
39 echo "AS=$(CC) -c -x assembler -" >>$D/src/Config
40 echo "LD=$(LD)" >>$D/src/Config
41 echo "SIZE=$(SIZE)" >>$D/src/Config
42 echo "AR=$(AR)" >>$D/src/Config
43 echo "RANLIB=$(RANLIB)" >>$D/src/Config
44 echo "OBJCOPY=$(OBJCOPY)" >>$D/src/Config
45 echo "CFLAGS+=$(CFLAGS)" >>$D/src/Config
46 echo "ASFLAGS+=$(CFLAGS)" >>$D/src/Config
47 echo "LDFLAGS+=$(LDFLAGS_DIRECT)" >>$D/src/Config
48 @
49 set -e; cd $D/src/arch/i386; \
50 sed -e '/ifneq.*GCC_MINORVERSION/,/endif/ s/^/#/' \
51 Config >Config.new; \
52 mv Config.new Config
53 mv $D $E
55 $E/src/bin/Roms: $E/src/Config
56 $(MAKE) -C $E/src bin/Roms
58 clean:
59 rm -rf $D $E *.zrom.h eb-rom-list.h eb-roms.h *~
61 .PHONY: all clean