All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hugo L'Hostis" <hugo.lhostis@arm.com>
To: meta-arm@lists.yoctoproject.org
Cc: nd@arm.com
Subject: [PATCH] arm-autonomy/fvp-base: Add support for runfvp for arm-autonomy-host
Date: Fri, 23 Jul 2021 14:17:07 +0100	[thread overview]
Message-ID: <20210723131707.2582536-1-hugo.lhostis@arm.com> (raw)

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 <hugo.lhostis@arm.com>
Change-Id: Ia6e2f6a13e84c8e762d297ac34ccbe5417a7793b
---
 .../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 ee547c2..477d6d2 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
+
-- 
2.25.1


                 reply	other threads:[~2021-07-23 13:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210723131707.2582536-1-hugo.lhostis@arm.com \
    --to=hugo.lhostis@arm.com \
    --cc=meta-arm@lists.yoctoproject.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.