How to use Xen for linux(ubuntu) and Android


#1

Hi

We are using Hikey960 board V2.
We want achieve below listed features:

  1. We want enable Xen support.
  2. We need to use Linux(Ubuntu) as Dom0 and Android as DomU.

Followed instruction in the Hikey960 board WiKi page to build Linux Xen and grub, but information is not clear.
Please point us:

  1. Which repository should be used to clone the source for Linux(Ubuntu)
  2. Which repository should be used to clone the source for Xen and grub
  3. Which commit ID to use.
  4. Build steps to be followed

Thanks


#2

Looks like we cross-posted but either way the page on the Xen wiki remains (as far as I know) the best available documentation for Xen users, so the advice I offered earlier (start with Debian working first and then the instructions on the Xen wiki will make more sense) still applies:

You can eventually swap out Debian for Ubuntu if you want to but starting from a system that has working UEFI, working grub and working GNU/Linux OS should make it easier for you to make confident decisions.


#3

Thanks Daniel.

Tried to flash the pre-built binary for Debian package.(Downloaded from below link).


While booting getting following logs.

[ 2.841748] uart-pl011 fff32000.serial: no DMA platform data
[ 2.843166] mmc1: new SDIO card at address 0001
[ 3.749222] ufshcd-hisi ff3b0000.ufs: ufshcd_query_flag: Sending flag query for idn 3 failed, err = -11
[ 5.285217] ufshcd-hisi ff3b0000.ufs: ufshcd_query_flag: Sending flag query for idn 3 failed, err = -11
[ 5.294620] ufshcd-hisi ff3b0000.ufs: ufshcd_query_flag_retry: query attribute, opcode 5, idn 3, failed with error -11 after 3 retires
[ 6.821188] ufshcd-hisi ff3b0000.ufs: __ufshcd_query_descriptor: opcode 0x01 for idn 8 failed, index 0, err = -11

Please point some pre-built links so that we can use it and take it as reference


#4

@Vikram Current Debian image (snapshot) kernel has limited features enabled for hikey960. But you should be able to get Linux uart prompt. It should suffice your purpose to update EFI (/boot/efi) partition and eventually replacing Debian with Ubuntu.

BTW, if you need to have full kernel features for hikey960 then build and install 96boards-hikey kernel.


#5

Thanks Sumit.

I have already built this source code and flashed. But no luck, it is stopping at after Grub.


#6

@Vikram Can you share the steps and boot-logs for kernel update?

BTW, a useful doc for kernel update: Build & Update Linux kernel on HiKey


#7

Sumith,

Please find the steps followed for kernel upgrade:
git clone https://github.com/96boards-hikey/linux.git
cd linux
git checkout origin/hikey960-upstream-rebase
export CROSS_COMPILE=aarch64-linux-gnu-
export ARCH=arm64
make defconfig
make -j8

Download rootfs from below link and followed the steps.
https://releases.linaro.org/debian/images/developer-arm64/latest/linaro-stretch-developer-20170720-71.tar.gz
sudo tar -xzf linaro-stretch-developer-20170720-71.tar.gz
sudo mv binary rootfs
sudo cp Image rootfs/boot
sudo cp Image.dtb rootfs/boot

Flashing binaries:
fastboot flash ptable prebuilt/prm_ptable.img
fastboot flash fastboot prebuilt/l-loader.bin
fastboot flash fip prebuilt/fip.bin
fastboot flash boot boot-linaro-stretch-developer-hikey-20180521-18.img
fastboot flash system rootfs.img

Thanks for link. Have one question, whether the link shared is for Hikey or Hikey960


#8

Using steps you provided, Linux (/boot/Image) and DTB (/boot/Image.dtb) path should be updated in the GRUB menu after pressing “e”.

It should work for hikey960 too. You need to replace kernel build with 96boards-hikey.


#9

Followed the steps provided in the below link

Facing below issues.
make bindeb-pkg LOCALVERSION=-hikey-linaro
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
/bin/bash ./scripts/package/mkdebian
dpkg-buildpackage -j1 -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: source package linux-4.15.3-hikey-linaro-00154-gf449b3c
dpkg-buildpackage: source version 4.15.3-hikey-linaro-00154-gf449b3c-1
dpkg-buildpackage: source distribution trusty
dpkg-buildpackage: source changed by Anonymous
dpkg-buildpackage: host architecture arm64
dpkg-source --before-build linux
dpkg-checkbuilddeps: Unmet build dependencies: libssl-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make[1]: *** [bindeb-pkg] Error 3
make: *** [bindeb-pkg] Error 2


#10

I have Ubuntu xenial distro installed and “make bindeb-pkg LOCALVERSION=-hikey-linaro” could work fine. Also following is libssl-dev version info:

$ apt-cache policy libssl-dev
libssl-dev:
  Installed: 1.0.2g-1ubuntu4.13
  Candidate: 1.0.2g-1ubuntu4.13
  Version table:
 *** 1.0.2g-1ubuntu4.13 500
        500 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.2g-1ubuntu4 500
        500 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

#11

I have Ubuntu(14.04) trusty distro installed.

apt-cache policy libssl-dev
libssl-dev:
Installed: 1.0.1f-1ubuntu2.26
Candidate: 1.0.1f-1ubuntu2.26
Version table:
*** 1.0.1f-1ubuntu2.26 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
1.0.1f-1ubuntu2 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Do you have any working binaries? Is it possible to attached it here?
If it works at my end I can use it as reference.

Thanks