summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/xen-hypervisor.inc
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2020-02-25 16:15:54 -0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-02-27 16:59:23 -0500
commit545461ba2f97f065791e3d4ed22342eba2836d48 (patch)
tree68917fa8fed4b544b84e32d70470e5c47600f1a2 /recipes-extended/xen/xen-hypervisor.inc
parente12b76773a874ea4454411aea564a3e9008c931b (diff)
downloadmeta-virtualization-545461ba2f97f065791e3d4ed22342eba2836d48.tar.gz
xen: separate recipes for hypervisor and tools; switch to git as source
This change changes the names of many packages produced: the xen-tools recipe now builds packages previous built by the xen recipe, so the package prefix changes from "xen-" to "xen-tools-". A temporary bbappend is provided for qemu to ease the transition. Multiple motivations for recipe separation: - improves efficiency of incremental build and development - supports building the hypervisor and tools with different toolchains and for different architectures Switch to using a git recipe on the Xen stable branch: - enables easier tracking of critical XSA security updates applied upstream by just advancing SRCREV along the branch Revision has been set to the tip of the stable-4.12 branch, which has the one XSA-312 patch applied on top of RELEASE-4.12.2. The recipe refactor externalizes the block tap components, to enable optional building of blktap in a separate recipe outside xen-tools, needed by OpenXT. xenstored is made a virtual package to support switching between alternative implementations (several exist). Update xen-image-minimal to install the xen-tools package, which replaces what was previously xen-base. Determine the flask policy filename, which is Xen-version specific, using the same method as the Xen build system. qemu: update PACKAGECONFIG[xen] for xen package renaming: allows builds to continue correctly in the meantime while openembedded core and poky are updated. OpenXT ticket reference: OXT-1694 Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/xen/xen-hypervisor.inc')
-rw-r--r--recipes-extended/xen/xen-hypervisor.inc94
1 files changed, 94 insertions, 0 deletions
diff --git a/recipes-extended/xen/xen-hypervisor.inc b/recipes-extended/xen/xen-hypervisor.inc
new file mode 100644
index 00000000..c0df1580
--- /dev/null
+++ b/recipes-extended/xen/xen-hypervisor.inc
@@ -0,0 +1,94 @@
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
9inherit deploy
10
11PACKAGES = " \
12 ${PN} \
13 ${PN}-dbg \
14 ${PN}-efi \
15 "
16
17FILES_${PN} = " \
18 /boot/xen-* \
19 /boot/xen \
20 /boot/xen-*.gz \
21 /boot/xen.gz \
22 /boot/xen-syms-* \
23 "
24
25FILES_${PN}-dbg += "${libdir}/debug/*"
26
27FILES_${PN}-efi = " \
28 /boot/xen.efi \
29 ${exec_prefix}/lib64/efi/xen* \
30 "
31
32do_configure() {
33 do_configure_common
34}
35
36do_compile() {
37 oe_runmake xen
38}
39
40do_install() {
41 oe_runmake DESTDIR="${D}" install-xen
42}
43
44do_deploy() {
45 install -d ${DEPLOYDIR}
46
47 if [ -f ${D}/boot/xen ]; then
48 install -m 0644 ${D}/boot/xen ${DEPLOYDIR}/xen-${MACHINE}
49 fi
50
51 if [ -f ${D}/boot/xen.gz ]; then
52 install -m 0644 ${D}/boot/xen.gz ${DEPLOYDIR}/xen-${MACHINE}.gz
53 fi
54
55 if [ -f ${D}/usr/lib64/efi/xen.efi ]; then
56 install -m 0644 ${D}/usr/lib64/efi/xen.efi ${DEPLOYDIR}/xen-${MACHINE}.efi
57 fi
58}
59
60addtask deploy after do_populate_sysroot
61
62# Enable use of menuconfig directly from bitbake and also within the devshell
63OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
64HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
65HOSTLDFLAGS = "${BUILD_LDFLAGS}"
66TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
67do_devshell[depends] += "ncurses-native:do_populate_sysroot"
68
69KCONFIG_CONFIG_COMMAND ??= "menuconfig"
70python do_menuconfig() {
71 import shutil
72
73 try:
74 mtime = os.path.getmtime("xen/.config")
75 shutil.copy("xen/.config", "xen/.config.orig")
76 except OSError:
77 mtime = 0
78
79 oe_terminal("${SHELL} -c \"cd xen; XEN_CONFIG_EXPERT=y make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
80 d.getVar('PN') + ' Configuration', d)
81
82 try:
83 newmtime = os.path.getmtime("xen/.config")
84 except OSError:
85 newmtime = 0
86
87 if newmtime > mtime:
88 bb.note("Configuration changed, recompile will be forced")
89 bb.build.write_taint('do_compile', d)
90}
91do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
92do_menuconfig[nostamp] = "1"
93do_menuconfig[dirs] = "${B}"
94addtask menuconfig after do_configure