[v3,2/2] u-boot: Move libssl-dev dependency to u-boot-custom

Message ID 20211106121203.3210294-2-Vijaikumar_Kanagarajan@mentor.com
State Superseded, archived
Headers show
Series [v3,1/2] meta-isar: u-boot: Update to 2021.10 | expand

Commit Message

Vijai Kumar K Nov. 6, 2021, 2:12 a.m. UTC
Move the libssl-dependency to u-boot-custom.inc.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc | 3 ---
 meta/recipes-bsp/u-boot/u-boot-custom.inc       | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

Comments

Jan Kiszka Nov. 8, 2021, 8:01 p.m. UTC | #1
On 06.11.21 13:12, Vijai Kumar K wrote:
> Move the libssl-dependency to u-boot-custom.inc.
> 
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>  meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc | 3 ---
>  meta/recipes-bsp/u-boot/u-boot-custom.inc       | 4 +++-
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> index 158c297..f3f822a 100644
> --- a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> +++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> @@ -5,9 +5,6 @@
>  
>  require recipes-bsp/u-boot/u-boot-custom.inc
>  
> -DEBIAN_BUILD_DEPENDS += ", libssl-dev:native"
> -DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> -
>  SRC_URI += " \
>      https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
>      "
> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> index 9984d8c..57d4f36 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> @@ -24,7 +24,9 @@ python() {
>          d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
>  }
>  
> -DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
> +DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, libssl-dev:native"
> +DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> +

It would feel more logical to me to put the :native part under the
cross-compile condition. The outcome will be the same, but :native is a
redundant statement in the native build case.

Jan

>  
>  TEMPLATE_FILES = "debian/control.tmpl"
>  TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
>
vijai kumar Nov. 19, 2021, 6:54 a.m. UTC | #2
On Tue, Nov 9, 2021 at 11:31 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 06.11.21 13:12, Vijai Kumar K wrote:
> > Move the libssl-dependency to u-boot-custom.inc.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> >  meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc | 3 ---
> >  meta/recipes-bsp/u-boot/u-boot-custom.inc       | 4 +++-
> >  2 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> > index 158c297..f3f822a 100644
> > --- a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> > +++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> > @@ -5,9 +5,6 @@
> >
> >  require recipes-bsp/u-boot/u-boot-custom.inc
> >
> > -DEBIAN_BUILD_DEPENDS += ", libssl-dev:native"
> > -DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> > -
> >  SRC_URI += " \
> >      https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
> >      "
> > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > index 9984d8c..57d4f36 100644
> > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > @@ -24,7 +24,9 @@ python() {
> >          d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
> >  }
> >
> > -DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
> > +DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, libssl-dev:native"
> > +DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> > +
>
> It would feel more logical to me to put the :native part under the
> cross-compile condition. The outcome will be the same, but :native is a
> redundant statement in the native build case.

Hi Jan,

Sorry I thought I had replied to this. But it looks like not.

From my testing,
1. libssl-dev:native is needed to build the u-boot image(bin).
2. libssl-dev of host(Debian) is needed only when we cross compile u-boot-tools.

Even though the :native looks redundant, from the perspective of
u-boot, it makes sense.
Also, we now make it depend on cross-compile because tools are always built.

If you see my patches on u-boot refactor[1], the libssl-dev inclusion
will only take place in case we cross
compile tools. (ISAR_CROSS_COMPILE == 1 && U_BOOT_TOOLS_PACKAGE = 1)

[1]: https://groups.google.com/g/isar-users/c/RvvuZ5BRI0U/m/-m8u_mZMAQAJ

Thanks,
Vijai Kumar K



