Commit Graph

21 Commits

Author SHA1 Message Date
Bruce Ashfield
d876cfc5bf global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides
separator.

This is pass one of updating the meta-virt recipes to use that
syntax.

This has only been minimally build/runtime tested, more changes
will be required for missed overrides, or incorrect conversions

Note: A recent bitbake is required:

    commit 75fad23fc06c008a03414a1fc288a8614c6af9ca
    Author: Richard Purdie <richard.purdie@linuxfoundation.org>
    Date:   Sun Jul 18 12:59:15 2021 +0100

        bitbake: data_smart/parse: Allow ':' characters in variable/function names

        It is becomming increasingly clear we need to find a way to show what
        is/is not an override in our syntax. We need to do this in a way which
        is clear to users, readable and in a way we can transition to.

        The most effective way I've found to this is to use the ":" charater
        to directly replace "_" where an override is being specified. This
        includes "append", "prepend" and "remove" which are effectively special
        override directives.

        This patch simply adds the character to the parser so bitbake accepts
        the value but maps it back to "_" internally so there is no behaviour
        change.

        This change is simple enough it could potentially be backported to older
        version of bitbake meaning layers using the new syntax/markup could
        work with older releases. Even if other no other changes are accepted
        at this time and we don't backport, it does set us on a path where at
        some point in future we could
        require a more explict syntax.

        I've tested this patch by converting oe-core/meta-yocto to the new
        syntax for overrides (9000+ changes) and then seeing that builds
        continue to work with this patch.

        (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284)

        Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-08-02 17:17:53 -04:00
Christopher Clark
19347a7c4e qemuboot, xen-image-minimal: enable runqemu for qemuarm64 Xen images
The Xen hypervisor built for Arm 64-bit targets can be launched with
runqemu by providing a Device Tree binary and configuration for Qemu,
which enables interactive testing of Xen images.

Add qemuboot-xen-dtb.bbclass to add a new bitbake task for generating
the dtb file by using lopper on a device tree produced by Qemu.

Add qemuboot-xen-defaults.bbclass to supply working default parameters
for the qemuarm64 machine and general support for qemuboot for Xen,
and adjust the defaults as needed to boot successfully in testing.

Development aided by this script by Stewart Hildebrand of DornerWorks:
https://gist.github.com/stewdk/110f43e0cc1d905fc6ed4c7e10d8d35e

Signed-off-by: Christopher Clark <christopher.clark@starlab.io>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-07-29 10:55:56 -04:00
Bruce Ashfield
baf30af86f xen: make kernel modules an override possible variable
Sometimes Xen is built with different mixes of kernel modules and
built-in values. If we put our expected/default modules in a
variable, they can be overriden by a different kernel provider
as required

Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-09-22 15:51:10 -04:00
Bruce Ashfield
2f22425222 xen: make QB_ assignments weak
runqemu is looking for the QB_DEFAULT_KERNEL to be set to "none"
to trigger special processing. The current set of QB_DEFAULT_KERNEL=""
won't trigger that behaviour .. so we change the default.

We also make the assignments weak, to allow easier overrides in
specific implementations.

We also need a patch to qemuboot.bbclass to make the defaults ??=,
and when that is done, our ?= here will work properly.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-09-16 14:16:48 -04:00
Christopher Clark
c925905e38 xen-image-minimal: enable runqemu for x86-64
Booting this Xen image with QEMU works when launching from the
wic-generated pcbios disk image with the directdisk-xen.wks kickstart
file, so add the variable settings to make doing it simple -- eg:

    runqemu xen-image-minimal nographic slirp

Tested with MACHINEs: qemux86-64 and genericx86-64

Memory allocated to qemu is increased slightly over the default to allow
for running Xen and the Linux dom0 and guest VMs.

Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-03-02 15:04:28 -05:00
Christopher Clark
50669e428f xen-image-minimal: add a build dependency on the xen hypervisor
The hypervisor may not be within the dom0 filesystem image itself,
so add a task dependency to ensure that it is deployable:
    do_build[depends] += "xen:do_deploy"

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-27 16:59:23 -05:00
Christopher Clark
19b45a9fed xen-image-minimal: add kernel-module-tun for HVM guest networking
Xen HVM guests are only on x86 platforms so add the module via overrides.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-27 16:59:23 -05:00
Christopher Clark
545461ba2f 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>
2020-02-27 16:59:23 -05:00
Dariusz Pelowski
1f99ba19c8 xen-image-minimal: corrected popoulation xen.gz for syslinux
syslinux images cannot boot because they're missing of xen.gz
file. Current poky doesn't use populate() function, instead
syslinux_populate() can be used.

Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-10-09 12:38:08 -04:00
Christopher Clark
f0e708ea8c xen-guest-image-minimal: fix making PCI a x86-only dependency
The logic for restricting the xen-pciback kernel module to x86-only
images was incorrect, resulting in the IMAGE_INSTALL_x86 and _x86-64
variables causing the IMAGE_INSTALL variable contents to be
overridden and incomplete.

