ia64/xen-unstable

view xen/arch/powerpc/Makefile @ 11060:00a41d1daf89

[POWERPC] add support for builtin command line
Support expressing Xen command line arguments at make invocation. Use
same section name as Linux's zImage and reserve a certain amount of
space so that arguments can be manipulated by external tools.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Amos Waterland <apw@us.ibm.com>
date Mon Aug 07 17:16:18 2006 -0500 (2006-08-07)
parents 1eb42266de1b
children c841daf98bb0
line source
1 ifneq ($(DOM0_IMAGE),)
2 builtin_dom0 := y
3 endif
5 subdir-$(HAS_PPC64) += powerpc64
6 subdir-y += papr
8 obj-y += audit.o
9 obj-y += bitops.o
10 obj-y += boot_of.o
11 obj-y += dart.o
12 obj-y += dart_u3.o
13 obj-y += dart_u4.o
14 obj-y += delay.o
15 obj-y += dom0_ops.o
16 obj-y += domain_build.o
17 obj-y += domain.o
18 obj-y += exceptions.o
19 obj-y += external.o
20 obj-y += float.o
21 obj-y += hcalls.o
22 obj-y += htab.o
23 obj-y += iommu.o
24 obj-y += irq.o
25 obj-y += mambo.o
26 obj-y += mm.o
27 obj-y += mpic.o
28 obj-y += mpic_init.o
29 obj-y += of-devtree.o
30 obj-y += of-devwalk.o
31 obj-y += ofd_fixup.o
32 obj-y += physdev.o
33 obj-y += rtas.o
34 obj-y += setup.o
35 obj-y += smp.o
36 obj-y += time.o
37 obj-y += usercopy.o
39 obj-$(debug) += 0opt.o
40 obj-$(crash_debug) += gdbstub.o
41 obj-$(builtin_dom0) += dom0.o
43 obj-y += firmware_image.o
45 obj-y += elf32.o
47 # These are extra warnings like for the arch/ppc directory but may not
48 # allow the rest of the tree to build.
49 PPC_C_WARNINGS += -Wundef -Wmissing-prototypes -Wmissing-declarations
50 CFLAGS += $(PPC_C_WARNINGS)
52 LINK=0x3000000
53 boot32_link_base = $(LINK)
54 xen_link_offset = 100
55 xen_link_base = $(patsubst %000,%$(xen_link_offset),$(LINK))
57 #
58 # The following flags are fed to gcc in order to link several
59 # objects into a single ELF segment and to not link in any additional
60 # objects that gcc would normally like to
61 #
62 OMAGIC = -N -nodefaultlibs -nostartfiles
64 firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
65 $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
67 firmware_image: firmware
68 $(CROSS_COMPILE)objcopy --output-target=binary $< $@
70 firmware_image.o: firmware_image
71 $(CROSS_COMPILE)objcopy --input-target=binary \
72 --output-target=elf64-powerpc \
73 --binary-architecture=powerpc \
74 --redefine-sym _binary_$<_start=$(@:%.o=%)_start \
75 --redefine-sym _binary_$<_end=$(@:%.o=%)_end \
76 --redefine-sym _binary_$<_size=$(@:%.o=%)_size $< $@
78 #
79 # Hacks for included C files
80 #
81 irq.o: ../x86/irq.c
82 physdev.o: ../x86/physdev.c
84 HDRS += $(wildcard *.h)
86 CMDLINE = "xen"
87 boot_of.o: CFLAGS += -DCMDLINE="\"$(CMDLINE)\""
89 start.o: boot/start.S
90 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
92 $(TARGET)-syms: start.o $(ALL_OBJS) xen.lds
93 $(CC) $(CFLAGS) $(OMAGIC) -Wl,-Ttext,$(xen_link_base),-T,xen.lds start.o $(ALL_OBJS) -o $@
95 $(TARGET).bin: $(TARGET)-syms
96 $(CROSS_COMPILE)objcopy --output-target=binary $< $@
98 $(TARGET).bin.o: $(TARGET).bin
99 $(CROSS_COMPILE)objcopy --input-target=binary \
100 --output-target=elf32-powerpc \
101 --binary-architecture=powerpc $< $@
103 boot32.o: boot/boot32.S
104 $(CC) -m32 -Wa,-a32,-mppc64bridge \
105 -D__ASSEMBLY__ -D__BRIDGE64__ $(CFLAGS) -c $< -o $@
107 $(TARGET): boot32.o $(TARGET).bin.o
108 $(CC) -m32 -N -Wl,-melf32ppclinux -static -nostdlib \
109 -Wl,-Ttext,$(boot32_link_base) -Wl,-Tdata,$(xen_link_base) \
110 $(CFLAGS) $^ -o $@
112 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
113 $(CC) $(CFLAGS) -S -o $@ $<
115 xen.lds: xen.lds.S $(HDRS)
116 $(CC) $(CFLAGS) -P -E $(AFLAGS) -o $@ $<
118 dom0.bin: $(DOM0_IMAGE)
119 cp $< $@
121 clean::
122 $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean
123 rm -f firmware firmware_image dom0.bin