Hello Everyone!
I have just bought a Cubietruck and I really want to set up an hypervisor on it. My aim is to build the system entirely on a SD card (Verbatim MicroSD 2GB SD/MMC, connected via micro SD card USB adapter) and boot it without touching the NAND on board. The system I am mounting is composed by: -Bootloader: UBoot 2015.01 Mainline. -Hypervisor: Xen 4.5.0. -Kernel: Linux 3.19.3 Mainline. -Dom0 RootFS: linaro-utopic-developer-20150115-694. I will describe all the steps I have done to build the system, so that you can have a better view of the process. I followed these two wiki as guidelines: http://openmirage.org/wiki/xen-on-cubieboard2 http://www.sourcediver.org/blog/2014/06/19/running-arch-linux-arm-with-xen-on-cubieboard-2/ The Host machine runs Ubuntu 14.04 LTS. For all the building processes I used the gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux cross-compiler (versions ∈[4.8.0, 4.8.2] are "too buggy" to compile kernels). https://releases.linaro.org/14.07/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux.tar.bz2 --- Bootloader --- I know the version 2015.04 has still some problems, so I chose the 2015.01 which is more stable. wget http://ftp.denx.de/pub/u-boot/u-boot-2015.01.tar.bz2 Than, into the booting directory: export CROSS_COMPILE=arm-linux-gnueabihf- make Cubietruck_defconfig make --- Hypervisor --- I chose the latest stable version: git clone git://xenbits.xen.org/xen.git cd xen git checkout stable-4.5 And than compiled as follows: export CROSS_COMPILE=arm-linux-gnueabihf- make clean make dist-xen XEN_TARGET_ARCH=arm32 debug=y CONFIG_EARLY_PRINTK=sun7i --- Kernel --- I used the last stable version of the mainline (4.0.0 works as well). wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.19.3.tar.xz Than, into the kernel directory: export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- make sunxi_defconfig make all -j8 As configuration file, I modified the "sunxi_defconfig" including all the needed xen configurations. https://dl.dropboxusercontent.com/u/68238168/Cubietruck/sunxi_defconfig --- RootFS --- I used the linaro tarball: wget http://releases.linaro.org/15.01/ubuntu/utopic-images/developer/linaro-utopic-developer-20150115-694.tar.gz --- Boot Commands --- I used the following boot.cmd file: https://dl.dropboxusercontent.com/u/68238168/Cubietruck/Boot And than I built the boot.scr: mkimage -C none -A arm -T script -d boot.cmd boot.scr --- SD Card Preparation --- I partitioned the SD card. By using GParted, I deleted all the partitions on the card, created a new partition table (msdos), and than used the first 16 MiB as Boot partition and the rest (1.84 GiB) as Dom0 RootFS partition: Device Boot Start End Blocks Id System /dev/sdb1 * 2048 34815 16384 83 Linux /dev/sdb2 34816 3885055 1925120 83 Linux I than labelled sdb1 as Root and sdb2 as Dom0. I removed and inserted again the SD card in the Host machine, so that it auto-mounts the partitions. Than I populated them: BOOT=/media/${USER}/Boot DOM0=/media/${USER}/Dom0 ###In the bootloader top directory sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 ###In the directory containing the boot script sudo cp boot.scr ${BOOT} ###in (xen_topdir)/xen/ sudo cp xen ${BOOT} ###in (linux_topdir)/arch/arm/boot/ sudo cp zImage ${BOOT} ### in (linux_topdir)/arch/arm/boot/dts/ sudo cp sun7i-a20-cubietruck.dtb ${BOOT} ### in the directory containing the RootFS tarball sudo tar -xpf linaro-utopic-developer-20150115-694.tar.gz -C ${DOM0} sudo mv ${DOM0}/binary/* ${DOM0} sudo rmdir ${DOM0}/binary --- RUNNING THE SYSTEM --- First, I tried to run everything without xen (boot.cmd: https://dl.dropboxusercontent.com/u/68238168/Cubietruck/booty) and it worked fine. When I put xen in the toolchain, the kernel gets loaded but gets stuck almost at the end of its initialization not allowing me to get to the shell. By looking at the boot log, I got these messages: https://dl.dropboxusercontent.com/u/68238168/Cubietruck/partial It DOES look strange, as you can see, by those last lines, that xen and its tools seems not to be recognized. I have checked in the Dom0 RootFS on the SD card, and under "./etc/" there are a xen and a xen-tools directories. I have also double checked the kernel config and I am sure that xen support is enabled. Here it is the full boot log: https://dl.dropboxusercontent.com/u/68238168/Cubietruck/utopic-log Any advice would be helpful! -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