This correction removes the specialized IMAGE_INSTALL_x86 and _x84-64
variables. The replacement logic causes a value with
conditionally-populated contents to be added to the IMAGE_INSTALL
variable.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-10-04 16:54:36 -04:00
Christopher Clark
6aa755e493 xen-image-minimal: Make kernel-module-xen-pciback a x86-only dependency
This commit fixes the xen-image-minimal build for non-x86 arch with PCI enabled.

The Linux kernel option CONFIG_XEN_PCIDEV_BACKEND currently depends on X86.
This means that the xen-pciback kernel module cannot be included in this image
for non-x86 architecture builds, so don't attempt to install it in that case.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-19 09:22:55 -04:00
Christopher Clark
46149a8e0f xen-image-minimal : change SYSLINUXCFG to SYSLINUX_CFG
The SYSLINUXCFG variable was renamed to SYSLINUX_CFG in poky and
openembedded-core with the commits referenced below.
This commit makes a corresponding change to fix the build for
xen-image-minimal.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>

git://git.openembedded.org/openembedded-core
commit e38c94d6bf83ed3ca7f046d9503e81b927487bf2
git://git.yoctoproject.org/poky.git
commit bb1c719250cecc8725147cbdd999a9a44a11b549

  Author: Robert Yang <liezhi.yang@windriver.com>
  Date:   Wed Feb 24 01:23:58 2016 -0800

      syslinux.bbclass: make vm and live can be built together
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-08-24 09:55:41 -04:00
Doug Goldstein
c0d11eeb26 xen-image-minimal: if DISTRO_FEATURES is missing xen error
It can be confusing to users why things are failing with missing kernel
dependencies when you don't have 'xen' in your DISTRO_FEATURES. This
should provide them with some better info.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2016-12-18 22:47:44 -05:00
Nathan Rossi
e01dd91f77 xen-image-minimal: Install qemu instead of xen-qemu
* Install QEMU from the distro as opposed to a specific xen-qemu setup

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
2015-02-20 21:17:04 -05:00
Nathan Rossi
06a8cc10d8 xen-*image-minimal: Setup conditional based on MACHINE_FEATURES
* Conditionally add packages to the image depending on whether the
  machine supports the respective feature

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
2015-02-20 21:17:04 -05:00
Chris Patterson
0192b43754 xen-image-minimal: fix syslinux dependency
Install libcom32.c32 when populating syslinux-based images.

When syslinux upgraded to v6, libcom32.c32 became a dependency
for mboot.c32.

Signed-off-by: Chris Patterson <cjp256@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-11-24 00:05:51 -05:00
Chris Patterson
ac04991027 xen-image-minimal: update image installed modules to reflect xen fragment changes.
Signed-off-by: Chris Patterson <cjp256@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-10-10 23:32:26 -04:00
Chris Patterson
06bb47de22 xen-image-minimal: break out arguments for xen and linux kernel as variables SYSLINUX_XEN_ARGS and SYSLINUX_KERNEL_ARGS to allow modification/overwriting.
Signed-off-by: Chris Patterson <cjp256@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-10-10 23:30:24 -04:00
Chris Patterson
214c4715f0 xen-image-minimal: update image to support xen 4.3.0 base with xl toolstack.
Signed-off-by: Chris Patterson <cjp256@gmail.com>
2013-09-24 11:45:52 -04:00
Mihai Prica
e71f63a6b8 xen-image-minimal: Changed from task-core-boot to package-core-boot
Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Raymond Danks <ray.danks@se-eng.com>
2012-11-26 16:21:15 -07:00
Raymond Danks
fb46a2bb6b images/xen-image-minimal: Initial meta file for a minimal xen image.
Signed-off-by: Raymond Danks <ray.danks@se-eng.com>
2012-06-21 15:49:45 -06:00