After creating a PetaLinux project for Zynq UltraScale+ MPSoC and VersalĀ® ACAP, follow the below steps to build Xen images:
- Go to
cd <proj root directory>
. - In the
petalinux-config
command, select . - In
petalinux-config -c rootfs
, select .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 enableswitch_root
. To resolve the issue, change the above config topetalinux-image-minimal
frompetalinux-initramfs-image
. - 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" / { };
- 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"
- Run
petalinux-build
. - 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.