Rebuild Xen - 2022.1 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2022-04-26
Version
2022.1 English

After creating a PetaLinux project for Zynq UltraScale+ MPSoC and VersalĀ® ACAP, follow the below steps to build Xen images:

  1. Go to cd <proj root directory>.
  2. In the petalinux-config command, select Image Packaging Configuration > Root filesystem type (INITRD).
  3. In petalinux-config -c rootfs, select PetaLinux Package Groups > Packagegroup-petalinux-xen > [*] packagegroup-petalinux-xen.
    Note: If you enable Xen when /switch_root is enabled, you will see build failures as Xen only supports ramfs boot. ext4-based boot is enable if you enable switch_root. To resolve the issue, change the above config to petalinux-image-minimal from petalinux-initramfs-image.
  4. Edit the device tree to build in the extra Xen related configs. Edit this file: project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi and add this line: /include/ "xen.dtsi"

    It should look like the following:

    /include/ "system-conf.dtsi"
    /include/ "xen.dtsi"
    / {
    };
  5. Edit the file: project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbapp end and add this line to it: SRC_URI += "file://xen.dtsi"

    The file should look like this:

    FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
    
    SRC_URI += "file://system-user.dtsi"
    SRC_URI += "file://xen.dtsi"
  6. Run petalinux-build.
  7. The build artifacts are in images/linux in the project directory.
Note: By default, the petalinux-build command does not build Xen. The default root file system does not contain the Xen tools. You have to use Xen RootFS.
Important: You are required to update dom0 memory in xen-bootargs in the xen.dtsi file based on the image/RootFS size. Also, adjust the above load addresses based on the image/RootFS size without overlapping.