Fix K3 HS builds when external SECDEV is not provided
cover Fix K3 HS builds when external SECDEV is not provided
From: Denys Dmytriyenko <[email protected]>
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(-)
Signature · 1 line
2.7.4
PATCH 1/2 ti-k3-secdev: include ti-paths.inc
From: Denys Dmytriyenko <[email protected]>
Include ti-paths.inc so TI_K3_SECDEV_INSTALL_DIR_RECIPE gets defined and artifacts are installed in the correct location.
--- recipes-ti/secdev/ti-k3-secdev_git.bb | 2 ++ 1 file changed, 2 insertions(+)
recipes-ti/secdev/ti-k3-secdev_git.bb +2 -0
@@ -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 = "(.*)"
Signature · 1 line
2.7.4
Re: [dunfell][PATCH 1/2] ti-k3-secdev: include ti-paths.inc
Quoted 16 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
Include ti-paths.inc so
TI_K3_SECDEV_INSTALL_DIR_RECIPEgets defined and artifacts are installed in the correct location.Cc Andrew Davis <[email protected]>Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-ti/secdev/ti-k3-secdev_git.bb | 2 ++ 1 file changed, 2 insertions(+)recipes-ti/secdev/ti-k3-secdev_git.bb +0
-0
recipes-ti/secdev/ti-k3-secdev_git.bb SECTION = "devel" · line 8
Quoted 5 lines
recipes-ti/secdev/ti-k3-secdev_git.bb +2
-0@@ -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..
Quoted 3 lines
recipes-ti/secdev/ti-k3-secdev_git.bb +0
-0# Native host tool only COMPATIBLE_MACHINE = "null" COMPATIBLE_MACHINE_class-native = "(.*)"
PATCH 2/2 ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined
In reply to Denys DmytriyenkoFrom: Denys Dmytriyenko <[email protected]>
Otherwise undefined variable is returned literally as ${TI_SECURE_DEV_PKG_K3} and the condition won't work.
--- recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +1 -1
@@ -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"
Signature · 1 line
2.7.4
Re: [dunfell][PATCH 2/2] ti-sci-fw: use getVar() to check if TI_SECURE_DEV_PKG_K3 is defined
Quoted 16 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
Otherwise undefined variable is returned literally as ${TI_SECURE_DEV_PKG_K3} and the condition won't work.
Cc Andrew Davis <[email protected]>Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +0
-0
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb COMPATIBLE_MACHINE_aarch64 = "null" · line 25
Quoted 7 lines
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +1
-1@@ -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?
[0] https://patchwork.yoctoproject.org/project/ti/patch/[email protected]/
Quoted 1 line
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +0
-0SYSFW_SOC ?= "unknown"