Xen ARM with Virtualization Extensions/OdroidXU
Preparing the board
The bootloader provided with the OdroidXU does not let Xen boot in hypervisor mode. In the Odroid forums for the XU, one is likely to see many U-Boot blobs (bl1/bl2/tzsw/u-boot) which could possibly be used to let Xen boot in hypervisor mode. To avoid multiple sources, currently a single source is provided which can be accessed from https://github.com/suriyanr/linux-xen/tree/odroid-3.13.y/sd_fuse
The sd_fusing.sh script found therein can be used to fuse the SD card or eMMC card with the required BL1/BL2/TZSW and U-Boot.
sd_fusing.sh /dev/mmcblk0
This will let XEN boot in hypervisor mode as well as set CNTFRQ through the trustzone. This is required for domUs to get the correct timer frequency. (dom0's optionally can pick it up from the device tree)
Building XEN
Follow Build Xen on ARM to build XEN. For more verbose debug messages from XEN, it is worthwhile to compile XEN as below:
make dist-xen XEN_TARGET_ARCH=arm32 debug=y CONFIG_EARLY_PRINTK=exynos5250
For the moment, xen doesn't build uImage for U-Boot. You can create the image with:
mkimage -A arm -T kernel -a 0x80200000 -e 0x80200000 -C none -d "$xen_src/xen/xen" xen4.5-uImage
where $xen_src is the root directory of your xen git.
Building the device tree for Xen and the Linux Dom0
We will build Linux for dom0 to have a device tree to provide to Xen.
You can get a tree from [1] which contains a working configuration for the Odroid XU.
git clone -b odroid-3.13.y https://github.com/suriyanr/linux-xen.git --depth=1 cd linux-xen make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE odroidxu_xen_defconfig make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE zImage make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE dtbs # Note that CROSS_COMPILE has to be set appropriately or can be left unset if building natively.
The device tree used by the OdroidXU is located in arch/arm/boot/dts/exynos5410-odroidxu.dtb
Booting from SD/eMMC card
Start with a distribution that you like, say xubuntu 14.04lts from http://odroid.in/ubuntu_14.04lts/ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img.xz, or ArchLinuxArm if you prefer from http://archlinuxarm.org/platforms/armv7/samsung/odroid-xu.
Once you have imaged the SD card or eMMC card with your preferred distribution, please overwrite the BL1/BL2/TZSW/U-Boot as mentioned in [Xen_ARM_with_Virtualization_Extensions/OdroidXU#Preparing_the_board]