blob: 8dfe589af61274a5607595e50af34f8927b31f62 [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001DESCRIPTION = "Xen hypervisor"
2HOMEPAGE = "http://xen.org"
3LICENSE = "GPLv2"
4SECTION = "console/tools"
5
Patrick Williamse69d2352017-02-23 20:56:04 -06006LIC_FILES_CHKSUM = "file://COPYING;md5=bbb4b1bdc2c3b6743da3c39d03249095"
Patrick Williamsd849ec72016-08-17 14:59:38 -05007
8COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
9
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010inherit autotools-brokensep setuptools update-rc.d systemd deploy
Patrick Williamsd849ec72016-08-17 14:59:38 -050011
12require xen-arch.inc
13
14PACKAGECONFIG ??= " \
15 sdl \
16 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
17 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'hvm', '', d)} \
18 "
19
20FLASK_POLICY_FILE ?= "xenpolicy-${PV}"
21
22PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
23PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
24PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
Patrick Williamsd849ec72016-08-17 14:59:38 -050026
27DEPENDS = " \
28 bison-native \
29 dev86-native \
30 flex-native \
31 file-native \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032 gettext-native \
Patrick Williamsd849ec72016-08-17 14:59:38 -050033 iasl-native \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034 ncurses-native \
Patrick Williamsd849ec72016-08-17 14:59:38 -050035 util-linux-native \
36 xz-native \
37 bridge-utils \
38 curl \
39 dtc \
40 gettext \
41 glib-2.0 \
42 gnutls \
43 iproute2 \
44 libnl \
45 ncurses \
46 openssl \
47 pciutils \
48 pixman \
49 procps \
50 python \
51 libaio \
52 lzo \
53 util-linux \
54 xz \
55 yajl \
56 zlib \
Patrick Williamse69d2352017-02-23 20:56:04 -060057 gnu-efi \
Patrick Williamsd849ec72016-08-17 14:59:38 -050058 "
59
60# inherit setuptools adds python to RDEPENDS, override it
61RDEPENDS_${PN} = ""
62
63RDEPENDS_${PN}-base = "\
64 bash perl xz \
Patrick Williamsd849ec72016-08-17 14:59:38 -050065 ${PN}-console \
Patrick Williamsd849ec72016-08-17 14:59:38 -050066 ${PN}-libxenguest \
67 ${PN}-libxenlight \
68 ${PN}-libxenvchan \
69 ${PN}-libxenctrl \
70 ${PN}-libxlutil \
Patrick Williamsd849ec72016-08-17 14:59:38 -050071 ${PN}-libxenstat \
72 ${PN}-libxenstore \
73 ${PN}-libfsimage \
74 ${PN}-fsimage \
75 ${PN}-scripts-block \
76 ${PN}-scripts-network \
77 ${PN}-xen-watchdog \
78 ${PN}-xencommons \
79 ${PN}-xendomains \
80 ${PN}-xenstore \
81 ${PN}-xenstored \
82 ${PN}-xl \
83 "
84
85RDEPENDS_${PN}-dev = ""
86
87RRECOMMENDS_${PN}-base = " \
Brad Bishop316dfdd2018-06-25 12:45:53 -040088 ${PN}-blktap \
Patrick Williamsd849ec72016-08-17 14:59:38 -050089 ${PN}-libblktap \
Brad Bishop316dfdd2018-06-25 12:45:53 -040090 ${PN}-libblktapctl \
91 ${PN}-libvhd \
Patrick Williamsd849ec72016-08-17 14:59:38 -050092 ${PN}-flask \
93 ${PN}-hvmloader \
94 ${PN}-xenpaging \
95 "
96
97RDEPENDS_${PN}-devd = " \
98 ${PN}-xl \
99 "
100
101RDEPENDS_${PN}-fsimage = " \
102 libext2fs \
103 "
104
105RDEPENDS_${PN}-misc = " \
106 perl \
107 python \
108 "
109
110RDEPENDS_${PN}-remus = " \
111 bash \
112 python \
113 "
114
115RDEPENDS_${PN}-scripts-block = "\
116 bash \
117 ${PN}-scripts-common \
118 ${PN}-volatiles \
119 "
120
121RDEPENDS_${PN}-scripts-common = "bash"
122
123RDEPENDS_${PN}-scripts-network = "\
124 bash \
125 bridge-utils \
126 ${PN}-scripts-common \
127 ${PN}-volatiles \
128 "
129
130RDEPENDS_${PN}-xencommons = "\
131 bash \
132 ${PN}-console \
133 ${PN}-xenstore \
134 ${PN}-xenstored \
135 ${PN}-xl \
136 ${PN}-scripts-common \
137 "
138
139RDEPENDS_${PN}-xendomains = "\
140 bash \
141 ${PN}-console \
142 ${PN}-scripts-block \
143 ${PN}-scripts-common \
144 ${PN}-xenstored \
145 "
146
147RDEPENDS_${PN}-xl = "libgcc"
148
149RDEPENDS_${PN}-xentrace = "python"
150
151RDEPENDS_${PN}-xen-watchdog = "bash"
152
153PACKAGES = "\
154 ${PN}-base \
155 ${PN}-blktap \
156 ${PN}-console \
Patrick Williamse69d2352017-02-23 20:56:04 -0600157 ${PN}-cpuid \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500158 ${PN}-dbg \
159 ${PN}-dev \
160 ${PN}-devd \
161 ${PN}-doc \
162 ${PN}-efi \
163 ${PN}-flask \
164 ${PN}-flask-tools \
165 ${PN}-fsimage \
166 ${PN}-gdbsx \
167 ${PN}-hvmloader \
168 ${PN}-hypervisor \
169 ${PN}-init-xenstore-dom \
170 ${PN}-kdd \
171 ${PN}-libblktap \
172 ${PN}-libblktapctl \
173 ${PN}-libblktapctl-dev \
174 ${PN}-libblktap-dev \
175 ${PN}-libfsimage \
176 ${PN}-libfsimage-dev \
177 ${PN}-libvhd \
178 ${PN}-libvhd-dev \
179 ${PN}-libxencall \
180 ${PN}-libxencall-dev \
181 ${PN}-libxenctrl \
182 ${PN}-libxenctrl-dev \
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500183 ${PN}-libxendevicemodel \
184 ${PN}-libxendevicemodel-dev \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500185 ${PN}-libxenevtchn \
186 ${PN}-libxenevtchn-dev \
187 ${PN}-libxenforeignmemory \
188 ${PN}-libxenforeignmemory-dev \
189 ${PN}-libxengnttab \
190 ${PN}-libxengnttab-dev \
191 ${PN}-libxenguest \
192 ${PN}-libxenguest-dev \
193 ${PN}-libxenlight \
194 ${PN}-libxenlight-dev \
195 ${PN}-libxenstat \
196 ${PN}-libxenstat-dev \
197 ${PN}-libxenstore \
198 ${PN}-libxenstore-dev \
Brad Bishop316dfdd2018-06-25 12:45:53 -0400199 ${PN}-libxentoolcore \
200 ${PN}-libxentoolcore-dev \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500201 ${PN}-libxentoollog \
202 ${PN}-libxentoollog-dev \
203 ${PN}-libxenvchan \
204 ${PN}-libxenvchan-dev \
205 ${PN}-libxlutil \
206 ${PN}-libxlutil-dev \
Patrick Williamse69d2352017-02-23 20:56:04 -0600207 ${PN}-livepatch \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500208 ${PN}-misc \
209 ${PN}-pygrub \
210 ${PN}-python \
211 ${PN}-qemu \
212 ${PN}-remus \
213 ${PN}-scripts-block \
214 ${PN}-scripts-common \
215 ${PN}-scripts-network \
216 ${PN}-staticdev \
217 ${PN}-volatiles \
218 ${PN}-xcutils \
219 ${PN}-xencommons \
220 ${PN}-xend \
221 ${PN}-xend-examples \
222 ${PN}-xendomains \
223 ${PN}-xenmon \
224 ${PN}-xenpaging \
225 ${PN}-xenpmd \
226 ${PN}-xenstat \
227 ${PN}-xenstore \
228 ${PN}-xenstored \
229 ${PN}-xentrace \
230 ${PN}-xen-watchdog \
231 ${PN}-xl \
232 ${PN}-xl-examples \
233 ${PN}-xm \
234 ${PN}-xm-examples \
235 "
236
237FILES_${PN}-dbg += "\
238 ${libdir}/.debug \
239 ${libdir}/debug/* \
240 ${libdir}/xen/bin/.debug \
241 ${libdir}/python2.7/site-packages/.debug \
242 ${libdir}/python2.7/site-packages/xen/lowlevel/.debug \
243 ${libdir}/fs/xfs/.debug \
244 ${libdir}/fs/ufs/.debug \
245 ${libdir}/fs/ext2fs-lib/.debug \
246 ${libdir}/fs/fat/.debug \
247 ${libdir}/fs/zfs/.debug \
248 ${libdir}/fs/reiserfs/.debug \
249 ${libdir}/fs/iso9660/.debug \
250 ${libdir}/fs/*/.debug \
251 ${sbindir}/.debug \
252 ${libdir}exec/.debug \
253 ${libdir}/xen/libexec/.debug \
254 ${bindir}/.debug \
255 ${libdir}/python2.7/dist-packages/.debug \
256 ${libdir}/python2.7/dist-packages/xen/lowlevel/.debug \
257 "
258
259FILES_${PN}-dev = "\
260 ${includedir} \
261 "
262
263FILES_${PN}-doc = "\
264 ${sysconfdir}/xen/README \
265 ${sysconfdir}/xen/README.incompatibilities \
266 ${datadir}/doc \
267 ${datadir}/man \
268 "
269
270FILES_${PN}-staticdev += "\
271 ${libdir}/libblktapctl.a \
272 ${libdir}/libxenguest.a \
273 ${libdir}/libxenlight.a \
274 ${libdir}/libxenvchan.a \
275 ${libdir}/libxenctrl.a \
276 ${libdir}/libxlutil.a \
277 ${libdir}/libvhd.a \
278 ${libdir}/libxenstat.a \
279 ${libdir}/libxenstore.a \
280 ${libdir}/libblktap.a \
281 "
282
283FILES_${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500284FILES_${PN}-libblktapctl-dev = " \
285 ${libdir}/libblktapctl.so \
286 ${datadir}/pkgconfig/xenblktapctl.pc \
287 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500288
289FILES_${PN}-libxencall = "${libdir}/libxencall.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500290FILES_${PN}-libxencall-dev = " \
291 ${libdir}/libxencall.so \
292 ${datadir}/pkgconfig/xencall.pc \
293 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500294
295FILES_${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500296FILES_${PN}-libxenctrl-dev = " \
297 ${libdir}/libxenctrl.so \
298 ${datadir}/pkgconfig/xencontrol.pc \
299 "
300
301FILES_${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
302FILES_${PN}-libxendevicemodel-dev = " \
303 ${libdir}/libxendevicemodel.so \
304 ${datadir}/pkgconfig/xendevicemodel.pc \
305 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500306
307FILES_${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500308FILES_${PN}-libxenevtchn-dev = " \
309 ${libdir}/libxenevtchn.so \
310 ${datadir}/pkgconfig/xenevtchn.pc \
311 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500312
313FILES_${PN}-libxenforeignmemory = "${libdir}/libxenforeignmemory.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500314FILES_${PN}-libxenforeignmemory-dev = " \
315 ${libdir}/libxenforeignmemory.so \
316 ${datadir}/pkgconfig/xenforeignmemory.pc \
317 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500318
319FILES_${PN}-libxengnttab = "${libdir}/libxengnttab.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500320FILES_${PN}-libxengnttab-dev = " \
321 ${libdir}/libxengnttab.so \
322 ${datadir}/pkgconfig/xengnttab.pc \
323 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500324
325FILES_${PN}-libxenguest = "${libdir}/libxenguest.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500326FILES_${PN}-libxenguest-dev = " \
327 ${libdir}/libxenguest.so \
328 ${datadir}/pkgconfig/xenguest.pc \
329 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500330
331FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*"
332FILES_${PN}-libxenlight-dev = " \
333 ${libdir}/libxenlight.so \
334 ${datadir}/pkgconfig/xenlight.pc \
335 "
336
337FILES_${PN}-libxenstat = "${libdir}/libxenstat.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500338FILES_${PN}-libxenstat-dev = " \
339 ${libdir}/libxenstat.so \
340 ${datadir}/pkgconfig/xenstat.pc \
341 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500342
343FILES_${PN}-libxenstore = "${libdir}/libxenstore.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500344FILES_${PN}-libxenstore-dev = " \
345 ${libdir}/libxenstore.so \
346 ${datadir}/pkgconfig/xenstore.pc \
347 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500348
Brad Bishop316dfdd2018-06-25 12:45:53 -0400349FILES_${PN}-libxentoolcore = "${libdir}/libxentoolcore.so.*"
350FILES_${PN}-libxentoolcore-dev = " \
351 ${libdir}/libxentoolcore.so \
352 ${datadir}/pkgconfig/xentoolcore.pc \
353 "
354
Patrick Williamsd849ec72016-08-17 14:59:38 -0500355FILES_${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500356FILES_${PN}-libxentoollog-dev = " \
357 ${libdir}/libxentoollog.so \
358 ${datadir}/pkgconfig/xentoollog.pc \
359 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500360
361FILES_${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500362FILES_${PN}-libxenvchan-dev = " \
363 ${libdir}/libxenvchan.so \
364 ${datadir}/pkgconfig/xenvchan.pc \
365 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500366
367FILES_${PN}-libxlutil = "${libdir}/libxlutil.so.*"
368FILES_${PN}-libxlutil-dev = " \
369 ${libdir}/libxlutil.so \
370 ${datadir}/pkgconfig/xlutil.pc \
371 "
372FILES_${PN}-libvhd = "${libdir}/libvhd.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500373FILES_${PN}-libvhd-dev = " \
374 ${libdir}/libvhd.so \
375 ${datadir}/pkgconfig/vhd.pc \
376 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500377
378FILES_${PN}-libblktap = "${libdir}/libblktap.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500379FILES_${PN}-libblktap-dev = " \
380 ${libdir}/libblktap.so \
381 ${datadir}/pkgconfig/blktap.pc \
382 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500383
384FILES_${PN}-libfsimage = "${libdir}/libfsimage.so.*"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500385FILES_${PN}-libfsimage-dev = " \
386 ${libdir}/libfsimage.so \
387 ${datadir}/pkgconfig/fsimage.pc \
388 "
Patrick Williamsd849ec72016-08-17 14:59:38 -0500389
390FILES_${PN}-fsimage = "${libdir}/fs/*/*fsimage.so"
391
392FILES_${PN}-hypervisor = "\
393 /boot/xen-* \
394 /boot/xen \
395 /boot/xen-*.gz \
396 /boot/xen.gz \
397 /boot/xen-syms-* \
398 "
399
400FILES_${PN}-init-xenstore-dom = "${libdir}/xen/bin/init-xenstore-domain"
401
402FILES_${PN}-efi = "\
403 ${exec_prefix}/lib64 \
404 ${exec_prefix}/lib64/xen* \
405 "
406
407FILES_${PN}-base = "\
408 ${sysconfdir}/xen/auto \
409 ${sysconfdir}/xen/cpupool \
410 ${localstatedir}/xen/dump \
411 "
412
413FILES_${PN}-blktap = "\
414 ${sbindir}/blktapctrl \
415 ${sbindir}/img2qcow \
416 ${sbindir}/lock-util \
417 ${sbindir}/qcow2raw \
418 ${sbindir}/qcow-create \
419 ${sbindir}/tap-ctl \
420 ${sbindir}/tapdisk \
421 ${sbindir}/tapdisk2 \
422 ${sbindir}/tapdisk-client \
423 ${sbindir}/tapdisk-diff \
424 ${sbindir}/tapdisk-stream \
425 ${sbindir}/td-util \
426 ${sbindir}/vhd-update \
427 ${sbindir}/vhd-util \
428 "
429
430FILES_${PN}-console = "\
431 ${libdir}/xen/bin/xenconsole \
432 ${sbindir}/xenconsoled \
433 "
434
Patrick Williamse69d2352017-02-23 20:56:04 -0600435FILES_${PN}-cpuid = "\
436 ${bindir}/xen-cpuid \
437 "
438
Patrick Williamsd849ec72016-08-17 14:59:38 -0500439FILES_${PN}-devd = "\
440 ${sysconfdir}/init.d/xendriverdomain \
441 "
442
443FILES_${PN}-flask = "\
444 /boot/${FLASK_POLICY_FILE} \
445 "
446
447FILES_${PN}-flask-tools = "\
448 ${sbindir}/flask-get-bool \
449 ${sbindir}/flask-getenforce \
450 ${sbindir}/flask-label-pci \
451 ${sbindir}/flask-loadpolicy \
452 ${sbindir}/flask-set-bool \
453 ${sbindir}/flask-setenforce \
454 "
455
456FILES_${PN}-gdbsx = "\
457 ${sbindir}/gdbsx \
458 "
459
460INSANE_SKIP_${PN}-hvmloader = "arch"
461FILES_${PN}-hvmloader = "\
462 ${libdir}/xen/boot/hvmloader \
463 "
464
465FILES_${PN}-kdd = "\
466 ${sbindir}/kdd \
467 "
468
Patrick Williamse69d2352017-02-23 20:56:04 -0600469FILES_${PN}-livepatch += " \
470 ${sbindir}/xen-livepatch \
471 "
472
Patrick Williamsd849ec72016-08-17 14:59:38 -0500473FILES_${PN}-misc = "\
474 ${bindir}/xencons \
475 ${bindir}/xencov_split \
476 ${bindir}/xen-detect \
477 ${libdir}/xen/bin/xenpvnetboot \
478 ${sbindir}/gtracestat \
479 ${sbindir}/gtraceview \
480 ${sbindir}/xen-bugtool \
481 ${sbindir}/xencov \
482 ${sbindir}/xenperf \
483 ${sbindir}/xenpm \
484 ${sbindir}/xsview \
Brad Bishop316dfdd2018-06-25 12:45:53 -0400485 ${sbindir}/xen-diag \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500486 ${sbindir}/xen-tmem-list-parse \
487 ${sbindir}/xen-python-path \
488 ${sbindir}/xen-ringwatch \
489 ${sbindir}/xen-hptool \
490 ${sbindir}/xen-hvmcrash \
491 ${sbindir}/xen-hvmctx \
492 ${sbindir}/xenlockprof \
493 ${sbindir}/xen-lowmemd \
494 ${sbindir}/xen-mfndump \
495 ${libdir}/xen/bin/verify-stream-v2 \
496 ${libdir}/xen/bin/convert-legacy-stream \
497 "
498
499FILES_${PN}-pygrub = "\
500 ${bindir}/pygrub \
501 ${libdir}/xen/bin/pygrub \
502 "
503
504FILES_${PN}-python = "\
505 ${libdir}/python2.7 \
506 "
507
508INSANE_SKIP_${PN} = "already-stripped"
509INSANE_SKIP_${PN}-qemu = "arch"
510FILES_${PN}-qemu = " \
511 ${datadir}/xen/qemu \
512 ${libdir}/xen/bin/qemu-system-i386 \
513 ${libdir}/xen/bin/qemu-system-x86_64 \
514 ${libdir}/xen/bin/qemu-img \
515 ${libdir}/xen/bin/qemu-nbd \
516 ${libdir}/xen/bin/qemu-ga \
517 ${libdir}/xen/bin/qemu-io \
518 ${libdir}/xen/bin/qemu-dm \
519 ${libdir}/xen/bin/virtfs-proxy-helper \
520 /usr/libexec/qemu-bridge-helper \
521 ${libdir}/xen/libexec/qemu-bridge-helper \
522 /usr/etc/qemu \
523 /usr/etc/qemu/target-x86_64.conf \
524 ${libdir}/xen/etc/qemu/target-x86_64.conf \
525 ${datadir}/qemu-xen \
526 ${datadir}/qemu-xen/qemu \
527 ${datadir}/qemu-xen/qemu/bamboo.dtb \
528 ${datadir}/qemu-xen/qemu/pxe-pcnet.rom \
529 ${datadir}/qemu-xen/qemu/vgabios-vmware.bin \
530 ${datadir}/qemu-xen/qemu/pxe-eepro100.rom \
531 ${datadir}/qemu-xen/qemu/pxe-e1000.rom \
532 ${datadir}/qemu-xen/qemu/openbios-ppc \
533 ${datadir}/qemu-xen/qemu/multiboot.bin \
534 ${datadir}/qemu-xen/qemu/vgabios-cirrus.bin \
535 ${datadir}/qemu-xen/qemu/bios.bin \
536 ${datadir}/qemu-xen/qemu/vgabios-stdvga.bin \
537 ${datadir}/qemu-xen/qemu/palcode-clipper \
538 ${datadir}/qemu-xen/qemu/pxe-ne2k_pci.rom \
539 ${datadir}/qemu-xen/qemu/spapr-rtas.bin \
540 ${datadir}/qemu-xen/qemu/slof.bin \
541 ${datadir}/qemu-xen/qemu/vgabios-qxl.bin \
542 ${datadir}/qemu-xen/qemu/pxe-rtl8139.rom \
543 ${datadir}/qemu-xen/qemu/openbios-sparc64 \
544 ${datadir}/qemu-xen/qemu/pxe-virtio.rom \
545 ${datadir}/qemu-xen/qemu/kvmvapic.bin \
546 ${datadir}/qemu-xen/qemu/openbios-sparc32 \
547 ${datadir}/qemu-xen/qemu/petalogix-s3adsp1800.dtb \
548 ${datadir}/qemu-xen/qemu/sgabios.bin \
549 ${datadir}/qemu-xen/qemu/linuxboot.bin \
550 ${datadir}/qemu-xen/qemu/qemu-icon.bmp \
551 ${datadir}/qemu-xen/qemu/ppc_rom.bin \
552 ${datadir}/qemu-xen/qemu/vgabios.bin \
553 ${datadir}/qemu-xen/qemu/s390-zipl.rom \
554 ${datadir}/qemu-xen/qemu/petalogix-ml605.dtb \
555 ${datadir}/qemu-xen/qemu/keymaps \
556 ${datadir}/qemu-xen/qemu/keymaps/common \
557 ${datadir}/qemu-xen/qemu/keymaps/th \
558 ${datadir}/qemu-xen/qemu/keymaps/is \
559 ${datadir}/qemu-xen/qemu/keymaps/en-gb \
560 ${datadir}/qemu-xen/qemu/keymaps/ar \
561 ${datadir}/qemu-xen/qemu/keymaps/fr-be \
562 ${datadir}/qemu-xen/qemu/keymaps/ru \
563 ${datadir}/qemu-xen/qemu/keymaps/hu \
564 ${datadir}/qemu-xen/qemu/keymaps/de-ch \
565 ${datadir}/qemu-xen/qemu/keymaps/no \
566 ${datadir}/qemu-xen/qemu/keymaps/fr \
567 ${datadir}/qemu-xen/qemu/keymaps/pl \
568 ${datadir}/qemu-xen/qemu/keymaps/fr-ca \
569 ${datadir}/qemu-xen/qemu/keymaps/de \
570 ${datadir}/qemu-xen/qemu/keymaps/fr-ch \
571 ${datadir}/qemu-xen/qemu/keymaps/bepo \
572 ${datadir}/qemu-xen/qemu/keymaps/lv \
573 ${datadir}/qemu-xen/qemu/keymaps/ja \
574 ${datadir}/qemu-xen/qemu/keymaps/da \
575 ${datadir}/qemu-xen/qemu/keymaps/lt \
576 ${datadir}/qemu-xen/qemu/keymaps/hr \
577 ${datadir}/qemu-xen/qemu/keymaps/es \
578 ${datadir}/qemu-xen/qemu/keymaps/modifiers \
579 ${datadir}/qemu-xen/qemu/keymaps/sl \
580 ${datadir}/qemu-xen/qemu/keymaps/it \
581 ${datadir}/qemu-xen/qemu/keymaps/nl \
582 ${datadir}/qemu-xen/qemu/keymaps/fo \
583 ${datadir}/qemu-xen/qemu/keymaps/mk \
584 ${datadir}/qemu-xen/qemu/keymaps/pt-br \
585 ${datadir}/qemu-xen/qemu/keymaps/tr \
586 ${datadir}/qemu-xen/qemu/keymaps/sv \
587 ${datadir}/qemu-xen/qemu/keymaps/fi \
588 ${datadir}/qemu-xen/qemu/keymaps/en-us \
589 ${datadir}/qemu-xen/qemu/keymaps/et \
590 ${datadir}/qemu-xen/qemu/keymaps/nl-be \
591 ${datadir}/qemu-xen/qemu/keymaps/pt \
592 ${bindir}/qemu-nbd-xen \
593 ${bindir}/qemu-img-xen \
594 "
595
596FILES_${PN}-remus = "\
597 ${bindir}/remus \
598 ${sysconfdir}/xen/scripts/remus-netbuf-setup \
599 "
600
601FILES_${PN}-scripts-network = " \
Patrick Williamse69d2352017-02-23 20:56:04 -0600602 ${sysconfdir}/xen/scripts/colo-proxy-setup \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500603 ${sysconfdir}/xen/scripts/network-bridge \
604 ${sysconfdir}/xen/scripts/network-nat \
605 ${sysconfdir}/xen/scripts/network-route \
606 ${sysconfdir}/xen/scripts/qemu-ifup \
607 ${sysconfdir}/xen/scripts/vif2 \
608 ${sysconfdir}/xen/scripts/vif-bridge \
609 ${sysconfdir}/xen/scripts/vif-common.sh \
610 ${sysconfdir}/xen/scripts/vif-nat \
611 ${sysconfdir}/xen/scripts/vif-openvswitch \
612 ${sysconfdir}/xen/scripts/vif-route \
613 ${sysconfdir}/xen/scripts/vif-setup \
614 "
615
616FILES_${PN}-scripts-block = " \
617 ${sysconfdir}/xen/scripts/blktap \
618 ${sysconfdir}/xen/scripts/block \
619 ${sysconfdir}/xen/scripts/block-common.sh \
Patrick Williamse69d2352017-02-23 20:56:04 -0600620 ${sysconfdir}/xen/scripts/block-dummy \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500621 ${sysconfdir}/xen/scripts/block-enbd \
622 ${sysconfdir}/xen/scripts/block-iscsi \
623 ${sysconfdir}/xen/scripts/block-nbd \
624 ${sysconfdir}/xen/scripts/block-drbd-probe \
625 ${sysconfdir}/xen/scripts/block-tap \
626 ${sysconfdir}/xen/scripts/vscsi \
627 "
628
629FILES_${PN}-scripts-common = " \
630 ${sysconfdir}/xen/scripts/external-device-migrate \
631 ${sysconfdir}/xen/scripts/hotplugpath.sh \
632 ${sysconfdir}/xen/scripts/locking.sh \
633 ${sysconfdir}/xen/scripts/logging.sh \
634 ${sysconfdir}/xen/scripts/xen-hotplug-cleanup \
635 ${sysconfdir}/xen/scripts/xen-hotplug-common.sh \
636 ${sysconfdir}/xen/scripts/xen-network-common.sh \
637 ${sysconfdir}/xen/scripts/xen-script-common.sh \
638 "
639
640FILES_${PN}-volatiles = "\
641 ${sysconfdir}/default/volatiles/99_xen \
642 ${sysconfdir}/tmpfiles.d/xen.conf \
643 "
644
645FILES_${PN}-xcutils = "\
646 ${libdir}/xen/bin/lsevtchn \
647 ${libdir}/xen/bin/readnotes \
648 ${libdir}/xen/bin/xc_restore \
649 ${libdir}/xen/bin/xc_save \
650 "
651
652FILES_${PN}-xend-examples = "\
653 ${sysconfdir}/xen/xend-config.sxp \
654 ${sysconfdir}/xen/xend-pci-permissive.sxp \
655 ${sysconfdir}/xen/xend-pci-quirks.sxp \
656 "
657
658FILES_${PN}-xenpaging = "\
659 ${libdir}/xen/bin/xenpaging \
660 ${localstatedir}/lib/xen/xenpaging \
661 "
662
663FILES_${PN}-xenpmd = "\
664 ${sbindir}/xenpmd \
665 "
666
667FILES_${PN}-xenstat = "\
668 ${sbindir}/xentop \
669 "
670
671FILES_${PN}-xenstore = "\
672 ${bindir}/xenstore \
673 ${bindir}/xenstore-chmod \
674 ${bindir}/xenstore-control \
675 ${bindir}/xenstore-exists \
676 ${bindir}/xenstore-list \
677 ${bindir}/xenstore-ls \
678 ${bindir}/xenstore-read \
679 ${bindir}/xenstore-rm \
680 ${bindir}/xenstore-watch \
681 ${bindir}/xenstore-write \
682 "
683
684FILES_${PN}-xenstored = "\
685 ${sbindir}/xenstored \
686 ${localstatedir}/lib/xenstored \
687 "
688
689FILES_${PN}-xentrace = "\
690 ${bindir}/xentrace \
691 ${bindir}/xentrace_format \
692 ${bindir}/xentrace_setsize \
693 ${libdir}/xen/bin/xenctx \
694 ${bindir}/xenalyze \
695 ${sbindir}/xentrace \
696 ${sbindir}/xentrace_setsize \
697 "
698
699FILES_${PN}-xen-watchdog = "\
700 ${sbindir}/xenwatchdogd \
701 ${sysconfdir}/init.d/xen-watchdog \
702 ${systemd_unitdir}/system/xen-watchdog.service \
703 "
704
705FILES_${PN}-xl = "\
706 ${sysconfdir}/bash_completion.d/xl.sh \
707 ${sysconfdir}/xen/xl.conf \
708 ${libdir}/xen/bin/libxl-save-helper \
709 ${sbindir}/xl \
710 ${libdir}/xen/bin/xen-init-dom0 \
711 "
712
713FILES_${PN}-xl-examples = "\
714 ${sysconfdir}/xen/xlexample.hvm \
715 ${sysconfdir}/xen/xlexample.pvlinux \
716 "
717
718FILES_${PN}-xm-examples = "\
719 ${sysconfdir}/xen/xmexample1 \
720 ${sysconfdir}/xen/xmexample2 \
721 ${sysconfdir}/xen/xmexample3 \
722 ${sysconfdir}/xen/xmexample.hvm \
723 ${sysconfdir}/xen/xmexample.hvm-stubdom \
724 ${sysconfdir}/xen/xmexample.nbd \
725 ${sysconfdir}/xen/xmexample.pv-grub \
726 ${sysconfdir}/xen/xmexample.vti \
727 "
728
729FILES_${PN}-xenmon = "\
730 ${sbindir}/xenbaked \
731 ${sbindir}/xentrace_setmask \
732 ${sbindir}/xenmon.py \
733 "
734
735FILES_${PN}-xm = "\
736 ${sysconfdir}/xen/xm-config.xml \
737 ${datadir}/xen/create.dtd \
738 ${sbindir}/xm \
739 "
740
741FILES_${PN}-xencommons += "\
742 ${sysconfdir}/default/xencommons \
743 ${sysconfdir}/init.d/xencommons \
Patrick Williamse69d2352017-02-23 20:56:04 -0600744 ${sysconfdir}/xen/scripts/launch-xenstore \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500745 ${systemd_unitdir}/modules-load.d/xen.conf \
746 ${systemd_unitdir}/system/proc-xen.mount \
747 ${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service \
748 ${systemd_unitdir}/system/xenconsoled.service \
749 ${systemd_unitdir}/system/xen-init-dom0.service \
750 ${systemd_unitdir}/system/xenstored.service \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500751 ${systemd_unitdir}/system/var-lib-xenstored.mount \
752 "
753
754FILES_${PN}-xend += " \
755 ${sysconfdir}/init.d/xend \
756 ${sbindir}/xend \
757 "
758
759FILES_${PN}-xendomains += "\
760 ${libdir}/xen/bin/xendomains \
761 ${sysconfdir}/default/xendomains \
762 ${sysconfdir}/init.d/xendomains \
763 ${sysconfdir}/sysconfig/xendomains \
764 ${systemd_unitdir}/system/xendomains.service \
765 "
766
767# configure init.d scripts
768INITSCRIPT_PACKAGES = "${PN}-xend ${PN}-xencommons ${PN}-xen-watchdog ${PN}-xendomains ${PN}-devd"
769INITSCRIPT_NAME_${PN}-xencommons = "xencommons"
770INITSCRIPT_PARAMS_${PN}-xencommons = "defaults 80"
771INITSCRIPT_NAME_${PN}-xen-watchdog = "xen-watchdog"
772INITSCRIPT_PARAMS_${PN}-xen-watchdog = "defaults 81"
773INITSCRIPT_NAME_${PN}-xend = "xend"
774INITSCRIPT_PARAMS_${PN}-xend = "defaults 82"
775INITSCRIPT_NAME_${PN}-xendomains = "xendomains"
776INITSCRIPT_PARAMS_${PN}-xendomains = "defaults 83"
777INITSCRIPT_NAME_${PN}-devd = "xendriverdomain"
778INITSCRIPT_PARAMS_${PN}-devd = "defaults 82"
779
780# systemd packages
781SYSTEMD_PACKAGES = "${PN}-xen-watchdog ${PN}-xencommons ${PN}-xendomains"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500782SYSTEMD_SERVICE_${PN}-xen-watchdog = "xen-watchdog.service"
Patrick Williamsd849ec72016-08-17 14:59:38 -0500783SYSTEMD_SERVICE_${PN}-xencommons = " \
784 proc-xen.mount \
785 var-lib-xenstored.mount \
786 xen-qemu-dom0-disk-backend.service \
787 xenconsoled.service \
788 xen-init-dom0.service \
789 xenstored.service \
Patrick Williamsd849ec72016-08-17 14:59:38 -0500790 "
791SYSTEMD_SERVICE_${PN}-xendomains = "xendomains.service"
792
793#### REQUIRED ENVIRONMENT VARIABLES ####
794export BUILD_SYS
795export HOST_SYS
796export STAGING_INCDIR
797export STAGING_LIBDIR
798
799# specify xen hypervisor to build/target
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500800export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
801export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
Patrick Williamsd849ec72016-08-17 14:59:38 -0500802
803python () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500804 if d.getVar('XEN_TARGET_ARCH') == 'INVALID':
805 raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH'))
Patrick Williamsd849ec72016-08-17 14:59:38 -0500806}
807
808# Yocto appends ${PN} to libexecdir by default and Xen appends 'xen' as well
809# the result is a nested xen/xen/ so let's avoid that by shunning Yocto's
810# extra ${PN} appended.
811libexecdir = "${libdir}"
812
813# hardcoded as Linux, as the only compatible hosts are Linux.
814export XEN_OS = "Linux"
815
816# this is used for the header (#!${bindir}/python) of the install python scripts
817export PYTHONPATH="${bindir}/python"
Patrick Williamse69d2352017-02-23 20:56:04 -0600818export ac_cv_path_PYTHONPATH="${bindir}/python"
Patrick Williamsd849ec72016-08-17 14:59:38 -0500819
Patrick Williamse69d2352017-02-23 20:56:04 -0600820# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
Patrick Williamsd849ec72016-08-17 14:59:38 -0500821export HOSTCC="${BUILD_CC}"
Patrick Williamse69d2352017-02-23 20:56:04 -0600822export HOSTCXX="${BUILD_CXX}"
Patrick Williamsd849ec72016-08-17 14:59:38 -0500823
824# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
825export CROSS_COMPILE="${TARGET_PREFIX}"
826
827# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
828export LDFLAGS=""
829
830# Yocto injects -mfpmath=sse for some machine types into the CFLAGS which
831# conflicts with -mno-sse so instead we strip -mfpmath=sse instead of
832# patching the build to be ok with this
Brad Bishop316dfdd2018-06-25 12:45:53 -0400833TUNE_CCARGS := "${@oe.utils.str_filter_out('-mfpmath=sse', '${TUNE_CCARGS}', d)}"
Patrick Williamsd849ec72016-08-17 14:59:38 -0500834
835EXTRA_OECONF += " \
836 --exec-prefix=/usr \
837 --prefix=/usr \
838 --host=${HOST_SYS} \
839 --with-systemd=${systemd_unitdir}/system \
840 --with-systemd-modules-load=${systemd_unitdir}/modules-load.d \
841 --disable-stubdom \
842 --disable-ioemu-stubdom \
843 --disable-pv-grub \
844 --disable-xenstore-stubdom \
845 --disable-rombios \
846 --disable-ocamltools \
847 --with-initddir=${INIT_D_DIR} \
848 --with-sysconfig-leaf-dir=default \
849 --with-system-qemu=/usr/bin/qemu-system-i386 \
850 --disable-qemu-traditional \
851 "
852
853EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.bin"
854EXTRA_OEMAKE += "CIRRUSVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.7a.cirrus.bin"
855EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin"
856EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom"
857
858# prevent the Xen build scripts from fetching things during the build
859# all dependencies should be reflected in the Yocto recipe
860EXTRA_OEMAKE += "WGET=/bin/false"
861EXTRA_OEMAKE += "GIT=/bin/false"
862
863# check for XSM in package config to allow XSM_ENABLE to be set
864python () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500865 pkgconfig = d.getVar('PACKAGECONFIG')
Patrick Williamsd849ec72016-08-17 14:59:38 -0500866 if ('xsm') in pkgconfig.split():
867 d.setVar('XSM_ENABLED', '1')
868 else:
869 d.setVar('XSM_ENABLED', '0')
870}
871
872do_post_patch() {
873 # fixup AS/CC/CCP/etc variable within StdGNU.mk
874 for i in LD CC CPP CXX; do
875 sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk
876 done
877 # fixup environment passing in some makefiles
878 sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile
879
880 # libsystemd-daemon -> libsystemd for newer systemd versions
881 sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure
882}
883
884addtask post_patch after do_patch before do_configure
885
886do_stubs() {
887 # no stubs-32.h in our 64-bit sysroot - hack it into tools/include/gnu
888 if ! test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-32.h ; then
889 if test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h ; then
890 test -d ${S}/tools/include/gnu || mkdir ${S}/tools/include/gnu
891 cat ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h | grep -v stub_bdflush | grep -v stub_getmsg | grep -v stub_putmsg > ${S}/tools/include/gnu/stubs-32.h
892 echo \#define __stub___kernel_cosl >> ${S}/tools/include/gnu/stubs-32.h
893 echo \#define __stub___kernel_sinl >> ${S}/tools/include/gnu/stubs-32.h
894 echo \#define __stub___kernel_tanl >> ${S}/tools/include/gnu/stubs-32.h
895 fi
896 fi
897}
898
899addtask stubs after do_configure before do_compile
900
Patrick Williamse69d2352017-02-23 20:56:04 -0600901# Allow all hypervisor settings in a defconfig
902EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
903# Build release versions always. Technically since we track release
904# tarballs this always happens but occasionally people pull in patches
905# from staging that reverts this
906EXTRA_OEMAKE += "debug=n"
907
Patrick Williamsd849ec72016-08-17 14:59:38 -0500908do_configure() {
909
910 #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually
911 if [ "${XSM_ENABLED}" = "1" ]; then
912 echo "XSM_ENABLE := y" > ${S}/.config
913 fi
914
Patrick Williamse69d2352017-02-23 20:56:04 -0600915 if [ -f "${WORKDIR}/defconfig" ]; then
916 cp "${WORKDIR}/defconfig" "${B}/xen/.config" || \
917 bbfatal "Unable to copy defconfig to .config"
918 fi
919
Patrick Williamsd849ec72016-08-17 14:59:38 -0500920 # do configure
921 oe_runconf
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500922 if [ ! -e ${STAGING_INCDIR}/bits/long-double-32.h ]; then
923 cp ${STAGING_INCDIR}/bits/long-double-64.h ${STAGING_INCDIR}/bits/long-double-32.h
924 fi
Patrick Williamsd849ec72016-08-17 14:59:38 -0500925}
926
927do_compile() {
Patrick Williamse69d2352017-02-23 20:56:04 -0600928 # workaround for build bug when CFLAGS is exported
929 # https://www.mail-archive.com/xen-devel@lists.xen.org/msg67822.html
930 unset CFLAGS
Patrick Williamsd849ec72016-08-17 14:59:38 -0500931 oe_runmake
932}
933
934do_install() {
935 oe_runmake DESTDIR="${D}" install
936
937 # remove installed volatiles
938 rm -rf ${D}${localstatedir}/run \
939 ${D}${localstatedir}/lock \
940 ${D}${localstatedir}/log \
941 ${D}${localstatedir}/volatile \
942 ${D}${localstatedir}/lib/xen
943
944 VOLATILE_DIRS=" \
945 ${localstatedir}/run/xenstored \
946 ${localstatedir}/run/xend \
947 ${localstatedir}/run/xend/boot \
948 ${localstatedir}/run/xen \
949 ${localstatedir}/log/xen \
950 ${localstatedir}/lock/xen \
951 ${localstatedir}/lock/subsys \
952 ${localstatedir}/lib/xen \
953 "
954
955 # install volatiles using populate_volatiles mechanism
956 install -d ${D}${sysconfdir}/default/volatiles
957 for i in $VOLATILE_DIRS; do
958 echo "d root root 0755 $i none" >> ${D}${sysconfdir}/default/volatiles/99_xen
959 done
960
961 # workaround for xendomains script which searchs sysconfig if directory exists
962 install -d ${D}${sysconfdir}/sysconfig
963 ln -sf ${sysconfdir}/default/xendomains ${D}${sysconfdir}/sysconfig/xendomains
964
965 # systemd
966 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
967 # install volatiles using systemd tmpfiles.d
968 install -d ${D}${sysconfdir}/tmpfiles.d
969 for i in $VOLATILE_DIRS; do
970 echo "d $i 0755 root root - -" >> ${D}${sysconfdir}/tmpfiles.d/xen.conf
971 done
972 fi
973
974 # fixup default path to qemu-system-i386
975 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons
976
977 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
978 sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
979 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
980 fi
981}
982
983pkg_postinst_${PN}-volatiles() {
984 if [ -z "$D" ]; then
985 if command -v systemd-tmpfiles >/dev/null; then
986 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/xen.conf
987 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
988 ${sysconfdir}/init.d/populate-volatile.sh update
989 fi
990 fi
991}
992
993do_deploy() {
994 install -d ${DEPLOYDIR}
995
996 if [ -f ${D}/boot/xen ]; then
997 install -m 0644 ${D}/boot/xen ${DEPLOYDIR}/xen-${MACHINE}
998 fi
999
1000 if [ -f ${D}/boot/xen.gz ]; then
1001 install -m 0644 ${D}/boot/xen.gz ${DEPLOYDIR}/xen-${MACHINE}.gz
1002 fi
1003
1004 if [ -f ${D}/usr/lib64/efi/xen.efi ]; then
1005 install -m 0644 ${D}/usr/lib64/efi/xen.efi ${DEPLOYDIR}/xen-${MACHINE}.efi
1006 fi
1007
1008 # Install the flask policy in the deploy directory if it exists
1009 if [ -f ${D}/boot/${FLASK_POLICY_FILE} ]; then
1010 install -m 0644 ${D}/boot/${FLASK_POLICY_FILE} ${DEPLOYDIR}
1011 ln -sf ${FLASK_POLICY_FILE} ${DEPLOYDIR}/xenpolicy-${MACHINE}
1012 fi
1013}
1014
1015addtask deploy after do_populate_sysroot
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001016
1017# Enable use of menuconfig directly from bitbake and also within the devshell
1018OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
1019HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
1020HOSTLDFLAGS = "${BUILD_LDFLAGS}"
1021TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
1022do_devshell[depends] += "ncurses-native:do_populate_sysroot"
1023
1024KCONFIG_CONFIG_COMMAND ??= "menuconfig"
1025python do_menuconfig() {
1026 import shutil
1027
1028 try:
1029 mtime = os.path.getmtime("xen/.config")
1030 shutil.copy("xen/.config", "xen/.config.orig")
1031 except OSError:
1032 mtime = 0
1033
1034 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'),
1035 d.getVar('PN') + ' Configuration', d)
1036
1037 try:
1038 newmtime = os.path.getmtime("xen/.config")
1039 except OSError:
1040 newmtime = 0
1041
1042 if newmtime > mtime:
1043 bb.note("Configuration changed, recompile will be forced")
1044 bb.build.write_taint('do_compile', d)
1045}
1046do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
1047do_menuconfig[nostamp] = "1"
1048do_menuconfig[dirs] = "${B}"
1049addtask menuconfig after do_configure