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