ia64/xen-unstable

view tools/libxc/ia64/Makefile @ 17042:a905c582a406

Add stubdomain support. See stubdom/README for usage details.

- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
arch_limits.h so as to permit getting them from there without
pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
tpm and other details. A few hacks are needed:
- Align ide and scsi buffers at least on sector size to permit
direct transmission to the block backend. While we are at it, just
page-align it to possibly save a segment. Also, limit the scsi
buffer size because of limitations of the block paravirtualization
protocol.
- Allocate big tables dynamically rather that letting them go to
bss: when Mini-OS gets installed in memory, bss is not lazily
allocated, and doing so during Mini-OS is unnecessarily trick while
we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 12 14:35:39 2008 +0000 (2008-02-12)
parents c21bd325088a
children 031c8f407e01
line source
1 ifneq ($(stubdom),y)
2 CTRL_SRCS-y += ia64/xc_ia64_stubs.c
4 GUEST_SRCS-y += ia64/xc_ia64_hvm_build.c
5 GUEST_SRCS-y += ia64/xc_ia64_linux_save.c
6 GUEST_SRCS-y += ia64/xc_ia64_linux_restore.c
8 GUEST_SRCS-y += ia64/xc_dom_ia64_util.c
9 GUEST_SRCS-y += ia64/dom_fw_acpi.c
11 DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S
12 endif
13 DOMFW_SRCS := $(addprefix ia64/, $(DOMFW_SRCS_BASE))
14 $(DOMFW_SRCS):
15 ln -sf ../$(XEN_ROOT)/xen/arch/ia64/xen/$(@F) $@
17 # XXX kludge: libxc/Makefile doesn't understand .S.
18 GUEST_SRCS-y += $(patsubst %.S, %.c, $(DOMFW_SRCS))
19 %.o: %.S
20 $(CC) $(CFLAGS) -c $< -o $@
21 %.opic: %.S
22 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
25 CFLAGS += -Iia64
27 DOMFW_ASM_HDRS_BASE := bundle.h dom_fw.h dom_fw_common.h dom_fw_domu.h
28 DOMFW_ASM_HDRS := $(addprefix ia64/asm/, $(DOMFW_ASM_HDRS_BASE))
29 $(DOMFW_ASM_HDRS): ia64/asm
30 ln -sf ../../$(XEN_ROOT)/xen/include/asm-ia64/$(@F) $@
31 build: $(DOMFW_ASM_HDR)
33 .PHONY: mk-symlinks-acpi mk-symlinks-misc ia64-clean
35 IA64_HDR_DIRS := ia64/asm ia64/xen ia64/acpi ia64/acpi/platform
36 $(IA64_HDR_DIRS):
37 mkdir -p $@
39 IA64_EMPTY_FILES := ia64/asm/acpi.h ia64/xen/list.h
40 $(IA64_EMPTY_FILES): $(IA64_HDR_DIRS)
41 echo "/* automatically created dummy empty header file. */" > $@
43 mk-symlinks-acpi: $(IA64_HDR_DIRS) $(IA64_EMPTY_FILES) $(DOMFW_ASM_HDRS)
44 ( cd ia64/acpi && ln -sf ../../$(XEN_ROOT)/xen/include/acpi/*.h .)
45 ( cd ia64/acpi/platform && ln -sf ../../../$(XEN_ROOT)/xen/include/acpi/platform/*.h .)
46 ( cd ia64/acpi/platform/ && ln -sf ../../aclinux.h .)
47 ( cd ia64/xen && ln -sf ../../$(XEN_ROOT)/xen/include/xen/acpi.h .)
48 mk-symlinks-misc: $(IA64_HDR_DIRS)
49 ( cd ia64/asm && ln -sf ../../$(XEN_ROOT)/xen/include/asm-ia64/linux-xen/asm/kregs.h .)
50 build: mk-symlinks-acpi mk-symlinks-misc
52 clean: ia64-clean
53 ia64-clean:
54 rm -rf $(DOMFW_SRCS) $(DOMFW_ASM_HDRS) $(IA64_EMPTY_FILES) $(IA64_HDR_DIRS)