[meta-arm] trusted-firmware-a: fiptool build using BUILD_CFLAGS and BUILD_LDFLAGS

Submitted by Diego Sueiro on June 11, 2020, 2:17 p.m. | Patch ID: 173477

Details

Message ID 1591885024-1856-1-git-send-email-diego.sueiro@arm.com
State New
Headers show

Commit Message

Diego Sueiro June 11, 2020, 2:17 p.m.
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
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
index 6f64773..e57d3fe 100644
--- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
@@ -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}
 }

Comments

Jon Mason June 12, 2020, 12:45 p.m.
On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
> 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
> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>

Pulled into master.

Thanks,
Jon

> ---
>  meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> index 6f64773..e57d3fe 100644
> --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> @@ -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}
>  }
> -- 
> 2.7.4
> 

>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#649): https://lists.yoctoproject.org/g/meta-arm/message/649
Mute This Topic: https://lists.yoctoproject.org/mt/74819129/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Diego Sueiro June 12, 2020, 12:54 p.m.
On Fri, Jun 12, 2020 at 01:45 PM, Jon Mason wrote:

>
> On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
> > 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
> > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> 
> Pulled into master.

Thanks.

Could you please backport it to dunfell?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#650): https://lists.yoctoproject.org/g/meta-arm/message/650
Mute This Topic: https://lists.yoctoproject.org/mt/74819129/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Jon Mason June 12, 2020, 1 p.m.
On Fri, Jun 12, 2020 at 05:54:07AM -0700, Diego Sueiro wrote:
> On Fri, Jun 12, 2020 at 01:45 PM, Jon Mason wrote:
> 
> >
> > On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
> > > 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
> > > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > 
> > 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


>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#651): https://lists.yoctoproject.org/g/meta-arm/message/651
Mute This Topic: https://lists.yoctoproject.org/mt/74819129/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Joshua Watt June 12, 2020, 3:45 p.m.
On 6/12/20 8:00 AM, Jon Mason wrote:
> On Fri, Jun 12, 2020 at 05:54:07AM -0700, Diego Sueiro wrote:
>> On Fri, Jun 12, 2020 at 01:45 PM, Jon Mason wrote:
>>
>>> On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
>>>> 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
>>>> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>>> 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.

>
> Thanks,
> Jon
>
>
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#653): https://lists.yoctoproject.org/g/meta-arm/message/653
Mute This Topic: https://lists.yoctoproject.org/mt/74819129/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Denys Dmytriyenko June 12, 2020, 6:40 p.m.
On Fri, Jun 12, 2020 at 10:45:20AM -0500, Joshua Watt wrote:
> 
> On 6/12/20 8:00 AM, Jon Mason wrote:
> >On Fri, Jun 12, 2020 at 05:54:07AM -0700, Diego Sueiro wrote:
> >>On Fri, Jun 12, 2020 at 01:45 PM, Jon Mason wrote:
> >>
> >>>On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
> >>>>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
> >>>>Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> >>>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.

I also tested this change against TI platforms and seems fine. Thanks.
Jon Mason June 15, 2020, 12:57 p.m.
On Fri, Jun 12, 2020 at 05:54:07AM -0700, Diego Sueiro wrote:
> On Fri, Jun 12, 2020 at 01:45 PM, Jon Mason wrote:
> 
> >
> > On Thu, Jun 11, 2020 at 03:17:04PM +0100, Diego Sueiro wrote:
> > > 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
> > > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > 
> > Pulled into master.
> 
> Thanks.
> 
> Could you please backport it to dunfell?

Done.

>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#662): https://lists.yoctoproject.org/g/meta-arm/message/662
Mute This Topic: https://lists.yoctoproject.org/mt/74819129/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-