How to use Xen for linux(ubuntu) and Android


#41

Hi @leo-yan

I tried your kernel version, I’m able to have shell access. But, somehow I still getting the XEN CPU error.
Here is the full log from boot till I got shell access: https://pastebin.com/VsPuLip5

root@linaro-developer:~# uname -a
Linux linaro-developer 5.0.0-rc3-315296-gff9fd24304a2 #2 SMP PREEMPT Thu Feb 14 09:05:08 CET 2019 aarch64x

Is the UEFI matters? I use this one: http://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/84/hikey960/debug/

And I use

  1. boot-linaro-stretch-developer-hikey-20190120-27.img
  2. rootfs-linaro-stretch-developer-hikey-20190120-27.img

I unsprase the rootfs, mount it, put the kernel, grub.cfg, xen.efi and so on to the boot. Then I sparse it again.
I also replace the grub to the efi folder (in the boot img)

Can you maybe kindly share your boot and rootfs img?

Cheers!


#42

Hi @scorpionzezz,

Sure, I found I am using different versions for ARM-TF/UEFI and Xen:

ARM-TF/UEFI: http://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/latest/hikey960/debug/
Xen: I built Xen with its master branch, so I can see the version is: Xen 4.12-unstable (c/s Mon Dec 17 09:22:59 2018 +0000 git:a5b0eb3636) EFI loader

As @dradspd mentioned, we need to add below options ‘hmp-unsafe’ and ‘dom0_vcpus_pin’ into Xen command line thus can dismiss CPU4-CPU7 booting failure issue; In your log it show the booting failure not only for CPU4~7 (big CPUs) but also CPU1~3 failure (LITTLE CPUs), so firstly could try update Xen and UEFI/ARM-TF to check if can fix the booting issue for CPU1~CPU3.

xen_hypervisor /boot/xen.efi loglvl=all console=dtuart dtuart=/soc/ serial@fff32000 efi=no-rs hmp-unsafe dom0_vcpus_pin

Though Mani has released the latest boot and rootfs images, but I still use the older boot and rootfs images which downloaded from the folder: http://snapshots.linaro.org/96boards/hikey/linaro/debian/19/ ; seems to me the boot-xxx.img and rootfs-xxx.img will not introduce SMP CPU booting failure.

I use a different way for this :slight_smile:.

We can flash the prebuilt boot image: boot-linaro-stretch-developer-hikey-20180828-19.img.gz and with rootfs image for Debian system, thus we can firstly boot up board successfully with WIFI enabled. So after enabling WIFI I can copy Image/Image.dtb and modify grub.cfg; so in the next time we can select grub menu for Xen booting.


#43

Hi @leo-yan

thanks! I updated the UEFI, added the hmp-unsafe and dom0_vcpus_pin, not all the CPUs are up :slight_smile:
I managed to install the xen-tools as well :slight_smile:
If you try to run “xl list”, can you see the Domain-0?

thanks you so much!


#44

@Vikram

can you somehow explain how you able to run android as domU?

Cheers!


#45

if you want to see domain 0 in xl list,
you can run /etc/init.d/xencommons start after you install xen tools