summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2024-01-03 19:51:28 -0700
committerMark Hatle <mark.hatle@amd.com>2024-01-06 11:36:39 -0600
commit0ddfa30d488a725341da80ea7bafb0da23e28659 (patch)
tree970440300cb8eea525dfb1240334ed4835dafd85
parentbfe41ae084d13c13c595830c0ec5d6dde2252b57 (diff)
downloadmeta-xilinx-0ddfa30d488a725341da80ea7bafb0da23e28659.tar.gz
xen: Move xen recipes and files from petalinux layer
Move xen recipes and files from meta-petalinux to xilinx-virtualization layer exlcuding example configuration and passthrough device tree. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch57
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch73
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch54
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc76
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc117
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc861
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_%.bbappend27
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx.inc7
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen.inc233
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_%.bbappend20
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb19
13 files changed, 1580 insertions, 0 deletions
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch
new file mode 100644
index 00000000..135860ab
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch
@@ -0,0 +1,57 @@
1From b300c18ab899b3c899e5405c96c20a32e51d77c8 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 2 Jul 2018 23:10:28 -0400
4Subject: [PATCH] xen: Fix menuconfig and add support for config fragments and
5
6Upstream-Status: Xen: Inappropriate [oe specific, cross compile issue]
7Upstream-Status: Kernel: Pending
8Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
9commit e6972e689a980ab28637e94e48c77eeace6abde5
10
11 xen/kconfig,menuconfig,mconf-cfg: Allow specification of ncurses location
12
13 In some cross build environments such as the Yocto Project build
14 environment it provides an ncurses library that is compiled
15 differently than the host's version. This causes display corruption
16 problems when the host's curses includes are used instead of the
17 includes from the provided compiler are overridden. There is a second
18 case where there is no curses libraries at all on the host system and
19 menuconfig will just fail entirely.
20
21 The solution is simply to allow an override variable in
22 check-lxdialog.sh for environments such as the Yocto Project. Adding
23 a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
24 compiling and linking against the right headers and libraries.
25
26 Change-Id: Ibe8dfafc90655e3be2671dbbb0cb7f5631fc4d44
27 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
28 cc: Michal Marek <mmarek@suse.cz>
29 cc: linux-kbuild@vger.kernel.org
30 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
31
32---
33 xen/tools/kconfig/mconf-cfg.sh | 8 ++++++++
34 1 file changed, 8 insertions(+)
35 mode change 100755 => 100644 xen/tools/kconfig/mconf-cfg.sh
36
37diff --git a/xen/tools/kconfig/mconf-cfg.sh b/xen/tools/kconfig/mconf-cfg.sh
38old mode 100755
39new mode 100644
40index c812872d7f..56eb4fc79f
41--- a/xen/tools/kconfig/mconf-cfg.sh
42+++ b/xen/tools/kconfig/mconf-cfg.sh
43@@ -4,6 +4,14 @@
44 PKG="ncursesw"
45 PKG2="ncurses"
46
47+if [ "$CROSS_CURSES_LIB" != "" ]; then
48+ echo libs=\'$CROSS_CURSES_LIB\'
49+ if [ x"$CROSS_CURSES_INC" != x ]; then
50+ echo cflags=\'$CROSS_CURSES_INC\'
51+ fi
52+ exit 0
53+fi
54+
55 if [ -n "$(command -v pkg-config)" ]; then
56 if pkg-config --exists $PKG; then
57 echo cflags=\"$(pkg-config --cflags $PKG)\"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
new file mode 100644
index 00000000..35cd9a81
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
@@ -0,0 +1,73 @@
1From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001
2Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com>
3From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
4Date: Fri, 19 Oct 2018 11:01:37 +0200
5Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args
6
7Upstream-Status: Xen: Inappropriate [oe specific, python install issues]
8
9Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
10as well as other parameters set by the OpenEmbedded build system.
11This is especially useful when the target libdir is not the default one
12(/usr/lib), but for example /usr/lib64.
13
14Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
15
16Forward-ported to Xen 4.12.0
17Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
18
19Modified to support pygrub installation with python 3
20Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
21
22Forward-ported to Xen 4.14.0
23Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
24
25Forward-ported to Xen 4.15.0
26Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
27
28---
29 tools/pygrub/Makefile | 7 +++++--
30 tools/python/Makefile | 2 +-
31 2 files changed, 6 insertions(+), 3 deletions(-)
32
33diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
34index 37b2146214..ffb9270065 100644
35--- a/tools/pygrub/Makefile
36+++ b/tools/pygrub/Makefile
37@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
38 all: build
39 .PHONY: build
40 build:
41- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
42+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
43
44 .PHONY: install
45 install: all
46@@ -18,7 +18,10 @@ install: all
47 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
48 LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
49 --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
50- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
51+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
52+ $(DISTUTILS_INSTALL_ARGS)
53+ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
54+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
55 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
56 "`readlink -f $(DESTDIR)/$(bindir)`" != \
57 "`readlink -f $(LIBEXEC_BIN)`" ]; then \
58diff --git a/tools/python/Makefile b/tools/python/Makefile
59index cc76423647..5cb11ae453 100644
60--- a/tools/python/Makefile
61+++ b/tools/python/Makefile
62@@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
63 SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \
64 SHLIB_libxenguest="$(SHLIB_libxenguest)" \
65 SHLIB_libxenstore="$(SHLIB_libxenstore)" \
66- $(PYTHON) setup.py
67+ $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS)
68
69 .PHONY: build
70 build:
71--
722.17.1
73
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch
new file mode 100644
index 00000000..fa2a82ff
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch
@@ -0,0 +1,54 @@
1From mboxrd@z Thu Jan 1 00:00:00 1970
2From: Anthony PERARD <anthony.perard@citrix.com>
3Subject: [XEN PATCH] build: fix building flask headers before descending in flask/ss/
4Date: Fri, 20 Jan 2023 13:36:26 +0000
5Message-ID: <20230120133626.55680-1-anthony.perard@citrix.com>
6X-Mailer: git-send-email 2.30.2
7MIME-Version: 1.0
8Content-Transfer-Encoding: 8bit
9Content-Type: text/plain
10
11Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't
12work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk.
13So, make is allow to try to build objects in "xsm/flask/ss/" before
14generating the headers.
15
16Adding a prerequisite on "$(obj)/ss" instead will fix the issue has
17that the target used to run make in this subdirectory.
18
19Unfortunatly, that target is also used when running `make clean`, so
20we need to ignore it in this case. $(MAKECMDGOALS) can't be used in
21this case as it is empty, but we can guess which operation is done by
22looking at the list of loaded makefiles.
23
24Upstream-Status: backport [https://lore.kernel.org/xen-devel/20230120133626.55680-1-anthony.perard@citrix.com/T/#u]
25
26Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use obj=$subdir")
27Reported-by: "Daniel P. Smith" <dpsmith@apertussolutions.com>
28Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
29---
30 xen/xsm/flask/Makefile | 6 +++++-
31 1 file changed, 5 insertions(+), 1 deletion(-)
32
33diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
34index d25312f4fa..2d24346ee3 100644
35--- a/xen/xsm/flask/Makefile
36+++ b/xen/xsm/flask/Makefile
37@@ -16,7 +16,11 @@ FLASK_H_FILES := flask.h class_to_string.h initial_sid_to_string.h
38 AV_H_FILES := av_perm_to_string.h av_permissions.h
39 ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES))
40
41-$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(ALL_H_FILES))
42+# Adding prerequisite to descending into ss/ folder only when not running `make
43+# clean`.
44+ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
45+$(addprefix $(obj)/,$(obj-y)) $(obj)/ss: $(addprefix $(obj)/,$(ALL_H_FILES))
46+endif
47 extra-y += $(ALL_H_FILES)
48
49 mkflask := $(srcdir)/policy/mkflask.sh
50--
51Anthony PERARD
52
53
54
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc
new file mode 100644
index 00000000..fb0093e3
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc
@@ -0,0 +1,18 @@
1
2valid_xen_archs = " \
3 x86_64 x86_32 \
4 arm32 arm64 \
5 "
6
7def map_xen_arch(a, d):
8 import re
9 valid_archs = d.getVar('valid_xen_archs').split()
10
11 if re.match("i.86", a): return "x86_32"
12 elif re.match("x86.64", a): return "x86_64"
13 elif re.match("arm.*", a): return "arm32"
14 elif re.match("aarch64.*", a): return "arm64"
15 elif a in valid_archs: return a
16 else:
17 return "INVALID"
18
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc
new file mode 100644
index 00000000..ad9d5fdb
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc
@@ -0,0 +1,76 @@
1# The Xen block tap components are packaged separately here to support
2# the option to build them in a separate recipe from xen-tools.
3
4BLKTAP_PACKAGES ?= " \
5 ${PN}-blktap \
6 ${PN}-libblktap \
7 ${PN}-libblktapctl \
8 ${PN}-libblktapctl-dev \
9 ${PN}-libblktap-dev \
10 ${PN}-libvhd \
11 ${PN}-libvhd-dev \
12 ${PN}-blktap-staticdev \
13 "
14
15BLKTAP_PROVIDES ?= " \
16 virtual/blktap \
17 virtual/libblktap \
18 virtual/libblktapctl \
19 virtual/libvhd \
20 "
21
22BLKTAP_RRECOMMENDS ?= " \
23 virtual/blktap \
24 virtual/libblktap \
25 virtual/libblktapctl \
26 virtual/libvhd \
27 "
28
29RPROVIDES:${PN}-blktap = "virtual/blktap"
30RPROVIDES:${PN}-libblktap = "virtual/libblktap"
31RPROVIDES:${PN}-libblktapctl = "virtual/libblktapctl"
32RPROVIDES:${PN}-libvhd = "virtual/libvhd"
33
34FILES:${PN}-blktap-staticdev += "\
35 ${libdir}/libblktapctl.a \
36 ${libdir}/libvhd.a \
37 ${libdir}/libblktap.a \
38 "
39
40FILES:${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
41FILES:${PN}-libblktapctl-dev = " \
42 ${libdir}/libblktapctl.so \
43 ${libdir}/pkgconfig/xenblktapctl.pc \
44 ${datadir}/pkgconfig/xenblktapctl.pc \
45 "
46
47FILES:${PN}-libvhd = "${libdir}/libvhd.so.*"
48FILES:${PN}-libvhd-dev = " \
49 ${libdir}/libvhd.so \
50 ${libdir}/pkgconfig/vhd.pc \
51 ${datadir}/pkgconfig/vhd.pc \
52 "
53
54FILES:${PN}-libblktap = "${libdir}/libblktap.so.*"
55FILES:${PN}-libblktap-dev = " \
56 ${libdir}/libblktap.so \
57 ${libdir}/pkgconfig/blktap.pc \
58 ${datadir}/pkgconfig/blktap.pc \
59 "
60
61FILES:${PN}-blktap = "\
62 ${sbindir}/blktapctrl \
63 ${sbindir}/img2qcow \
64 ${sbindir}/lock-util \
65 ${sbindir}/qcow2raw \
66 ${sbindir}/qcow-create \
67 ${sbindir}/tap-ctl \
68 ${sbindir}/tapdisk \
69 ${sbindir}/tapdisk2 \
70 ${sbindir}/tapdisk-client \
71 ${sbindir}/tapdisk-diff \
72 ${sbindir}/tapdisk-stream \
73 ${sbindir}/td-util \
74 ${sbindir}/vhd-update \
75 ${sbindir}/vhd-util \
76 "
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc
new file mode 100644
index 00000000..6f3d24d0
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc
@@ -0,0 +1,117 @@
1SUMMARY = "Xen hypervisor"
2DESCRIPTION = "The Xen hypervisor"
3
4# This recipe is for just the Xen hypervisor.
5# Separate recipes are used to build Xen and its components:
6# this allows for varying the target architecture or toolchain used
7# to build the different components. eg. 32-bit tools and a 64-bit hypervisor.
8
9# The Xen hypervisor has a narrower compatible platform range than the Xen tools
10COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux-gnueabi'
11
12inherit deploy python3native cml1
13
14PACKAGES = " \
15 ${PN} \
16 ${PN}-dbg \
17 ${PN}-efi \
18 "
19
20FILES:${PN} = " \
21 /boot/xen-* \
22 /boot/xen \
23 /boot/xen-*.gz \
24 /boot/xen.gz \
25 /boot/xen-syms-* \
26 "
27
28FILES:${PN}-dbg += "${libdir}/debug/*"
29
30FILES:${PN}-efi = " \
31 /boot/xen.efi \
32 ${exec_prefix}/lib64/efi/xen* \
33 "
34
35do_configure() {
36 do_configure_common
37
38 # Handle the config fragments
39 cfgs="${@' '.join(find_cfgs(d))}"
40 if [ -n "${cfgs}" ]; then
41 # If .config is not present generate one in order
42 # to use the merge_config.sh
43 if [ ! -f "${S}/xen/.config" ] ; then
44 oe_runmake -C ${S}/xen defconfig
45 fi
46 ${S}/xen/tools/kconfig/merge_config.sh -m -O \
47 ${S}/xen ${S}/xen/.config "${cfgs}"
48 fi
49}
50
51# The hypervisor binary for arm must not be built with the hard floating point
52# ABI. Override CC and CPP when invoking make so that they do not contain
53# TUNE_CCARGS.
54EXTRA_OEMAKE:arm += "CC='${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} \
55 ${CC_REPRODUCIBLE_OPTIONS}' \
56 CPP='${CCACHE}${HOST_PREFIX}gcc -E ${TOOLCHAIN_OPTIONS} \
57 ${CC_REPRODUCIBLE_OPTIONS}'"
58
59do_compile() {
60 oe_runmake xen PYTHON="${PYTHON}" \
61 EXTRA_CFLAGS_XEN_CORE="${EXTRA_CFLAGS_XEN_CORE}"
62}
63
64do_install() {
65 oe_runmake DESTDIR="${D}" install-xen
66}
67# The do_install also ships files in /boot and /usr/lib64
68SYSROOT_DIRS += "/boot ${exec_prefix}/lib64"
69
70do_deploy() {
71 install -d ${DEPLOYDIR}
72
73 if [ -f ${B}/xen/xen ]; then
74 install -m 0644 ${B}/xen/xen ${DEPLOYDIR}/xen-${MACHINE}
75 fi
76
77 if [ -f ${B}/xen/xen.gz ]; then
78 install -m 0644 ${B}/xen/xen.gz ${DEPLOYDIR}/xen-${MACHINE}.gz
79 fi
80
81 if [ -f ${B}/xen/xen.efi ]; then
82 install -m 0644 ${B}/xen/xen.efi ${DEPLOYDIR}/xen-${MACHINE}.efi
83 fi
84}
85# Scheduling the do_deploy task:
86# - deploy copies files from ${B} that are written during do_compile so must
87# at least run afer that task has completed
88# - the hypervisor binaries may be included in the image filesystem, so we
89# must ensure that the binaries deployed match what is staged in the sysroot:
90# so do_deploy must run after do_populate_sysroot and after do_compile is
91# also needed for when having rm_work and bitbake needs to re-run do_deploy,
92# we ensure that the ${B} is re-generated, otherwise the deploy-xen will be
93# empty
94# - add the task before do_build to ensure that deployment has completed when
95# the recipe build done stamp is written
96addtask deploy after do_compile do_populate_sysroot before do_build
97# To ensure that a deployed hypervisor has matching tools, add a dependency to
98# make sure that the tools have built and been staged:
99do_deploy[depends] += "xen-tools:do_populate_sysroot"
100# Also ensure anything that the tools recipe needs to deploy, such as a
101# XSM policy file, has been deployed first:
102do_deploy[depends] += "xen-tools:do_deploy"
103
104# Enable use of menuconfig directly from bitbake and also within the devshell
105do_devshell[depends] += "ncurses-native:do_populate_sysroot"
106
107# Pass the native library path for kconfig build when running the do_menuconfig
108# task
109CROSS_CURSES_LIB += "-L${STAGING_LIBDIR_NATIVE}"
110
111# Specify the root dir of the .config file for do_menuconfig and do_diffconfig
112# tasks
113KCONFIG_CONFIG_ROOTDIR = "${S}/xen"
114
115# Xen is setting all CC flags on its own. Make sure that they are not modified
116# for aarch64, e.g. with architecture-specific optimizations.
117TUNE_CCARGS:aarch64=""
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc
new file mode 100644
index 00000000..f770eec2
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc
@@ -0,0 +1,861 @@
1SUMMARY = "Xen hypervisor tools"
2DESCRIPTION = "Tools and utility software for the Xen hypervisor"
3
4COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux-gnueabi'
5
6inherit setuptools3 update-rc.d systemd deploy
7require xen-blktap.inc
8
9RDEPENDS:${PN} = "\
10 bash perl xz \
11 ${PN}-console \
12 ${PN}-libxenguest \
13 ${PN}-libxenlight \
14 ${PN}-libxenvchan \
15 ${PN}-libxenctrl \
16 ${PN}-libxlutil \
17 ${PN}-libxenstat \
18 ${PN}-libxenstore \
19 ${PN}-libfsimage \
20 ${PN}-fsimage \
21 ${PN}-scripts-block \
22 ${PN}-scripts-network \
23 ${PN}-xen-watchdog \
24 ${PN}-xencommons \
25 ${PN}-xendomains \
26 ${PN}-xenstore \
27 virtual/xenstored \
28 ${PN}-xl \
29 "
30
31RDEPENDS:${PN}-dev = ""
32
33RRECOMMENDS:${PN} = " \
34 qemu \
35 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
36 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
37 ${PN}-flask \
38 ${PN}-hvmloader \
39 ${PN}-libxenhypfs \
40 ${PN}-shim \
41 ${PN}-ucode \
42 ${PN}-vchan \
43 ${PN}-xenpaging \
44 ${PN}-xenhypfs \
45 "
46
47RDEPENDS:${PN}-devd = " \
48 ${PN}-xl \
49 "
50
51RDEPENDS:${PN}-fsimage = " \
52 libext2fs \
53 "
54
55RDEPENDS:${PN}-misc = " \
56 perl \
57 python3 \
58 ${PN}-xencov \
59 "
60
61RSUGGESTS:${PN}-misc = " \
62 ${PN}-xencons \
63 ${PN}-xenpvnetboot \
64 "
65
66RDEPENDS:${PN}-python = " \
67 python3 \
68 "
69
70RDEPENDS:${PN}-pygrub = " \
71 python3 \
72 ${PN}-python \
73 "
74
75RDEPENDS:${PN}-remus = "bash"
76
77RDEPENDS:${PN}-scripts-block = "\
78 bash \
79 ${PN}-scripts-common \
80 ${PN}-volatiles \
81 "
82
83RDEPENDS:${PN}-scripts-common = "bash"
84
85RDEPENDS:${PN}-scripts-network = "\
86 bash \
87 bridge-utils \
88 ${PN}-scripts-common \
89 ${PN}-volatiles \
90 "
91
92RRECOMMENDS:${PN}-scripts-network = "\
93 ifupdown \
94 "
95
96RSUGGESTS:${PN}-xencov = "${PN}-xencov-split"
97
98RDEPENDS:${PN}-xencommons = "\
99 bash \
100 util-linux-prlimit \
101 ${PN}-console \
102 ${PN}-xenstore \
103 virtual/xenstored \
104 ${PN}-xl \
105 ${PN}-scripts-common \
106 "
107
108RDEPENDS:${PN}-xendomains = "\
109 bash \
110 ${PN}-console \
111 ${PN}-scripts-block \
112 ${PN}-scripts-common \
113 virtual/xenstored \
114 "
115
116RDEPENDS:${PN}-xenhypfs = " \
117 ${PN}-libxenhypfs \
118 "
119
120RDEPENDS:${PN}-xl = "libgcc"
121
122RDEPENDS:${PN}-xenmon = " \
123 python3 \
124 "
125
126RSUGGESTS:${PN}-xentrace = "${PN}-xentrace-format"
127
128RDEPENDS:${PN}-xen-watchdog = "bash"
129
130PACKAGES = " \
131 ${PN} \
132 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_PACKAGES}', d)} \
133 ${PN}-console \
134 ${PN}-cpuid \
135 ${PN}-dbg \
136 ${PN}-dev \
137 ${PN}-devd \
138 ${PN}-doc \
139 ${PN}-flask \
140 ${PN}-flask-tools \
141 ${PN}-fsimage \
142 ${PN}-gdbsx \
143 ${PN}-hvmloader \
144 ${PN}-init-xenstore-dom \
145 ${PN}-kdd \
146 ${PN}-libfsimage \
147 ${PN}-libfsimage-dev \
148 ${PN}-libxencall \
149 ${PN}-libxencall-dev \
150 ${PN}-libxenctrl \
151 ${PN}-libxenctrl-dev \
152 ${PN}-libxendevicemodel \
153 ${PN}-libxendevicemodel-dev \
154 ${PN}-libxenevtchn \
155 ${PN}-libxenevtchn-dev \
156 ${PN}-libxenforeignmemory \
157 ${PN}-libxenforeignmemory-dev \
158 ${PN}-libxengnttab \
159 ${PN}-libxengnttab-dev \
160 ${PN}-libxenguest \
161 ${PN}-libxenguest-dev \
162 ${PN}-libxenhypfs \
163 ${PN}-libxenhypfs-dev \
164 ${PN}-libxenlight \
165 ${PN}-libxenlight-dev \
166 ${PN}-libxenstat \
167 ${PN}-libxenstat-dev \
168 ${PN}-libxenstore \
169 ${PN}-libxenstore-dev \
170 ${PN}-libxentoolcore \
171 ${PN}-libxentoolcore-dev \
172 ${PN}-libxentoollog \
173 ${PN}-libxentoollog-dev \
174 ${PN}-libxenvchan \
175 ${PN}-libxenvchan-dev \
176 ${PN}-libxlutil \
177 ${PN}-libxlutil-dev \
178 ${PN}-livepatch \
179 ${PN}-misc \
180 ${PN}-pygrub \
181 ${PN}-python \
182 ${PN}-remus \
183 ${PN}-scripts-block \
184 ${PN}-scripts-common \
185 ${PN}-scripts-network \
186 ${PN}-shim \
187 ${PN}-staticdev \
188 ${PN}-ucode \
189 ${PN}-vchan \
190 ${PN}-volatiles \
191 ${PN}-xcutils \
192 ${PN}-xencommons \
193 ${PN}-xencov \
194 ${PN}-xend \
195 ${PN}-xend-examples \
196 ${PN}-xendomains \
197 ${PN}-xenhypfs \
198 ${PN}-xenmon \
199 ${PN}-xenpaging \
200 ${PN}-xenpmd \
201 ${PN}-xenstat \
202 ${PN}-xenstore \
203 ${PN}-xenstored \
204 ${PN}-xentrace \
205 ${PN}-xen-watchdog \
206 ${PN}-xl \
207 ${PN}-xl-examples \
208 ${PN}-xm \
209 ${PN}-xm-examples \
210 ${PN}-xen-access \
211 ${PN}-xen-memshare \
212 ${PN}-test \
213 ${PN}-xen-vmtrace \
214 ${PN}-xen-mceinj \
215 "
216
217PROVIDES =+ " \
218 virtual/xenstored \
219 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_PROVIDES}', d)} \
220 "
221
222# There are multiple implementations of the XenStore daemon, so we use a
223# virtual package to allow for substitution.
224RPROVIDES:${PN}-xenstored = "virtual/xenstored"
225
226FILES:${PN}-dbg += "\
227 ${libdir}/xen/bin/.debug \
228 ${nonarch_libdir}/${PYTHON_DIR}/site-packages/.debug \
229 ${nonarch_libdir}/${PYTHON_DIR}/site-packages/xen/lowlevel/.debug \
230 ${libdir}/fs/xfs/.debug \
231 ${libdir}/fs/ufs/.debug \
232 ${libdir}/fs/ext2fs-lib/.debug \
233 ${libdir}/fs/fat/.debug \
234 ${libdir}/fs/zfs/.debug \
235 ${libdir}/fs/reiserfs/.debug \
236 ${libdir}/fs/iso9660/.debug \
237 ${libdir}/fs/**/.debug \
238 ${sbindir}/.debug \
239 ${libdir}exec/.debug \
240 ${libdir}/xen/libexec/.debug \
241 ${bindir}/.debug \
242 ${nonarch_libdir}/${PYTHON_DIR}/dist-packages/.debug \
243 ${nonarch_libdir}/${PYTHON_DIR}/dist-packages/xen/lowlevel/.debug \
244 "
245
246FILES:${PN}-dev = "\
247 ${includedir} \
248 "
249
250FILES:${PN}-doc = "\
251 ${sysconfdir}/xen/README \
252 ${sysconfdir}/xen/README.incompatibilities \
253 ${datadir}/doc \
254 ${datadir}/man \
255 "
256
257FILES:${PN}-staticdev += "\
258 ${libdir}/libxenguest.a \
259 ${libdir}/libxenlight.a \
260 ${libdir}/libxenvchan.a \
261 ${libdir}/libxenctrl.a \
262 ${libdir}/libxlutil.a \
263 ${libdir}/libxenstat.a \
264 ${libdir}/libxenstore.a \
265 "
266
267FILES:${PN}-libxencall = "${libdir}/libxencall.so.*"
268FILES:${PN}-libxencall-dev = " \
269 ${libdir}/libxencall.so \
270 ${libdir}/pkgconfig/xencall.pc \
271 ${datadir}/pkgconfig/xencall.pc \
272 "
273
274FILES:${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
275FILES:${PN}-libxenctrl-dev = " \
276 ${libdir}/libxenctrl.so \
277 ${libdir}/pkgconfig/xencontrol.pc \
278 ${datadir}/pkgconfig/xencontrol.pc \
279 "
280
281FILES:${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
282FILES:${PN}-libxendevicemodel-dev = " \
283 ${libdir}/libxendevicemodel.so \
284 ${libdir}/pkgconfig/xendevicemodel.pc \
285 ${datadir}/pkgconfig/xendevicemodel.pc \
286 "
287
288FILES:${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
289FILES:${PN}-libxenevtchn-dev = " \
290 ${libdir}/libxenevtchn.so \
291 ${libdir}/pkgconfig/xenevtchn.pc \
292 ${datadir}/pkgconfig/xenevtchn.pc \
293 "
294
295FILES:${PN}-libxenforeignmemory = "${libdir}/libxenforeignmemory.so.*"
296FILES:${PN}-libxenforeignmemory-dev = " \
297 ${libdir}/libxenforeignmemory.so \
298 ${libdir}/pkgconfig/xenforeignmemory.pc \
299 ${datadir}/pkgconfig/xenforeignmemory.pc \
300 "
301
302FILES:${PN}-libxengnttab = "${libdir}/libxengnttab.so.*"
303FILES:${PN}-libxengnttab-dev = " \
304 ${libdir}/libxengnttab.so \
305 ${libdir}/pkgconfig/xengnttab.pc \
306 ${datadir}/pkgconfig/xengnttab.pc \
307 "
308
309FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*"
310FILES:${PN}-libxenguest-dev = " \
311 ${libdir}/libxenguest.so \
312 ${libdir}/pkgconfig/xenguest.pc \
313 ${datadir}/pkgconfig/xenguest.pc \
314 "
315
316FILES:${PN}-libxenhypfs = "${libdir}/libxenhypfs.so.*"
317FILES:${PN}-libxenhypfs-dev = " \
318 ${libdir}/libxenhypfs.so \
319 ${libdir}/pkgconfig/xenhypfs.pc \
320 "
321
322FILES:${PN}-libxenlight = "${libdir}/libxenlight.so.*"
323FILES:${PN}-libxenlight-dev = " \
324 ${libdir}/libxenlight.so \
325 ${libdir}/pkgconfig/xenlight.pc \
326 ${datadir}/pkgconfig/xenlight.pc \
327 "
328
329FILES:${PN}-libxenstat = "${libdir}/libxenstat.so.*"
330FILES:${PN}-libxenstat-dev = " \
331 ${libdir}/libxenstat.so \
332 ${libdir}/pkgconfig/xenstat.pc \
333 ${datadir}/pkgconfig/xenstat.pc \
334 "
335
336FILES:${PN}-libxenstore = "${libdir}/libxenstore.so.*"
337FILES:${PN}-libxenstore-dev = " \
338 ${libdir}/libxenstore.so \
339 ${libdir}/pkgconfig/xenstore.pc \
340 ${datadir}/pkgconfig/xenstore.pc \
341 "
342
343FILES:${PN}-libxentoolcore = "${libdir}/libxentoolcore.so.*"
344FILES:${PN}-libxentoolcore-dev = " \
345 ${libdir}/libxentoolcore.so \
346 ${libdir}/pkgconfig/xentoolcore.pc \
347 ${datadir}/pkgconfig/xentoolcore.pc \
348 "
349
350FILES:${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
351FILES:${PN}-libxentoollog-dev = " \
352 ${libdir}/libxentoollog.so \
353 ${libdir}/pkgconfig/xentoollog.pc \
354 ${datadir}/pkgconfig/xentoollog.pc \
355 "
356
357FILES:${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
358FILES:${PN}-libxenvchan-dev = " \
359 ${libdir}/libxenvchan.so \
360 ${libdir}/pkgconfig/xenvchan.pc \
361 ${datadir}/pkgconfig/xenvchan.pc \
362 "
363
364FILES:${PN}-libxlutil = "${libdir}/libxlutil.so.*"
365FILES:${PN}-libxlutil-dev = " \
366 ${libdir}/libxlutil.so \
367 ${libdir}/pkgconfig/xlutil.pc \
368 ${datadir}/pkgconfig/xlutil.pc \
369 "
370FILES:${PN}-libvhd = "${libdir}/libvhd.so.*"
371FILES:${PN}-libvhd-dev = " \
372 ${libdir}/libvhd.so \
373 ${libdir}/pkgconfig/vhd.pc \
374 ${datadir}/pkgconfig/vhd.pc \
375 "
376
377FILES:${PN}-libfsimage = " \
378 ${libdir}/libfsimage.so.* \
379 ${libdir}/libxenfsimage.so.* \
380 "
381
382FILES:${PN}-libfsimage-dev = " \
383 ${libdir}/libfsimage.so \
384 ${libdir}/libxenfsimage.so \
385 ${libdir}/pkgconfig/fsimage.pc \
386 ${datadir}/pkgconfig/fsimage.pc \
387 ${libdir}/pkgconfig/xenfsimage.pc \
388 ${datadir}/pkgconfig/xenfsimage.pc \
389 "
390
391FILES:${PN}-fsimage = " \
392 ${libdir}/fs/**/[a-z]*fsimage.so \
393 ${libdir}/xenfsimage/**/fsimage.so \
394 "
395
396FILES:${PN}-init-xenstore-dom = "${libdir}/xen/bin/init-xenstore-domain"
397
398FILES:${PN} = "\
399 ${sysconfdir}/xen/auto \
400 ${sysconfdir}/xen/cpupool \
401 ${localstatedir}/xen/dump \
402 "
403
404FILES:${PN}-console = "\
405 ${libdir}/xen/bin/xenconsole \
406 ${sbindir}/xenconsoled \
407 "
408
409FILES:${PN}-cpuid = "\
410 ${bindir}/xen-cpuid \
411 "
412
413FILES:${PN}-devd = "\
414 ${sysconfdir}/init.d/xendriverdomain \
415 ${systemd_unitdir}/system/xendriverdomain.service \
416 "
417
418FILES:${PN}-flask = "\
419 /boot/xenpolicy-* \
420 "
421
422FILES:${PN}-flask-tools = "\
423 ${sbindir}/flask-get-bool \
424 ${sbindir}/flask-getenforce \
425 ${sbindir}/flask-label-pci \
426 ${sbindir}/flask-loadpolicy \
427 ${sbindir}/flask-set-bool \
428 ${sbindir}/flask-setenforce \
429 "
430
431FILES:${PN}-gdbsx = "\
432 ${sbindir}/gdbsx \
433 "
434
435INSANE_SKIP:${PN}-hvmloader = "arch"
436FILES:${PN}-hvmloader = "\
437 ${libdir}/xen/boot/hvmloader \
438 "
439
440FILES:${PN}-kdd = "\
441 ${sbindir}/kdd \
442 ${sbindir}/xen-kdd \
443 "
444
445FILES:${PN}-livepatch += " \
446 ${sbindir}/xen-livepatch \
447 "
448
449FILES:${PN}-misc = "\
450 ${bindir}/xen-detect \
451 ${libdir}/xen/bin/depriv-fd-checker \
452 ${sbindir}/gtracestat \
453 ${sbindir}/gtraceview \
454 ${sbindir}/xen-bugtool \
455 ${sbindir}/xenperf \
456 ${sbindir}/xenpm \
457 ${sbindir}/xsview \
458 ${sbindir}/xen-diag \
459 ${sbindir}/xen-tmem-list-parse \
460 ${sbindir}/xen-python-path \
461 ${sbindir}/xen-ringwatch \
462 ${sbindir}/xen-hptool \
463 ${sbindir}/xen-hvmcrash \
464 ${sbindir}/xen-hvmctx \
465 ${sbindir}/xenlockprof \
466 ${sbindir}/xen-lowmemd \
467 ${sbindir}/xen-mfndump \
468 ${libdir}/xen/bin/verify-stream-v2 \
469 ${libdir}/xen/bin/convert-legacy-stream \
470 "
471
472FILES:${PN}-pygrub = "\
473 ${bindir}/pygrub \
474 ${libdir}/xen/bin/pygrub \
475 "
476
477# Depending on the version of Xen libdir or nonarch libdir is used
478FILES:${PN}-python = "\
479 ${libdir}/${PYTHON_DIR} \
480 ${nonarch_libdir}/${PYTHON_DIR} \
481 "
482
483FILES:${PN}-remus = "\
484 ${sysconfdir}/xen/scripts/remus-netbuf-setup \
485 "
486
487FILES:${PN}-scripts-network = " \
488 ${sysconfdir}/xen/scripts/colo-proxy-setup \
489 ${sysconfdir}/xen/scripts/network-bridge \
490 ${sysconfdir}/xen/scripts/network-nat \
491 ${sysconfdir}/xen/scripts/network-route \
492 ${sysconfdir}/xen/scripts/qemu-ifup \
493 ${sysconfdir}/xen/scripts/vif2 \
494 ${sysconfdir}/xen/scripts/vif-bridge \
495 ${sysconfdir}/xen/scripts/vif-common.sh \
496 ${sysconfdir}/xen/scripts/vif-nat \
497 ${sysconfdir}/xen/scripts/vif-openvswitch \
498 ${sysconfdir}/xen/scripts/vif-route \
499 ${sysconfdir}/xen/scripts/vif-setup \
500 "
501
502FILES:${PN}-scripts-block = " \
503 ${sysconfdir}/xen/scripts/blktap \
504 ${sysconfdir}/xen/scripts/block \
505 ${sysconfdir}/xen/scripts/block-common.sh \
506 ${sysconfdir}/xen/scripts/block-dummy \
507 ${sysconfdir}/xen/scripts/block-enbd \
508 ${sysconfdir}/xen/scripts/block-iscsi \
509 ${sysconfdir}/xen/scripts/block-nbd \
510 ${sysconfdir}/xen/scripts/block-drbd-probe \
511 ${sysconfdir}/xen/scripts/block-tap \
512 ${sysconfdir}/xen/scripts/vscsi \
513 "
514
515FILES:${PN}-scripts-common = " \
516 ${sysconfdir}/xen/scripts/external-device-migrate \
517 ${sysconfdir}/xen/scripts/hotplugpath.sh \
518 ${sysconfdir}/xen/scripts/locking.sh \
519 ${sysconfdir}/xen/scripts/logging.sh \
520 ${sysconfdir}/xen/scripts/xen-hotplug-cleanup \
521 ${sysconfdir}/xen/scripts/xen-hotplug-common.sh \
522 ${sysconfdir}/xen/scripts/xen-network-common.sh \
523 ${sysconfdir}/xen/scripts/xen-script-common.sh \
524 "
525
526INSANE_SKIP:${PN}-shim = "arch"
527FILES:${PN}-shim = " \
528 ${libdir}/xen/boot/xen-shim \
529 "
530
531FILES:${PN}-ucode = "\
532 ${sbindir}/xen-ucode \
533 "
534
535FILES:${PN}-vchan = "\
536 ${bindir}/vchan-socket-proxy \
537 "
538
539FILES:${PN}-volatiles = "\
540 ${sysconfdir}/default/volatiles/99_xen \
541 ${sysconfdir}/tmpfiles.d/xen.conf \
542 "
543
544FILES:${PN}-xcutils = "\
545 ${libdir}/xen/bin/lsevtchn \
546 ${libdir}/xen/bin/readnotes \
547 ${libdir}/xen/bin/xc_restore \
548 ${libdir}/xen/bin/xc_save \
549 "
550
551FILES:${PN}-xencov = "\
552 ${sbindir}/xencov \
553 "
554
555FILES:${PN}-xend-examples = "\
556 ${sysconfdir}/xen/xend-config.sxp \
557 ${sysconfdir}/xen/xend-pci-permissive.sxp \
558 ${sysconfdir}/xen/xend-pci-quirks.sxp \
559 "
560
561FILES:${PN}-xenhypfs = "\
562 ${sbindir}/xenhypfs \
563 "
564
565FILES:${PN}-xenpaging = "\
566 ${libdir}/xen/bin/xenpaging \
567 ${localstatedir}/lib/xen/xenpaging \
568 "
569
570FILES:${PN}-xenpmd = "\
571 ${sbindir}/xenpmd \
572 "
573
574FILES:${PN}-xenstat = "\
575 ${sbindir}/xentop \
576 "
577
578FILES:${PN}-xenstore = "\
579 ${bindir}/xenstore \
580 ${bindir}/xenstore-chmod \
581 ${bindir}/xenstore-control \
582 ${bindir}/xenstore-exists \
583 ${bindir}/xenstore-list \
584 ${bindir}/xenstore-ls \
585 ${bindir}/xenstore-read \
586 ${bindir}/xenstore-rm \
587 ${bindir}/xenstore-watch \
588 ${bindir}/xenstore-write \
589 "
590
591FILES:${PN}-xenstored = "\
592 ${sbindir}/xenstored \
593 ${localstatedir}/lib/xenstored \
594 "
595
596FILES:${PN}-xentrace = "\
597 ${bindir}/xentrace \
598 ${bindir}/xentrace_setsize \
599 ${libdir}/xen/bin/xenctx \
600 ${bindir}/xenalyze \
601 ${sbindir}/xentrace \
602 ${sbindir}/xentrace_setsize \
603 ${sbindir}/xentrace_setmask \
604 "
605
606FILES:${PN}-xen-watchdog = "\
607 ${sbindir}/xenwatchdogd \
608 ${sysconfdir}/init.d/xen-watchdog \
609 ${systemd_unitdir}/system/xen-watchdog.service \
610 "
611
612FILES:${PN}-xl = "\
613 ${sysconfdir}/bash_completion.d/xl.sh \
614 ${sysconfdir}/bash_completion.d/xl \
615 ${sysconfdir}/xen/xl.conf \
616 ${libdir}/xen/bin/libxl-save-helper \
617 ${sbindir}/xl \
618 ${libdir}/xen/bin/xen-init-dom0 \
619 ${libdir}/xen/bin/init-dom0less \
620 "
621
622FILES:${PN}-xl-examples = "\
623 ${sysconfdir}/xen/xlexample.hvm \
624 ${sysconfdir}/xen/xlexample.pvlinux \
625 ${sysconfdir}/xen/xlexample.pvhlinux \
626 "
627
628FILES:${PN}-xm-examples = "\
629 ${sysconfdir}/xen/xmexample1 \
630 ${sysconfdir}/xen/xmexample2 \
631 ${sysconfdir}/xen/xmexample3 \
632 ${sysconfdir}/xen/xmexample.hvm \
633 ${sysconfdir}/xen/xmexample.hvm-stubdom \
634 ${sysconfdir}/xen/xmexample.nbd \
635 ${sysconfdir}/xen/xmexample.pv-grub \
636 ${sysconfdir}/xen/xmexample.vti \
637 "
638
639FILES:${PN}-xenmon = "\
640 ${sbindir}/xenbaked \
641 ${sbindir}/xenmon.py \
642 ${sbindir}/xenmon \
643 "
644
645FILES:${PN}-xm = "\
646 ${sysconfdir}/xen/xm-config.xml \
647 ${datadir}/xen/create.dtd \
648 ${sbindir}/xm \
649 "
650
651FILES:${PN}-xencommons += "\
652 ${nonarch_libdir}/modules-load.d/xen.conf \
653 ${sysconfdir}/default/xencommons \
654 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '${sysconfdir}/init.d/xencommons', d)} \
655 ${sysconfdir}/xen/scripts/launch-xenstore \
656 ${systemd_unitdir}/system/proc-xen.mount \
657 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service', '', d)} \
658 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xenconsoled.service', '', d)} \
659 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xen-init-dom0.service', '', d)} \
660 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xenstored.service', '', d)} \
661 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/var-lib-xenstored.mount', '', d)} \
662 ${localstatedir} \
663 "
664
665FILES:${PN}-xend += " \
666 ${sysconfdir}/init.d/xend \
667 ${sbindir}/xend \
668 "
669
670FILES:${PN}-xendomains += "\
671 ${libdir}/xen/bin/xendomains \
672 ${sysconfdir}/default/xendomains \
673 ${sysconfdir}/init.d/xendomains \
674 ${sysconfdir}/sysconfig/xendomains \
675 ${systemd_unitdir}/system/xendomains.service \
676 "
677FILES:${PN}-xen-access += "\
678 ${sbindir}/xen-access \
679 "
680
681FILES:${PN}-xen-memshare += "\
682 ${sbindir}/xen-memshare \
683 "
684
685# memshare is only built for x86, so allow empty package for other archs
686ALLOW_EMPTY:${PN}-xen-memshare = "1"
687
688FILES:${PN}-test += "\
689 ${libdir}/xen/bin/test-xenstore \
690 ${libdir}/xen/bin/test-resource \
691 ${libdir}/xen/bin/test-cpu-policy \
692 ${libdir}/xen/bin/test-tsx \
693 ${libdir}/xen/bin/test-paging-mempool \
694 "
695
696# test-xenstore and test-resource currently only exist in 4.16
697# test-cpu-policy and test-tsx only exist in 4.16 for x86
698ALLOW_EMPTY:${PN}-test = "1"
699
700FILES:${PN}-xen-mceinj +="\
701 ${sbindir}/xen-mceinj \
702 "
703
704# xen-mceinj is only built for x86 4.16, so allow empty package
705ALLOW_EMPTY:${PN}-xen-mceinj = "1"
706
707FILES:${PN}-xen-vmtrace +="\
708 ${sbindir}/xen-vmtrace \
709 "
710
711# xen-vmtrace is only built for x86 4.16, so allow empty package
712ALLOW_EMPTY:${PN}-xen-vmtrace = "1"
713
714INSANE_SKIP:${PN} = "already-stripped"
715
716# configure init.d scripts
717INITSCRIPT_PACKAGES = "${PN}-xend ${PN}-xen-watchdog ${PN}-xendomains ${PN}-devd"
718INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '${PN}-xencommons', d)}"
719INITSCRIPT_NAME:${PN}-xencommons = "xencommons"
720INITSCRIPT_PARAMS:${PN}-xencommons = "defaults 80"
721INITSCRIPT_NAME:${PN}-xen-watchdog = "xen-watchdog"
722INITSCRIPT_PARAMS:${PN}-xen-watchdog = "defaults 81"
723INITSCRIPT_NAME:${PN}-xend = "xend"
724INITSCRIPT_PARAMS:${PN}-xend = "defaults 82"
725INITSCRIPT_NAME:${PN}-xendomains = "xendomains"
726INITSCRIPT_PARAMS:${PN}-xendomains = "defaults 83"
727INITSCRIPT_NAME:${PN}-devd = "xendriverdomain"
728INITSCRIPT_PARAMS:${PN}-devd = "defaults 82"
729
730# systemd packages
731SYSTEMD_PACKAGES = "${PN}-xen-watchdog ${PN}-xencommons ${PN}-xendomains ${PN}-devd"
732SYSTEMD_SERVICE:${PN}-devd = "xendriverdomain.service"
733SYSTEMD_SERVICE:${PN}-xen-watchdog = "xen-watchdog.service"
734SYSTEMD_SERVICE:${PN}-xencommons = " \
735 proc-xen.mount \
736 xen-qemu-dom0-disk-backend.service \
737 xenconsoled.service \
738 xen-init-dom0.service \
739 xenstored.service \
740 "
741SYSTEMD_SERVICE:${PN}-xendomains = "xendomains.service"
742
743QEMU_ARCH = "i386"
744QEMU_ARCH:aarch64 = "aarch64"
745
746EXTRA_OECONF += " \
747 --with-systemd=${systemd_unitdir}/system \
748 --with-initddir=${INIT_D_DIR} \
749 --with-sysconfig-leaf-dir=default \
750 --with-system-qemu=${bindir}/qemu-system-${QEMU_ARCH} \
751 "
752
753do_configure() {
754 do_configure_common
755}
756
757do_compile() {
758 cd ${S}
759 oe_runmake tools PYTHON="${PYTHON}" \
760 EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}"
761}
762
763do_install() {
764 cd ${S}
765 oe_runmake DESTDIR="${D}" install-tools
766
767 # Remove unported python 2 scripts -- see the separate xen-python2 recipe
768 rm -f ${D}${bindir}/xentrace_format \
769 ${D}${bindir}/xencons \
770 ${D}${bindir}/xencov_split \
771 ${D}${libdir}/xen/bin/xenpvnetboot
772
773 # remove installed volatiles
774 rm -rf ${D}${base_prefix}/run \
775 ${D}${localstatedir}/run \
776 ${D}${localstatedir}/lock \
777 ${D}${localstatedir}/log \
778 ${D}${localstatedir}/volatile \
779 ${D}${localstatedir}/lib/xen
780
781 VOLATILE_DIRS=" \
782 ${base_prefix}/run/xenstored \
783 ${base_prefix}/run/xend \
784 ${base_prefix}/run/xend/boot \
785 ${base_prefix}/run/xen \
786 ${localstatedir}/log/xen \
787 ${localstatedir}/lock/xen \
788 ${localstatedir}/lock/subsys \
789 ${localstatedir}/lib/xen \
790 "
791
792 # install volatiles using populate_volatiles mechanism
793 install -d ${D}${sysconfdir}/default/volatiles
794 for i in $VOLATILE_DIRS; do
795 echo "d root root 0755 $i none" >> ${D}${sysconfdir}/default/volatiles/99_xen
796 done
797
798 # workaround for xendomains script which searchs sysconfig if directory exists
799 install -d ${D}${sysconfdir}/sysconfig
800 ln -sf ${sysconfdir}/default/xendomains ${D}${sysconfdir}/sysconfig/xendomains
801
802 # systemd
803 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
804 # install volatiles using systemd tmpfiles.d
805 install -d ${D}${sysconfdir}/tmpfiles.d
806 for i in $VOLATILE_DIRS; do
807 echo "d $i 0755 root root - -" >> ${D}${sysconfdir}/tmpfiles.d/xen.conf
808 done
809 fi
810
811 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
812 sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
813 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
814 fi
815
816 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
817 rm -f ${D}/${sysconfdir}/init.d/xencommons
818 else
819 # fixup default path to qemu-system-i386
820 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons
821
822 # remove the uncondiontally installed systemd service files
823 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
824 rm -f ${D}/${systemd_unitdir}/system/xenconsoled.service
825 rm -f ${D}/${systemd_unitdir}/system/xen-init-dom0.service
826 rm -f ${D}/${systemd_unitdir}/system/xenstored.service
827 rm -f ${D}/${systemd_unitdir}/system/var-lib-xenstored.mount
828 fi
829}
830
831pkg_postinst:${PN}-volatiles() {
832 if [ -z "$D" ]; then
833 if command -v systemd-tmpfiles >/dev/null; then
834 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/xen.conf
835 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
836 ${sysconfdir}/init.d/populate-volatile.sh update
837 fi
838 fi
839}
840
841do_deploy() {
842 XEN_FULLVERSION=$(oe_runmake -C ${S}/xen xenversion --no-print-directory)
843 FLASK_POLICY_FILE="xenpolicy-${XEN_FULLVERSION}"
844
845 install -d ${DEPLOYDIR}
846
847 # Install the flask policy in the deploy directory if it exists
848 if [ -f ${D}/boot/${FLASK_POLICY_FILE} ]; then
849 install -m 0644 ${D}/boot/${FLASK_POLICY_FILE} ${DEPLOYDIR}
850 ln -sf ${FLASK_POLICY_FILE} ${DEPLOYDIR}/xenpolicy-${MACHINE}
851 fi
852}
853# Scheduling the do_deploy task:
854# - deploy copies files from ${D} that are written during do_install so must run
855# after that task
856# - the tools binaries are included in the image filesystem, so we must ensure
857# that the binaries deployed match what is staged in the sysroot:
858# so do_deploy must run after do_populate_sysroot
859# - add the task before do_build to ensure that deployment has completed when
860# the recipe build done stamp is written
861addtask deploy after do_install do_populate_sysroot before do_build
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_%.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_%.bbappend
new file mode 100644
index 00000000..a9675ce3
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_%.bbappend
@@ -0,0 +1,27 @@
1require xen-xilinx.inc
2
3# Only include the sysvinit scripts if sysvinit is enabled.
4do_install:append () {
5 if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then
6 sed -i -e '1c#!/usr/bin/env python3' ${D}/usr/lib/xen/bin/pygrub
7 fi
8
9 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit', '', d)}" != 'sysvinit' ]; then
10 rm -f ${D}/etc/init.d/xendomains
11 rm -f ${D}/etc/init.d/xencommons
12 rm -f ${D}/etc/init.d/xendriverdomain
13 rm -f ${D}/etc/init.d/xen-watchdog
14 fi
15}
16
17# If we're in a hybrid configuration, we want to stop the system from
18# running any Xen sysvinit scripts
19# This has a side effect of, on a hybrid system, if the init manager is
20# sysvinit, the user will need to manually enable Xen.
21INHIBIT_UPDATERCD_BBCLASS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '', d)}"
22
23FILES:${PN} += " \
24 ${libdir}/xen/bin/init-dom0less \
25 ${libdir}/xen/bin/get_overlay \
26 ${libdir}/xen/bin/get_overlay.sh \
27 "
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb
new file mode 100644
index 00000000..acc9184b
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb
@@ -0,0 +1,18 @@
1# xen 4.17.0 release sha
2SRCREV ?= "11560248ffda3f00f20bbdf3ae088af474f7f2a3"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.17"
6XEN_BRANCH ?= "stable-${XEN_REL}"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \
11 "
12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14
15S = "${WORKDIR}/git"
16
17require xen.inc
18require xen-tools.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx.inc
new file mode 100644
index 00000000..d7810b27
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx.inc
@@ -0,0 +1,7 @@
1SRCREV = "38eebc6e5c6f7aa9180672a56d33217bf1ef1ca6"
2XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https"
3XEN_BRANCH = "xlnx_rebase_4.17"
4
5PV .= "-xilinx+git${SRCPV}"
6
7DEFAULT_PREFERENCE = "+1"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen.inc
new file mode 100644
index 00000000..5937763a
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen.inc
@@ -0,0 +1,233 @@
1HOMEPAGE = "http://xen.org"
2LICENSE = "GPL-2.0-only"
3SECTION = "console/tools"
4
5inherit autotools-brokensep pkgconfig
6
7require xen-arch.inc
8
9PACKAGECONFIG ??= " \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
11 "
12
13PACKAGECONFIG[lzo] = ",,lzo"
14PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
15PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
16PACKAGECONFIG[externalblktap] = ",,,"
17
18DEPENDS = " \
19 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'dev86-native', '', d)} \
20 bison-native \
21 flex-native \
22 file-native \
23 gettext-native \
24 acpica-native \
25 ncurses-native \
26 util-linux-native \
27 xz-native \
28 bridge-utils \
29 curl \
30 dtc \
31 gettext \
32 glib-2.0 \
33 gnutls \
34 iproute2 \
35 libnl \
36 ncurses \
37 openssl \
38 pciutils \
39 pixman \
40 procps \
41 python3 \
42 libaio \
43 util-linux \
44 xz \
45 yajl \
46 zlib \
47 gnu-efi \
48 "
49
50#### REQUIRED ENVIRONMENT VARIABLES ####
51export BUILD_SYS
52export HOST_SYS
53export STAGING_INCDIR
54export STAGING_LIBDIR
55
56# specify xen hypervisor to build/target
57export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
58export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
59
60python () {
61 if d.getVar('XEN_TARGET_ARCH') == 'INVALID':
62 raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH'))
63}
64
65# Yocto appends ${PN} to libexecdir by default and Xen appends 'xen' as well
66# the result is a nested xen/xen/ so let's avoid that by shunning Yocto's
67# extra ${PN} appended.
68libexecdir = "${libdir}"
69
70# hardcoded as Linux, as the only compatible hosts are Linux.
71export XEN_OS = "Linux"
72
73# this is used for the header (#!${bindir}/python) of the install python scripts
74export PYTHONPATH="${bindir}/env python3"
75export ac_cv_path_PYTHONPATH="${bindir}/env python3"
76export DISTUTILS_BUILD_ARGS
77export DISTUTILS_INSTALL_ARGS
78
79# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
80export HOSTCC="${BUILD_CC}"
81export HOSTCXX="${BUILD_CXX}"
82
83# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
84export CROSS_COMPILE="${TARGET_PREFIX}"
85
86# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
87export LDFLAGS=""
88
89# No additional C flags for the main hypervisor build
90EXTRA_CFLAGS_XEN_CORE ?= ""
91# Add prefix maps to support buildpaths QA test and reproducibility
92DEBUG_PREFIX_MAP:append = " \
93 -ffile-prefix-map=${S}=${PN}-source \
94 -fdebug-prefix-map=${WORKDIR}=${PN} \
95 "
96
97# - The Xen tools build for x86 systems with HVM-mode enabled includes hvmloader
98# which fails to build when "-m64" is included in flags set via the
99# EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that.
100TUNE_CCARGS:x86-64=""
101
102# - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the
103# optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared
104# within the build because compilation fails with the compiler stating
105# "_FORTIFY_SOURCE requires compiling with optimization (-O)".
106# - Move HOST_CC_ARCH into the Xen-provided CFLAGS variables and keep
107# TOOLCHAIN_OPTIONS set via CC: this enables hvmloader to be built correctly.
108# It must not be compiled with SSE compiler options enabled and the Xen build
109# explicitly clears CFLAGS to ensure that, so such options must not be passed
110# in via the tool variable. hvmloader is required to run HVM-mode guest VMs.
111CC="${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
112EXTRA_CFLAGS_XEN_TOOLS="${HOST_CC_ARCH} ${CFLAGS}"
113# 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed
114# in CC to ensure that configure can compile binaries for the right arch.
115CC:arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
116
117# There are no Xen-provided variables for C++, so append to the tool variables:
118CPP:append = " ${CPPFLAGS}"
119CXX:append = " ${CXXFLAGS}"
120
121EXTRA_OECONF += " \
122 --exec-prefix=${prefix} \
123 --prefix=${prefix} \
124 --host=${HOST_SYS} \
125 --disable-stubdom \
126 --disable-ioemu-stubdom \
127 --disable-pv-grub \
128 --disable-xenstore-stubdom \
129 --disable-rombios \
130 --disable-ocamltools \
131 --disable-qemu-traditional \
132 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
133 '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
134 '--disable-pvshim --disable-seabios', d)} \
135 "
136
137EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.8a.bin"
138EXTRA_OEMAKE += "CIRRUSVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.8a.cirrus.bin"
139EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin"
140EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom"
141
142# prevent the Xen build scripts from fetching things during the build
143# all dependencies should be reflected in the Yocto recipe
144EXTRA_OEMAKE += "WGET=/bin/false"
145EXTRA_OEMAKE += "GIT=/bin/false"
146
147# Improve build reproducibility: provide values for build variables.
148def get_build_time_vars(d):
149 source_date_epoch = d.getVar('SOURCE_DATE_EPOCH')
150 if source_date_epoch is not None:
151 import datetime
152 utc_datetime = datetime.datetime.utcfromtimestamp(float(source_date_epoch))
153 return " XEN_BUILD_DATE=" + utc_datetime.strftime("%Y-%m-%d") + \
154 " XEN_BUILD_TIME=" + utc_datetime.strftime("%H:%M:%S")
155 return ""
156EXTRA_OEMAKE += "${@['', 'XEN_WHOAMI=${PF} XEN_DOMAIN=${DISTRO} XEN_BUILD_HOST=${PN}-buildhost'] \
157 [d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1']}${@get_build_time_vars(d)}"
158
159# Improve build reproducibility: compiler flags to remove filesystem differences.
160CC_REPRODUCIBLE_OPTIONS = "${@['', '-gno-record-gcc-switches'] \
161 [d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1']}"
162
163# check for XSM in package config to allow XSM_ENABLE to be set
164python () {
165 pkgconfig = d.getVar('PACKAGECONFIG')
166 if ('xsm') in pkgconfig.split():
167 d.setVar('XSM_ENABLED', '1')
168 else:
169 d.setVar('XSM_ENABLED', '0')
170}
171
172do_post_patch() {
173 # fixup AS/CC/CCP/etc variable within StdGNU.mk
174 for i in LD CC CPP CXX; do
175 sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk
176 done
177 # fixup environment passing in some makefiles
178 sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile
179
180 # libsystemd-daemon -> libsystemd for newer systemd versions
181 sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure
182
183 # Improve build reproducibility: disable insertion of the build timestamp
184 # into the x86 EFI hypervisor binary.
185 # binutils should allow a user-supplied timestamp or use SOURCE_DATE_EPOCH
186 # for PE but currently does not.
187 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ] ; then
188 sed '/^EFI_LDFLAGS = /{a EFI_LDFLAGS += --no-insert-timestamp
189}' -i "${S}/xen/arch/x86/Makefile"
190 fi
191}
192
193addtask post_patch after do_patch before do_configure
194
195# Allow all hypervisor settings in a defconfig
196EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
197# Build release versions always. Technically since we track release
198# tarballs this always happens but occasionally people pull in patches
199# from staging that reverts this
200EXTRA_OEMAKE += "debug=n"
201
202do_configure_common() {
203 cd ${S}
204
205 #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually
206 if [ "${XSM_ENABLED}" = "1" ]; then
207 echo "XSM_ENABLE := y" > ${S}/.config
208 fi
209
210 if [ -f "${WORKDIR}/defconfig" ]; then
211 cp "${WORKDIR}/defconfig" "${S}/xen/.config" || \
212 bbfatal "Unable to copy defconfig to .config"
213 fi
214
215 unset CFLAGS
216
217 # do configure
218 oe_runconf EXTRA_CFLAGS_XEN_CORE="${EXTRA_CFLAGS_XEN_CORE}" \
219 EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}" \
220 PYTHON="${PYTHON}"
221}
222
223do_compile:prepend() {
224 # workaround for build bug when CFLAGS is exported
225 # https://www.mail-archive.com/xen-devel@lists.xen.org/msg67822.html
226 unset CFLAGS
227}
228
229do_install:prepend() {
230 # CFLAGS is used to set PY_CFLAGS which affects the pygrub install
231 # so also need to unset CFLAGS here:
232 unset CFLAGS
233}
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_%.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen_%.bbappend
new file mode 100644
index 00000000..f0340f1c
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_%.bbappend
@@ -0,0 +1,20 @@
1require xen-xilinx.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
4
5RDEPENDS:${PN}-efi += "bash python3"
6
7do_deploy:append() {
8 # Mimic older behavior for compatibility
9 if [ -f ${DEPLOYDIR}/xen-${MACHINE} ]; then
10 ln -s xen-${MACHINE} ${DEPLOYDIR}/xen
11 fi
12
13 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.gz ]; then
14 ln -s xen-${MACHINE}.gz ${DEPLOYDIR}/xen.gz
15 fi
16
17 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.efi ]; then
18 ln -s xen-${MACHINE}.efi ${DEPLOYDIR}/xen.efi
19 fi
20}
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb
new file mode 100644
index 00000000..41cf2a15
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb
@@ -0,0 +1,19 @@
1# xen 4.17.0 release sha
2SRCREV ?= "11560248ffda3f00f20bbdf3ae088af474f7f2a3"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.17"
6XEN_BRANCH ?= "stable-${XEN_REL}"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
11 file://xen-flask-race-fix.patch \
12 "
13
14LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
15
16S = "${WORKDIR}/git"
17
18require xen.inc
19require xen-hypervisor.inc