kumquat-buildroot/package/xen/xen.mk
Alistair Francis a95f85fc72 xen: new package
Add support to compile Xen 4.6 and Xen tools for arm32 and arm64
targets.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
[Thomas:
 - Remove all "select" from the main Xen option, since the hypervisor
   can build fine without any additional library. The dependencies have
   been moved to the "tools" sub-option.
 - Make sure that at least one of the sub-option is enabled by selecting
   the hypervisor sub-option if the tools sub-option is not enabled.
 - Add a Config.in comment about the dependencies of the Xen tools.
 - Add missing dependency on argp-standalone in the .mk file.
 - Simplify the handling of XEN_INSTALL_TARGET_OPTS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-12 18:57:25 +02:00

54 lines
1.4 KiB
Makefile

################################################################################
#
# Xen
#
################################################################################
XEN_VERSION = 4.6.0
XEN_SITE = http://bits.xensource.com/oss-xen/release/$(XEN_VERSION)
XEN_LICENSE = GPLv2
XEN_LICENSE_FILES = COPYING
# Calculate XEN_ARCH
ifeq ($(ARCH),aarch64)
XEN_ARCH = arm64
else ifeq ($(ARCH),arm)
XEN_ARCH = arm32
endif
XEN_CONF_OPTS = --disable-ocamltools
XEN_MAKE_ENV = \
XEN_TARGET_ARCH=$(XEN_ARCH) \
CROSS_COMPILE=$(TARGET_CROSS) \
$(TARGET_CONFIGURE_OPTS)
ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
XEN_MAKE_OPTS += dist-xen
XEN_INSTALL_IMAGES = YES
define XEN_INSTALL_IMAGES_CMDS
cp $(@D)/xen/xen $(BINARIES_DIR)
endef
else
XEN_CONF_OPTS += --disable-xen
endif
ifeq ($(BR2_PACKAGE_XEN_TOOLS),y)
XEN_DEPENDENCIES += dtc libaio libglib2 ncurses openssl pixman util-linux yajl
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
XEN_DEPENDENCIES += argp-standalone
endif
XEN_INSTALL_TARGET_OPTS += DESTDIR=$(TARGET_DIR) install-tools
XEN_MAKE_OPTS += dist-tools
define XEN_INSTALL_INIT_SYSV
mv $(TARGET_DIR)/etc/init.d/xencommons $(TARGET_DIR)/etc/init.d/S50xencommons
mv $(TARGET_DIR)/etc/init.d/xen-watchdog $(TARGET_DIR)/etc/init.d/S50xen-watchdog
mv $(TARGET_DIR)/etc/init.d/xendomains $(TARGET_DIR)/etc/init.d/S60xendomains
endef
else
XEN_INSTALL_TARGET = NO
XEN_CONF_OPTS += --disable-tools
endif
$(eval $(autotools-package))