>
> Jan
>
> >
> >  TEMPLATE_FILES = "debian/control.tmpl"
> >  TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
> >
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
>
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/07718b5f-1186-d912-419e-9dac134f9367%40siemens.com.
Jan Kiszka Nov. 21, 2021, 8:20 p.m. UTC | #3
On 19.11.21 17:54, vijai kumar wrote:
> On Tue, Nov 9, 2021 at 11:31 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 06.11.21 13:12, Vijai Kumar K wrote:
>>> Move the libssl-dependency to u-boot-custom.inc.
>>>
>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
>>> ---
>>>  meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc | 3 ---
>>>  meta/recipes-bsp/u-boot/u-boot-custom.inc       | 4 +++-
>>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
>>> index 158c297..f3f822a 100644
>>> --- a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
>>> +++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
>>> @@ -5,9 +5,6 @@
>>>
>>>  require recipes-bsp/u-boot/u-boot-custom.inc
>>>
>>> -DEBIAN_BUILD_DEPENDS += ", libssl-dev:native"
>>> -DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
>>> -
>>>  SRC_URI += " \
>>>      https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
>>>      "
>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>> index 9984d8c..57d4f36 100644
>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>> @@ -24,7 +24,9 @@ python() {
>>>          d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
>>>  }
>>>
>>> -DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
>>> +DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, libssl-dev:native"
>>> +DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
>>> +
>>
>> It would feel more logical to me to put the :native part under the
>> cross-compile condition. The outcome will be the same, but :native is a
>> redundant statement in the native build case.
> 
> Hi Jan,
> 
> Sorry I thought I had replied to this. But it looks like not.
> 
> From my testing,
> 1. libssl-dev:native is needed to build the u-boot image(bin).
> 2. libssl-dev of host(Debian) is needed only when we cross compile u-boot-tools.
> 
> Even though the :native looks redundant, from the perspective of
> u-boot, it makes sense.
> Also, we now make it depend on cross-compile because tools are always built.
> 
> If you see my patches on u-boot refactor[1], the libssl-dev inclusion
> will only take place in case we cross
> compile tools. (ISAR_CROSS_COMPILE == 1 && U_BOOT_TOOLS_PACKAGE = 1)
> 
> [1]: https://groups.google.com/g/isar-users/c/RvvuZ5BRI0U/m/-m8u_mZMAQAJ
> 

Well, thinking about this again, the best way would be to only make this
dependent on whether we are building tools or not. The cross-compile
dependency is just unneeded, will not save any installation in practice
because non-cross means libssl-dev:native == libssl-dev.

Jan
vijai kumar Nov. 21, 2021, 8:37 p.m. UTC | #4
On Mon, Nov 22, 2021 at 11:50 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 19.11.21 17:54, vijai kumar wrote:
> > On Tue, Nov 9, 2021 at 11:31 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> On 06.11.21 13:12, Vijai Kumar K wrote:
> >>> Move the libssl-dependency to u-boot-custom.inc.
> >>>
> >>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >>> ---
> >>>  meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc | 3 ---
> >>>  meta/recipes-bsp/u-boot/u-boot-custom.inc       | 4 +++-
> >>>  2 files changed, 3 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> >>> index 158c297..f3f822a 100644
> >>> --- a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> >>> +++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
> >>> @@ -5,9 +5,6 @@
> >>>
> >>>  require recipes-bsp/u-boot/u-boot-custom.inc
> >>>
> >>> -DEBIAN_BUILD_DEPENDS += ", libssl-dev:native"
> >>> -DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> >>> -
> >>>  SRC_URI += " \
> >>>      https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
> >>>      "
> >>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>> index 9984d8c..57d4f36 100644
> >>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>> @@ -24,7 +24,9 @@ python() {
> >>>          d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
> >>>  }
> >>>
> >>> -DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
> >>> +DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, libssl-dev:native"
> >>> +DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
> >>> +
> >>
> >> It would feel more logical to me to put the :native part under the
> >> cross-compile condition. The outcome will be the same, but :native is a
> >> redundant statement in the native build case.
> >
> > Hi Jan,
> >
> > Sorry I thought I had replied to this. But it looks like not.
> >
> > From my testing,
> > 1. libssl-dev:native is needed to build the u-boot image(bin).
> > 2. libssl-dev of host(Debian) is needed only when we cross compile u-boot-tools.
> >
> > Even though the :native looks redundant, from the perspective of
> > u-boot, it makes sense.
> > Also, we now make it depend on cross-compile because tools are always built.
> >
> > If you see my patches on u-boot refactor[1], the libssl-dev inclusion
> > will only take place in case we cross
> > compile tools. (ISAR_CROSS_COMPILE == 1 && U_BOOT_TOOLS_PACKAGE = 1)
> >
> > [1]: https://groups.google.com/g/isar-users/c/RvvuZ5BRI0U/m/-m8u_mZMAQAJ
> >
>
> Well, thinking about this again, the best way would be to only make this
> dependent on whether we are building tools or not. The cross-compile
> dependency is just unneeded, will not save any installation in practice
> because non-cross means libssl-dev:native == libssl-dev.

I will club the series with DEB_BUILD_PROFILES series and make sure we
bring the latter
first so that we can drop this cross compile dependency smoothly.

Thanks,
Vijai Kumar K

>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux

Patch

diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
index 158c297..f3f822a 100644
--- a/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc
@@ -5,9 +5,6 @@ 
 
 require recipes-bsp/u-boot/u-boot-custom.inc
 
-DEBIAN_BUILD_DEPENDS += ", libssl-dev:native"
-DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
-
 SRC_URI += " \
     https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
     "
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 9984d8c..57d4f36 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -24,7 +24,9 @@  python() {
         d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
 }
 
-DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
+DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, libssl-dev:native"
+DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}"
+
 
 TEMPLATE_FILES = "debian/control.tmpl"
 TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"