Home Explore Blog CI



nixpkgs

1st chunk of `pkgs/by-name/xe/xen/README.md`
f9ca25dd91290a9068732c92ba9d2956d76d73fa349781df0000000100000b6c
<p align="center">
  <a href="https://xenproject.org/">
    <picture>
      <source
        media="(prefers-color-scheme: light)"
        srcset="https://downloads.xenproject.org/Branding/Logos/Green+Black/xen_project_logo_dualcolor_2000x832.png">
      <source
        media="(prefers-color-scheme: dark)"
        srcset="https://xenproject.org/wp-content/uploads/sites/79/2018/09/logo_xenproject.png">
      <img
        src="https://downloads.xenproject.org/Branding/Logos/Green+Black/xen_project_logo_dualcolor_2000x832.png"
        width="512px"
        alt="Xen Project Logo">
    </picture>
  </a>
</p>

# Xen Project Hypervisor <a href="https://xenproject.org/"><img src="https://downloads.xenproject.org/Branding/Mascots/Xen-Fu-Panda-2000px.png" width="48px" align="top" alt="Xen Fu Panda"></a>

This directory begins the [Xen Project Hypervisor](https://xenproject.org/) build process.

Some other notable packages that compose the Xen Project Ecosystem include:

- `ocamlPackages.xenstore`: Mirage's `oxenstore` implementation.
- `ocamlPackages.vchan`: Mirage's `xen-vchan` implementation.
- `ocamlPackages.xenstore-tool`: XAPI's `oxenstore` utilities.
- `xen-guest-agent`: Guest drivers for UNIX domUs.
- `win-pvdrivers`: Guest drivers for Windows domUs.
- `xtf`: The Xen Test Framework.

## Updating

### Manually

1. [Update](https://xenbits.xenproject.org/gitweb/) the `package.nix` file for
   the latest branch of Xen.
   - Do not forget to set the `branch`, `version`, and `latest` attributes.
   - The revisions are preferably commit hashes, but tag names are acceptable
     as well.
1. Make sure it builds.
1. Use the NixOS module to test if dom0 boots successfully on the new version.
1. Make sure the `meta` attributes evaluate to something that makes sense. The
   following one-line command is useful for testing this:

   ```console
   echo -e "\033[1m$(nix eval .#xen.meta.description --raw 2> /dev/null)\033[0m\n\n$(nix eval .#xen.meta.longDescription --raw 2> /dev/null)"
   ```

1. Run `xtf --all --host` as root when booted into the Xen update, and make
   sure no important tests fail.
1. Clean up your changes and commit them, making sure to follow the
   [Nixpkgs Contribution Guidelines](../../../../CONTRIBUTING.md).
1. Open a PR and await a review from the current maintainers.

## Features

### Generic Builder

`buildXenPackage` is a helpful utility capable of building Xen when passed
certain attributes. The `package.nix` file on this directory includes all
important attributes for building a Xen package with Nix. Downstreams can
pin their Xen revision or include extra patches if the default Xen package
does not meet their needs.

### EFI

Building `xen.efi` requires an `ld` with PE support.[^2]

We use a `makeFlag` to override the `$LD` environment variable to point to our
patched `efiBinutils`. For more information, see the comment in `pkgs/build-support/xen/default.nix`.

Title: Xen Project Hypervisor and Updating Instructions
Summary
This section introduces the Xen Project Hypervisor, outlines related packages in the Xen Project Ecosystem, and provides detailed instructions for manually updating the Xen package in Nixpkgs. It also describes the generic builder, a utility for building Xen with custom attributes, and highlights the EFI feature, noting the requirement for an 'ld' with PE support and the use of a 'makeFlag' to override the '$LD' environment variable.