Ibox3399

From Xen
Revision as of 09:44, 7 August 2018 by Ihor.Matushchak (talk | contribs) (Created page with "== Bootloader == For ARM64 Xen requires to be booted in EL2 mode by the bootloader. By default Rockchip RK3399 Ibox3399 development board comes with u-boot which is not very f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Bootloader

For ARM64 Xen requires to be booted in EL2 mode by the bootloader. By default Rockchip RK3399 Ibox3399 development board comes with u-boot which is not very friendly for booting Xen.

Please update the u-boot with provided by Rockchip rockchip-linux/u-boot github. Build instructions: rockchip-linux/u-boot github README.

Prepequairnments

u-boot-utils

Cross compilers used: gcc-linaro-7.2.1 for Xen and aarch64-linux-android-4.9 for kernel

Building Xen

Get Xen and switch to xen-4.10.1 tag:

 git clone git://xenbits.xen.org/xen.git
 cd xen
 git checkout RELEASE-4.10.1 -b 'xen-rk3399'

Enable earlyprintk configuration for rk3399 boards:

 diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
 index b66c19f..b1cf319 100644
 --- a/xen/arch/arm/Rules.mk
 +++ b/xen/arch/arm/Rules.mk
 @@ -38,6 +38,7 @@ EARLY_PRINTK_lager          := scif,0xe6e60000
  EARLY_PRINTK_midway         := pl011,0xfff36000
  EARLY_PRINTK_omap5432       := 8250,0x48020000,2
  EARLY_PRINTK_rcar3          := scif,0xe6e88000
 +EARLY_PRINTK_rk3399         := 8250,0xff1a0000,2
  EARLY_PRINTK_seattle        := pl011,0xe1010000
  EARLY_PRINTK_sun6i          := 8250,0x01c28000,2
  EARLY_PRINTK_sun7i          := 8250,0x01c28000,2

Configure Hypervisor:

 cd xen/xen
 export PATH=$PATH:<path_to_gcc-linaro>/bin/
 make menuconfig CROSS_COMPILE=aarch64-linux-gnu- XEN_TARGET_ARCH=arm64

Enable debugging option:

 Debugging Options  --->
   [*] Developer Checks

Build Hypervisor:

 cd ../
 make dist-xen CROSS_COMPILE=aarch64-linux-gnu- XEN_TARGET_ARCH=arm64 debug=y CONFIG_EARLY_PRINTK=rk3399

Make image suitable to be booted by u-boot:

 mkimage -A arm64 -T kernel -a 0x02000000 -e 0x02000000 -C none -d ./xen/xen xen4.10-uImage

Collect xen4.10-uImage file at this step.

Dom0 Kernel/FDT

TBD