2019-07-02 11:58:39 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# jailhouse
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-05-28 16:43:32 +02:00
|
|
|
JAILHOUSE_VERSION = 0.12
|
2019-07-02 11:58:39 +02:00
|
|
|
JAILHOUSE_SITE = $(call github,siemens,jailhouse,v$(JAILHOUSE_VERSION))
|
|
|
|
JAILHOUSE_LICENSE = GPL-2.0
|
|
|
|
JAILHOUSE_LICENSE_FILES = COPYING
|
|
|
|
JAILHOUSE_DEPENDENCIES = \
|
|
|
|
linux
|
|
|
|
|
|
|
|
JAILHOUSE_MAKE_OPTS = \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(KERNEL_ARCH)" \
|
|
|
|
KDIR="$(LINUX_DIR)" \
|
|
|
|
DESTDIR="$(TARGET_DIR)"
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS),y)
|
2019-11-09 22:33:52 +01:00
|
|
|
JAILHOUSE_DEPENDENCIES += \
|
|
|
|
host-python-mako \
|
|
|
|
host-python-setuptools
|
|
|
|
JAILHOUSE_MAKE_OPTS += \
|
|
|
|
HAS_PYTHON_MAKO="yes" \
|
|
|
|
PYTHON_PIP_USABLE="yes"
|
2019-07-02 11:58:39 +02:00
|
|
|
else
|
2019-11-09 22:33:52 +01:00
|
|
|
JAILHOUSE_MAKE_OPTS += \
|
|
|
|
HAS_PYTHON_MAKO="no" \
|
|
|
|
PYTHON_PIP_USABLE="no"
|
2019-07-02 11:58:39 +02:00
|
|
|
endif
|
|
|
|
|
2023-11-25 21:23:13 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS),y)
|
|
|
|
define JAILHOUSE_BUILD_HELPER_SCRIPTS
|
|
|
|
cd $(@D) && \
|
|
|
|
$(PKG_PYTHON_SETUPTOOLS_ENV) \
|
|
|
|
$(HOST_DIR)/bin/python setup.py \
|
|
|
|
build
|
|
|
|
endef
|
|
|
|
define JAILHOUSE_INSTALL_HELPER_SCRIPTS
|
|
|
|
cd $(@D) && \
|
|
|
|
$(PKG_PYTHON_SETUPTOOLS_ENV) \
|
|
|
|
$(HOST_DIR)/bin/python setup.py \
|
|
|
|
install --no-compile \
|
2023-10-01 00:16:31 +02:00
|
|
|
$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) \
|
|
|
|
--root=$(TARGET_DIR))
|
2023-11-25 21:23:13 +01:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2019-07-02 11:58:39 +02:00
|
|
|
define JAILHOUSE_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(JAILHOUSE_MAKE_OPTS) -C $(@D)
|
|
|
|
|
2023-11-25 21:23:13 +01:00
|
|
|
$(JAILHOUSE_BUILD_HELPER_SCRIPTS)
|
2019-07-02 11:58:39 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define JAILHOUSE_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(JAILHOUSE_MAKE_OPTS) -C $(@D) modules_install firmware_install tool_inmates_install
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(JAILHOUSE_MAKE_OPTS) -C $(@D)/tools src=$(@D)/tools install
|
|
|
|
|
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/jailhouse
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/configs/*/*.cell $(TARGET_DIR)/etc/jailhouse
|
|
|
|
|
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/local/libexec/jailhouse/demos
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/inmates/demos/*/*.bin $(TARGET_DIR)/usr/local/libexec/jailhouse/demos
|
|
|
|
|
2023-11-25 21:23:13 +01:00
|
|
|
$(JAILHOUSE_INSTALL_HELPER_SCRIPTS)
|
2019-07-02 11:58:39 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|