Skip to contentSkip to conversation

trusted-firmware-a: fiptool build using BUILD_CFLAGS and BUILD_LDFLAGS

PATCH In review Diego Sueiro 4 participants 7 messages Jun 11, 2020 – Jun 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trusted-firmware-a: fiptool build using BUILD_CFLAGS and BUILD_LDFLAGS

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

---
 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +2 -3
index 6f64773..e57d3fe 100644
@@ -116,9 +116,8 @@ do_compile() {
     cd ${S}
 
     # These changes are needed to have the fiptool compiling and executing properly
-    sed -i '/^LDLIBS/ s,$, \-L${RECIPE_SYSROOT_NATIVE}${libdir},' ${S}/tools/fiptool/Makefile
-    sed -i '/^INCLUDE_PATHS/ s,$, \-I${RECIPE_SYSROOT_NATIVE}${includedir},' ${S}/tools/fiptool/Makefile
-    export LD_LIBRARY_PATH=${STAGING_DIR_NATIVE}${libdir}:$LD_LIBRARY_PATH
+    sed -i '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile
+    sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile
 
     oe_runmake ${TFA_BUILD_TARGET}
 }
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Pulled into master.

Thanks,
Jon

Quoted 25 lines
---
 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +2 -3
index 6f64773..e57d3fe 100644
@@ -116,9 +116,8 @@ do_compile() {
     cd ${S}
 
     # These changes are needed to have the fiptool compiling and executing properly
-    sed -i '/^LDLIBS/ s,$, \-L${RECIPE_SYSROOT_NATIVE}${libdir},' ${S}/tools/fiptool/Makefile
-    sed -i '/^INCLUDE_PATHS/ s,$, \-I${RECIPE_SYSROOT_NATIVE}${includedir},' ${S}/tools/fiptool/Makefile
-    export LD_LIBRARY_PATH=${STAGING_DIR_NATIVE}${libdir}:$LD_LIBRARY_PATH
+    sed -i '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile
+    sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile
 
     oe_runmake ${TFA_BUILD_TARGET}
 }
Signature · 1 line
2.7.4
#2 lore raw
Quoted 10 lines · Jon Mason
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Pulled into master.

Thanks.

Could you please backport it to dunfell?

#3 lore raw
Quoted 11 lines · Diego Sueiro
Quoted 9 lines · Jon Mason
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Quoted 5 lines
Quoted 1 line

Pulled into master.

Thanks.

Could you please backport it to dunfell?

Yes, this seems like a good bug fix. I just want to make sure that Denys and Joshua are aware, since it might break them.

Thanks,
Jon

Quoted 1 line
#4 lore raw
Quoted 10 lines · Jon Mason
Quoted 9 lines · Diego Sueiro
Quoted 7 lines · Jon Mason
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Pulled into master.

Thanks.

Could you please backport it to dunfell?

Yes, this seems like a good bug fix. I just want to make sure that Denys and Joshua are aware, since it might break them.

Thanks for the heads up. I tested this on master with rock-pi-4 and qemuarm-secureboot, and everything looks OK.

Quoted 6 lines

Thanks,
Jon

Quoted 1 line
#5 lore raw
Quoted 13 lines · Joshua Watt
Quoted 11 lines · Jon Mason
Quoted 10 lines · Diego Sueiro
Quoted 8 lines · Jon Mason
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Pulled into master.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thanks.

Could you please backport it to dunfell?

Yes, this seems like a good bug fix. I just want to make sure that Denys and Joshua are aware, since it might break them.

Thanks for the heads up. I tested this on master with rock-pi-4 and qemuarm-secureboot, and everything looks OK.

I also tested this change against TI platforms and seems fine. Thanks.

Signature · 1 line
Denys
#6 lore raw
In reply to Diego Sueiro
Quoted 11 lines · Diego Sueiro
Quoted 9 lines · Jon Mason
Quoted 6 lines · Diego Sueiro

Since the TF-A fiptool is native tool we should be using the BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888

Quoted 5 lines
Quoted 1 line

Pulled into master.

Thanks.

Could you please backport it to dunfell?

Done.

Quoted 1 line