From be58ae813494946b49ea2c51795bea3cd4fb5eb1 Mon Sep 17 00:00:00 2001 From: Hugo L'Hostis Date: Fri, 23 Jul 2021 14:17:07 +0100 Subject: [PATCH] arm-autonomy/fvp-base: Add support for runfvp for arm-autonomy-host Expand the FVP_DATA variable used by the fvpboot.bbclass to load both Xen and its device tree when building arm-autonomy-host image for fvp-base. Issue-Id: SCM-2718 Signed-off-by: Hugo L'Hostis Change-Id: Ia6e2f6a13e84c8e762d297ac34ccbe5417a7793b Signed-off-by: Jon Mason --- .../conf/machine/fvp-base-extra-settings.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc index ee547c29..477d6d27 100644 --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc @@ -13,6 +13,14 @@ ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-fvp-base-disk.wks.in" WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\ '${ARM_AUTONOMY_WKS_FILE}', d)}" +XEN_FILE ?= "xen-fvp-base" +DTB_FILE ?= "${@ get_xen_dtb_filename(d)}" +XEN_ADDR ?= "0x84000000" +DTB_ADDR ?= "0x83000000" + +FVP_DATA += "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${XEN_FILE}@${XEN_ADDR} \ + cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${DTB_FILE}@${DTB_ADDR}" + # Set the wks guest partition size and unit. It must be aligned with the sum of # all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is # 1 MiB per physical volume, hence it needs to be taken into account when @@ -21,3 +29,11 @@ GUEST_PART_SIZE ?= "4097" GUEST_PART_SIZE_UNIT ?= "M" XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0" + +# This function uses the "KERNEL_DEVICETREE" variable and manipulates it to +# return the xen kernel device tree file name. +def get_xen_dtb_filename(d): + kernel_dtb_filename = d.getVar('KERNEL_DEVICETREE',d) + xen_dtb_filename = os.path.splitext(os.path.basename(kernel_dtb_filename))[0] + '-xen.dtb' + return xen_dtb_filename +