[PATCH] arm/classes: add support to configure fvp-bindir

Mohammed Javith Akthar M <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <PH0PR10MB554502D8256670F2960C0569DEBC2@PH0PR10MB5545.namprd10.prod.outlook.com>
Currently, fvp-bindir is configured to use the build path. This commit
allows customization of this path by defining a new variable FVP_BINDIR
in fvpconf. This change enables the runfvp script to execute without
BitBake initialization.

Testing:
- Tested using OpenBMC FVP build.
- Defined FVP_BINDIR variable with a custom path in fvp-config.inc and
observed the changes after the build.

Before changes:
$ jq . ~/openbmc/build/fvp/tmp/deploy/images/fvp/obmc-phosphor-image-fvp.fvpconf | grep
fvp-bindir
  "fvp-bindir": "/home/javith/build/openbmc/build/fvp/tmp/sysroots
-components/x86_64/fvp-base-a-aem-native/usr/bin",

After changes:
$ jq . ~/openbmc/build/fvp/tmp/deploy/images/fvp/obmc-phosphor-image-fvp.fvpconf | grep
fvp-bindir
  "fvp-bindir": "utilities/fvp/usr/bin",

Signed-off-by: Mohammed Javith Akthar M <[email protected]>
---
 meta-arm/classes/fvpboot.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-arm/classes/fvpboot.bbclass b/meta-arm/classes/fvpboot.bbclass
index 3d8536fc..e5ffbac6 100644
--- a/meta-arm/classes/fvpboot.bbclass
+++ b/meta-arm/classes/fvpboot.bbclass
@@ -48,7 +48,11 @@ python do_write_fvpboot_conf() {
     provider = d.getVar("FVP_PROVIDER")
     if provider:
         data["provider"] = provider
-        data["fvp-bindir"] = os.path.join(d.getVar("COMPONENTS_DIR"),
+        bindir = d.getVar("FVP_BINDIR")
+        if bindir:
+            data["fvp-bindir"] = bindir
+        else:
+            data["fvp-bindir"] = os.path.join(d.getVar("COMPONENTS_DIR"),
                                             d.getVar("BUILD_ARCH"),
                                             provider,
                                             "usr", "bin")
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.