All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target
@ 2020-05-13 23:59 Denys Dmytriyenko
  2020-05-14  0:00 ` [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
  2020-05-14  6:30 ` [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Diego Sueiro
  0 siblings, 2 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-13 23:59 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Installing and deploying .bin and .elf shouldn't be mutually exclusive.
There are scenarios where both can be useful - .bin for booting and .elf
for debugging.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../trusted-firmware-a/trusted-firmware-a.inc        | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 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 0804689..3ec8c2c 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,29 +116,39 @@ do_install() {
 
     install -d -m 755 ${D}/firmware
     for atfbin in ${TFA_INSTALL_TARGET}; do
+        processes="0"
         if [ "$atfbin" = "all" ]; then
             # Target all is not handled by default
             bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
             bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
             bberror "rewrite or turn off do_install"
             exit 1
-        elif [ -f $BUILD_PLAT/$atfbin.bin ]; then
+        fi
+
+        if [ -f $BUILD_PLAT/$atfbin.bin ]; then
             echo "Install $atfbin.bin"
             install -m 0644 $BUILD_PLAT/$atfbin.bin \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
-        elif [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
+            processes="1"
+        fi
+        if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
             echo "Install $atfbin.elf"
             install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
-        elif [ -f $BUILD_PLAT/$atfbin ]; then
+            processes="1"
+        fi
+        if [ -f $BUILD_PLAT/$atfbin ]; then
             echo "Install $atfbin"
             install -m 0644 $BUILD_PLAT/$atfbin \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}
-        elif [ "$atfbin" = "dtbs" ]; then
+            processes="1"
+        fi
+
+        if [ "$atfbin" = "dtbs" ]; then
             echo "dtbs install, skipped"
         elif [ -f ${B}/tools/$atfbin/$atfbin ]; then
             echo "Tools $atfbin install, skipped"
-        else
+        elif [ "$processed" = "0" ]; then
             bberror "Unsupported TFA_INSTALL_TARGET target $atfbin"
             exit 1
         fi
-- 
2.7.4


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

* [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names
  2020-05-13 23:59 [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Denys Dmytriyenko
@ 2020-05-14  0:00 ` Denys Dmytriyenko
  2020-05-14  6:31   ` [meta-arm] " Diego Sueiro
  2020-05-14  6:30 ` [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Diego Sueiro
  1 sibling, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-14  0:00 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Some platforms expect canonical names, like bl31.bin, instead of bl31-<plat>.bin
Provide symlinks for those as well.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 3 +++
 1 file changed, 3 insertions(+)

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 3ec8c2c..2b6cf0a 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
@@ -129,18 +129,21 @@ do_install() {
             echo "Install $atfbin.bin"
             install -m 0644 $BUILD_PLAT/$atfbin.bin \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
+            ln -sf $atfbin-${TFA_PLATFORM}.bin ${D}/firmware/$atfbin.bin
             processes="1"
         fi
         if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
             echo "Install $atfbin.elf"
             install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
+            ln -sf $atfbin-${TFA_PLATFORM}.elf ${D}/firmware/$atfbin.elf
             processes="1"
         fi
         if [ -f $BUILD_PLAT/$atfbin ]; then
             echo "Install $atfbin"
             install -m 0644 $BUILD_PLAT/$atfbin \
                 ${D}/firmware/$atfbin-${TFA_PLATFORM}
+            ln -sf $atfbin-${TFA_PLATFORM} ${D}/firmware/$atfbin
             processes="1"
         fi
 
-- 
2.7.4


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

* Re: [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target
  2020-05-13 23:59 [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Denys Dmytriyenko
  2020-05-14  0:00 ` [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
@ 2020-05-14  6:30 ` Diego Sueiro
  1 sibling, 0 replies; 5+ messages in thread
From: Diego Sueiro @ 2020-05-14  6:30 UTC (permalink / raw)
  To: denis, meta-arm; +Cc: Denys Dmytriyenko

The patch itself looks good to me but I haven't tested it (a.k.a build & run).

> -----Original Message-----
> From: meta-arm@lists.yoctoproject.org <meta-arm@lists.yoctoproject.org>
> On Behalf Of Denys Dmytriyenko via lists.yoctoproject.org
> Sent: 14 May 2020 01:00
> To: meta-arm@lists.yoctoproject.org
> Cc: Denys Dmytriyenko <denys@ti.com>
> Subject: [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple
> variants of the target
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> Installing and deploying .bin and .elf shouldn't be mutually exclusive.
> There are scenarios where both can be useful - .bin for booting and .elf for
> debugging.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>

> ---
>  .../trusted-firmware-a/trusted-firmware-a.inc        | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 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 0804689..3ec8c2c 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,29 +116,39 @@ do_install() {
>
>      install -d -m 755 ${D}/firmware
>      for atfbin in ${TFA_INSTALL_TARGET}; do
> +        processes="0"
>          if [ "$atfbin" = "all" ]; then
>              # Target all is not handled by default
>              bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
>              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
>              bberror "rewrite or turn off do_install"
>              exit 1
> -        elif [ -f $BUILD_PLAT/$atfbin.bin ]; then
> +        fi
> +
> +        if [ -f $BUILD_PLAT/$atfbin.bin ]; then
>              echo "Install $atfbin.bin"
>              install -m 0644 $BUILD_PLAT/$atfbin.bin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> -        elif [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
> +            processes="1"
> +        fi
> +        if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
>              echo "Install $atfbin.elf"
>              install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> -        elif [ -f $BUILD_PLAT/$atfbin ]; then
> +            processes="1"
> +        fi
> +        if [ -f $BUILD_PLAT/$atfbin ]; then
>              echo "Install $atfbin"
>              install -m 0644 $BUILD_PLAT/$atfbin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}
> -        elif [ "$atfbin" = "dtbs" ]; then
> +            processes="1"
> +        fi
> +
> +        if [ "$atfbin" = "dtbs" ]; then
>              echo "dtbs install, skipped"
>          elif [ -f ${B}/tools/$atfbin/$atfbin ]; then
>              echo "Tools $atfbin install, skipped"
> -        else
> +        elif [ "$processed" = "0" ]; then
>              bberror "Unsupported TFA_INSTALL_TARGET target $atfbin"
>              exit 1
>          fi
> --
> 2.7.4

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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

* Re: [meta-arm] [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names
  2020-05-14  0:00 ` [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
@ 2020-05-14  6:31   ` Diego Sueiro
  0 siblings, 0 replies; 5+ messages in thread
From: Diego Sueiro @ 2020-05-14  6:31 UTC (permalink / raw)
  To: denis, meta-arm; +Cc: Denys Dmytriyenko, nd

The patch itself looks good to me but I haven't tested it (a.k.a build & run).

> -----Original Message-----
> From: meta-arm@lists.yoctoproject.org <meta-arm@lists.yoctoproject.org>
> On Behalf Of Denys Dmytriyenko via lists.yoctoproject.org
> Sent: 14 May 2020 01:00
> To: meta-arm@lists.yoctoproject.org
> Cc: Denys Dmytriyenko <denys@ti.com>
> Subject: [meta-arm] [PATCH 2/2] trusted-firmware-a: provide symlinks for
> canonical names
> 
> From: Denys Dmytriyenko <denys@ti.com>
> 
> Some platforms expect canonical names, like bl31.bin, instead of bl31-
> <plat>.bin Provide symlinks for those as well.
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>

> ---
>  meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> 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 3ec8c2c..2b6cf0a 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
> @@ -129,18 +129,21 @@ do_install() {
>              echo "Install $atfbin.bin"
>              install -m 0644 $BUILD_PLAT/$atfbin.bin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> +            ln -sf $atfbin-${TFA_PLATFORM}.bin
> + ${D}/firmware/$atfbin.bin
>              processes="1"
>          fi
>          if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
>              echo "Install $atfbin.elf"
>              install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> +            ln -sf $atfbin-${TFA_PLATFORM}.elf
> + ${D}/firmware/$atfbin.elf
>              processes="1"
>          fi
>          if [ -f $BUILD_PLAT/$atfbin ]; then
>              echo "Install $atfbin"
>              install -m 0644 $BUILD_PLAT/$atfbin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}
> +            ln -sf $atfbin-${TFA_PLATFORM} ${D}/firmware/$atfbin
>              processes="1"
>          fi
> 
> --
> 2.7.4


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

* Re: [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target
       [not found] <160EBBFB41813A0F.24818@lists.yoctoproject.org>
@ 2020-05-14  0:06 ` Denys Dmytriyenko
  0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-05-14  0:06 UTC (permalink / raw)
  To: meta-arm

Sorry, 2 more patches to be applied on top of the first 2 of mine.

I can also re-send as 4-patch series, if needed.


On Wed, May 13, 2020 at 07:59:59PM -0400, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> Installing and deploying .bin and .elf shouldn't be mutually exclusive.
> There are scenarios where both can be useful - .bin for booting and .elf
> for debugging.
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../trusted-firmware-a/trusted-firmware-a.inc        | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 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 0804689..3ec8c2c 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,29 +116,39 @@ do_install() {
>  
>      install -d -m 755 ${D}/firmware
>      for atfbin in ${TFA_INSTALL_TARGET}; do
> +        processes="0"
>          if [ "$atfbin" = "all" ]; then
>              # Target all is not handled by default
>              bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
>              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
>              bberror "rewrite or turn off do_install"
>              exit 1
> -        elif [ -f $BUILD_PLAT/$atfbin.bin ]; then
> +        fi
> +
> +        if [ -f $BUILD_PLAT/$atfbin.bin ]; then
>              echo "Install $atfbin.bin"
>              install -m 0644 $BUILD_PLAT/$atfbin.bin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> -        elif [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
> +            processes="1"
> +        fi
> +        if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
>              echo "Install $atfbin.elf"
>              install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> -        elif [ -f $BUILD_PLAT/$atfbin ]; then
> +            processes="1"
> +        fi
> +        if [ -f $BUILD_PLAT/$atfbin ]; then
>              echo "Install $atfbin"
>              install -m 0644 $BUILD_PLAT/$atfbin \
>                  ${D}/firmware/$atfbin-${TFA_PLATFORM}
> -        elif [ "$atfbin" = "dtbs" ]; then
> +            processes="1"
> +        fi
> +
> +        if [ "$atfbin" = "dtbs" ]; then
>              echo "dtbs install, skipped"
>          elif [ -f ${B}/tools/$atfbin/$atfbin ]; then
>              echo "Tools $atfbin install, skipped"
> -        else
> +        elif [ "$processed" = "0" ]; then
>              bberror "Unsupported TFA_INSTALL_TARGET target $atfbin"
>              exit 1
>          fi
> -- 
> 2.7.4
> 

> 


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

end of thread, other threads:[~2020-05-14  6:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 23:59 [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Denys Dmytriyenko
2020-05-14  0:00 ` [PATCH 2/2] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
2020-05-14  6:31   ` [meta-arm] " Diego Sueiro
2020-05-14  6:30 ` [meta-arm] [PATCH 1/2] trusted-firmware-a: install/deploy multiple variants of the target Diego Sueiro
     [not found] <160EBBFB41813A0F.24818@lists.yoctoproject.org>
2020-05-14  0:06 ` Denys Dmytriyenko

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.