Xen ARM with Virtualization Extensions/OdroidXU: Difference between revisions
Line 23: | Line 23: | ||
where ''$xen_src'' is the root directory of your xen git. |
where ''$xen_src'' is the root directory of your xen git. |
||
== Building the device tree for Xen and Linux Dom0 == |
== 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. |
We will build Linux for dom0 to have a device tree to provide to Xen. |
||
Line 31: | Line 31: | ||
git clone -b odroid-3.13.y https://github.com/suriyanr/linux-xen.git --depth=1 |
git clone -b odroid-3.13.y https://github.com/suriyanr/linux-xen.git --depth=1 |
||
cd linux-xen |
cd linux-xen |
||
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE |
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. |
# 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/ |
The device tree used by the OdroidXU is located in arch/arm/boot/dts/exynos5410-odroidxu.dtb |
||
== Resources == |
== Resources == |
Revision as of 19:21, 6 January 2015
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