All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell][PATCH 0/2] Fix K3 HS builds when external SECDEV is not provided
@ 2022-11-02 22:16 Denys Dmytriyenko
  2022-11-02 22:16 ` [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc Denys Dmytriyenko
  2022-11-02 22:16 ` [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined Denys Dmytriyenko
  0 siblings, 2 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2022-11-02 22:16 UTC (permalink / raw)
  To: meta-ti; +Cc: Denys Dmytriyenko, Andrew Davis

From: Denys Dmytriyenko <denys@konsulko.com>

Normally, SECDEV tools are provided externally to the build and pointed to by
TI_SECURE_DEV_PKG_K3 variable. Recently changes were made to pull SECDEV tools
during the build automatically and stage them for use, if TI_SECURE_DEV_PKG_K3
is not defined. Unfortunately, there were couple problems with the flow, fixed
by this patchset.

Denys Dmytriyenko (2):
  ti-k3-secdev: include ti-paths.inc
  ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined

 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +-
 recipes-ti/secdev/ti-k3-secdev_git.bb  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc
  2022-11-02 22:16 [dunfell][PATCH 0/2] Fix K3 HS builds when external SECDEV is not provided Denys Dmytriyenko
@ 2022-11-02 22:16 ` Denys Dmytriyenko
  2022-11-03  1:40   ` Andrew Davis
  2022-11-02 22:16 ` [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined Denys Dmytriyenko
  1 sibling, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2022-11-02 22:16 UTC (permalink / raw)
  To: meta-ti; +Cc: Denys Dmytriyenko, Andrew Davis

From: Denys Dmytriyenko <denys@konsulko.com>

Include ti-paths.inc so TI_K3_SECDEV_INSTALL_DIR_RECIPE gets defined and
artifacts are installed in the correct location.

Cc: Andrew Davis <afd@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 recipes-ti/secdev/ti-k3-secdev_git.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-ti/secdev/ti-k3-secdev_git.bb b/recipes-ti/secdev/ti-k3-secdev_git.bb
index 28dbe9e..7196be9 100644
--- a/recipes-ti/secdev/ti-k3-secdev_git.bb
+++ b/recipes-ti/secdev/ti-k3-secdev_git.bb
@@ -4,6 +4,8 @@ SECTION = "devel"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://manifest/k3-secdev-0.2-manifest.html;md5=f632a78870cc64550078d7b3cbac0892"
 
+require recipes-ti/includes/ti-paths.inc
+
 # Native host tool only
 COMPATIBLE_MACHINE = "null"
 COMPATIBLE_MACHINE_class-native = "(.*)"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined
  2022-11-02 22:16 [dunfell][PATCH 0/2] Fix K3 HS builds when external SECDEV is not provided Denys Dmytriyenko
  2022-11-02 22:16 ` [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc Denys Dmytriyenko
@ 2022-11-02 22:16 ` Denys Dmytriyenko
  2022-11-03  1:32   ` Andrew Davis
  1 sibling, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2022-11-02 22:16 UTC (permalink / raw)
  To: meta-ti; +Cc: Denys Dmytriyenko, Andrew Davis

From: Denys Dmytriyenko <denys@konsulko.com>

Otherwise undefined variable is returned literally as ${TI_SECURE_DEV_PKG_K3}
and the condition won't work.

Cc: Andrew Davis <afd@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
index 866cd7b..e5dcdd6 100644
--- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -20,7 +20,7 @@ COMPATIBLE_MACHINE_aarch64 = "null"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-TI_SECURE_DEV_PKG = "${@ '${TI_SECURE_DEV_PKG_K3}' or '${TI_K3_SECDEV_INSTALL_DIR}' }"
+TI_SECURE_DEV_PKG = "${@ d.getVar('TI_SECURE_DEV_PKG_K3') or '${TI_K3_SECDEV_INSTALL_DIR}' }"
 export TI_SECURE_DEV_PKG
 
 SYSFW_SOC ?= "unknown"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined
  2022-11-02 22:16 ` [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined Denys Dmytriyenko
@ 2022-11-03  1:32   ` Andrew Davis
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Davis @ 2022-11-03  1:32 UTC (permalink / raw)
  To: Denys Dmytriyenko, meta-ti; +Cc: Denys Dmytriyenko

On 11/2/22 5:16 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@konsulko.com>
> 
> Otherwise undefined variable is returned literally as ${TI_SECURE_DEV_PKG_K3}
> and the condition won't work.
> 
> Cc: Andrew Davis <afd@ti.com>
> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> ---
>   recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
> index 866cd7b..e5dcdd6 100644
> --- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
> +++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
> @@ -20,7 +20,7 @@ COMPATIBLE_MACHINE_aarch64 = "null"
>   
>   PACKAGE_ARCH = "${MACHINE_ARCH}"
>   
> -TI_SECURE_DEV_PKG = "${@ '${TI_SECURE_DEV_PKG_K3}' or '${TI_K3_SECDEV_INSTALL_DIR}' }"
> +TI_SECURE_DEV_PKG = "${@ d.getVar('TI_SECURE_DEV_PKG_K3') or '${TI_K3_SECDEV_INSTALL_DIR}' }"
>   export TI_SECURE_DEV_PKG
>   

I remember +Randolph did exactly this in another spot in this same file[0].
Should we check this everywhere we have input env vars?

Acked-by: Andrew Davis <afd@ti.com>

[0] https://patchwork.yoctoproject.org/project/ti/patch/20220902201247.605908-1-rs@ti.com/


>   SYSFW_SOC ?= "unknown"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc
  2022-11-02 22:16 ` [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc Denys Dmytriyenko
@ 2022-11-03  1:40   ` Andrew Davis
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Davis @ 2022-11-03  1:40 UTC (permalink / raw)
  To: Denys Dmytriyenko, meta-ti; +Cc: Denys Dmytriyenko

On 11/2/22 5:16 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@konsulko.com>
> 
> Include ti-paths.inc so TI_K3_SECDEV_INSTALL_DIR_RECIPE gets defined and
> artifacts are installed in the correct location.
> 
> Cc: Andrew Davis <afd@ti.com>
> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> ---
>   recipes-ti/secdev/ti-k3-secdev_git.bb | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/recipes-ti/secdev/ti-k3-secdev_git.bb b/recipes-ti/secdev/ti-k3-secdev_git.bb
> index 28dbe9e..7196be9 100644
> --- a/recipes-ti/secdev/ti-k3-secdev_git.bb
> +++ b/recipes-ti/secdev/ti-k3-secdev_git.bb
> @@ -4,6 +4,8 @@ SECTION = "devel"
>   LICENSE = "BSD-3-Clause"
>   LIC_FILES_CHKSUM = "file://manifest/k3-secdev-0.2-manifest.html;md5=f632a78870cc64550078d7b3cbac0892"
>   
> +require recipes-ti/includes/ti-paths.inc
> +

Seems like a rather big missing piece, how was this even working at all before?

I'm feeling there should be a better way to use the contents of -native packages
without putting all their content into some hard-coded directory. I wrote all
this in a hurry and just copied what the TI compilers were doing, might be
good to revisit this whole patch for kirkstone/master..

Acked-by: Andrew Davis <afd@ti.com>

>   # Native host tool only
>   COMPATIBLE_MACHINE = "null"
>   COMPATIBLE_MACHINE_class-native = "(.*)"


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-03  1:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 22:16 [dunfell][PATCH 0/2] Fix K3 HS builds when external SECDEV is not provided Denys Dmytriyenko
2022-11-02 22:16 ` [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc Denys Dmytriyenko
2022-11-03  1:40   ` Andrew Davis
2022-11-02 22:16 ` [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined Denys Dmytriyenko
2022-11-03  1:32   ` Andrew Davis

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.