[v2,3/4] meta: u-boot: Prepare for newer versions

Message ID 20211122152607.2125422-4-Vijaikumar_Kanagarajan@mentor.com
State Superseded, archived
Headers show
Series U-boot refactor and uprevision | expand

Commit Message

Vijai Kumar K Nov. 22, 2021, 5:26 a.m. UTC
Newer versions of u-boot require libssl-dev:native for compilation.
It also needs libssl-dev of the host architecture for cross compilation
of tools.

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

Comments

Quirin Gylstorff Nov. 22, 2021, 11:54 p.m. UTC | #1
Hi,

On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> Newer versions of u-boot require libssl-dev:native for compilation.
> It also needs libssl-dev of the host architecture for cross compilation
> of tools.
> 
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> index 5198809..cfae0e2 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> @@ -41,7 +41,9 @@ python() {
>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
>   }
>   
> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"

Is there are reason why you didn't use `Build-Depends syntax extension` 
from[1]?


[1]: https://wiki.debian.org/BuildProfileSpec


Quirin
>   
>   TEMPLATE_FILES = "debian/control.tmpl"
>   TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
>
vijai kumar Nov. 24, 2021, 8:42 p.m. UTC | #2
On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
<quirin.gylstorff@siemens.com> wrote:
>
> Hi,
>
> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> > Newer versions of u-boot require libssl-dev:native for compilation.
> > It also needs libssl-dev of the host architecture for cross compilation
> > of tools.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> >   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > index 5198809..cfae0e2 100644
> > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > @@ -41,7 +41,9 @@ python() {
> >               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
> >   }
> >
> > -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
>
> Is there are reason why you didn't use `Build-Depends syntax extension`
> from[1]?
>
Hi Quirin,

Yes. There was. The previous version of patch depends on
ISAR_CROSS_COMPILE as well.

Guess there is nothing stopping us now. But, wondering if we can start
introducing it via some
example app with some documentation so that basic users are not
puzzled on seeing that line in
a recipe.

Also, we could define a whole new variable to help recipe writers to
define profiles and seamlessly
use them without the need to explicitly export DEB_BUILD_PROFILES in
the recipe's dpkg_runbuild

Now that we are serious enough, we should probably take care of your
earlier comment
as well on following the standard. So that we don't conflict with
Debian's predefined variables in case
we decided to build a package fetched from apt:// and wanted to make
use of its profile settings.

Still need to look further but these are my initial thoughts. I could
probably send some patches for review in
coming days.

For now, maybe we should call it and use pkg.uboot.tools instead of
tools here so that we don't
find something in that implementation that requires us to change this
in future, possibly breaking
u-boot / or the need to provide compatibility.

Thoughts?

Thanks,
Vijai Kumar K


>
> [1]: https://wiki.debian.org/BuildProfileSpec
>
>
> Quirin
> >
> >   TEMPLATE_FILES = "debian/control.tmpl"
> >   TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
> >
>
> --
> 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/8319aef1-420a-034e-9152-b0c3c8c3536a%40siemens.com.
vijai kumar Nov. 25, 2021, 6:27 a.m. UTC | #3
On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
<vijaikumar.kanagarajan@gmail.com> wrote:
>
> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
> <quirin.gylstorff@siemens.com> wrote:
> >
> > Hi,
> >
> > On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> > > Newer versions of u-boot require libssl-dev:native for compilation.
> > > It also needs libssl-dev of the host architecture for cross compilation
> > > of tools.
> > >
> > > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > > ---
> > >   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
> > >   1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > > index 5198809..cfae0e2 100644
> > > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > > @@ -41,7 +41,9 @@ python() {
> > >               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
> > >   }
> > >
> > > -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
> >
> > Is there are reason why you didn't use `Build-Depends syntax extension`
> > from[1]?
> >
> Hi Quirin,
>
> Yes. There was. The previous version of patch depends on
> ISAR_CROSS_COMPILE as well.
>
> Guess there is nothing stopping us now. But, wondering if we can start
> introducing it via some
> example app with some documentation so that basic users are not
> puzzled on seeing that line in
> a recipe.
>
> Also, we could define a whole new variable to help recipe writers to
> define profiles and seamlessly
> use them without the need to explicitly export DEB_BUILD_PROFILES in
> the recipe's dpkg_runbuild
>
> Now that we are serious enough, we should probably take care of your
> earlier comment
> as well on following the standard. So that we don't conflict with
> Debian's predefined variables in case
> we decided to build a package fetched from apt:// and wanted to make
> use of its profile settings.
>
> Still need to look further but these are my initial thoughts. I could
> probably send some patches for review in
> coming days.
>
> For now, maybe we should call it and use pkg.uboot.tools instead of
> tools here so that we don't
> find something in that implementation that requires us to change this
> in future, possibly breaking
> u-boot / or the need to provide compatibility.
>
> Thoughts?

OTOH, This could still go in. Since the design I am thinking of is not
finalized and might take some discussions in the list, there is no
point in holding this back.


Thanks,
Vijai Kumar K

>
> Thanks,
> Vijai Kumar K
>
>
> >
> > [1]: https://wiki.debian.org/BuildProfileSpec
> >
> >
> > Quirin
> > >
> > >   TEMPLATE_FILES = "debian/control.tmpl"
> > >   TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
> > >
> >
> > --
> > 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/8319aef1-420a-034e-9152-b0c3c8c3536a%40siemens.com.
Jan Kiszka Nov. 25, 2021, 6:34 a.m. UTC | #4
On 25.11.21 17:27, vijai kumar wrote:
> On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
> <vijaikumar.kanagarajan@gmail.com> wrote:
>>
>> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
>> <quirin.gylstorff@siemens.com> wrote:
>>>
>>> Hi,
>>>
>>> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
>>>> Newer versions of u-boot require libssl-dev:native for compilation.
>>>> It also needs libssl-dev of the host architecture for cross compilation
>>>> of tools.
>>>>
>>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
>>>> ---
>>>>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>> index 5198809..cfae0e2 100644
>>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>> @@ -41,7 +41,9 @@ python() {
>>>>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
>>>>   }
>>>>
>>>> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
>>>
>>> Is there are reason why you didn't use `Build-Depends syntax extension`
>>> from[1]?
>>>
>> Hi Quirin,
>>
>> Yes. There was. The previous version of patch depends on
>> ISAR_CROSS_COMPILE as well.
>>
>> Guess there is nothing stopping us now. But, wondering if we can start
>> introducing it via some
>> example app with some documentation so that basic users are not
>> puzzled on seeing that line in
>> a recipe.
>>
>> Also, we could define a whole new variable to help recipe writers to
>> define profiles and seamlessly
>> use them without the need to explicitly export DEB_BUILD_PROFILES in
>> the recipe's dpkg_runbuild
>>
>> Now that we are serious enough, we should probably take care of your
>> earlier comment
>> as well on following the standard. So that we don't conflict with
>> Debian's predefined variables in case
>> we decided to build a package fetched from apt:// and wanted to make
>> use of its profile settings.
>>
>> Still need to look further but these are my initial thoughts. I could
>> probably send some patches for review in
>> coming days.
>>
>> For now, maybe we should call it and use pkg.uboot.tools instead of
>> tools here so that we don't
>> find something in that implementation that requires us to change this
>> in future, possibly breaking
>> u-boot / or the need to provide compatibility.
>>
>> Thoughts?
> 
> OTOH, This could still go in. Since the design I am thinking of is not
> finalized and might take some discussions in the list, there is no
> point in holding this back.
> 

I think Quirin was just asking for

DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
	libssl-dev:native, libssl-dev <tools>"

rather than using bitbake logic. If that also works, would be more elegant.

Jan
vijai kumar Nov. 25, 2021, 8:07 p.m. UTC | #5
On Thu, Nov 25, 2021 at 10:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 25.11.21 17:27, vijai kumar wrote:
> > On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
> > <vijaikumar.kanagarajan@gmail.com> wrote:
> >>
> >> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
> >> <quirin.gylstorff@siemens.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> >>>> Newer versions of u-boot require libssl-dev:native for compilation.
> >>>> It also needs libssl-dev of the host architecture for cross compilation
> >>>> of tools.
> >>>>
> >>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >>>> ---
> >>>>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
> >>>>   1 file changed, 3 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>> index 5198809..cfae0e2 100644
> >>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>> @@ -41,7 +41,9 @@ python() {
> >>>>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
> >>>>   }
> >>>>
> >>>> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
> >>>
> >>> Is there are reason why you didn't use `Build-Depends syntax extension`
> >>> from[1]?
> >>>
> >> Hi Quirin,
> >>
> >> Yes. There was. The previous version of patch depends on
> >> ISAR_CROSS_COMPILE as well.
> >>
> >> Guess there is nothing stopping us now. But, wondering if we can start
> >> introducing it via some
> >> example app with some documentation so that basic users are not
> >> puzzled on seeing that line in
> >> a recipe.
> >>
> >> Also, we could define a whole new variable to help recipe writers to
> >> define profiles and seamlessly
> >> use them without the need to explicitly export DEB_BUILD_PROFILES in
> >> the recipe's dpkg_runbuild
> >>
> >> Now that we are serious enough, we should probably take care of your
> >> earlier comment
> >> as well on following the standard. So that we don't conflict with
> >> Debian's predefined variables in case
> >> we decided to build a package fetched from apt:// and wanted to make
> >> use of its profile settings.
> >>
> >> Still need to look further but these are my initial thoughts. I could
> >> probably send some patches for review in
> >> coming days.
> >>
> >> For now, maybe we should call it and use pkg.uboot.tools instead of
> >> tools here so that we don't
> >> find something in that implementation that requires us to change this
> >> in future, possibly breaking
> >> u-boot / or the need to provide compatibility.
> >>
> >> Thoughts?
> >
> > OTOH, This could still go in. Since the design I am thinking of is not
> > finalized and might take some discussions in the list, there is no
> > point in holding this back.
> >
>
> I think Quirin was just asking for
>
> DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
>         libssl-dev:native, libssl-dev <tools>"
>
> rather than using bitbake logic. If that also works, would be more elegant.

Yes, that also works. But just a bit difficult to read for normal users.

A framework for DEB_BUILD_PROFILES for isar would be helpful I guess,
like I mentioned above.
Will see if I can convert my thoughts to some patches sometime soon.

Thanks,
VIjai Kumar K

>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
Jan Kiszka Nov. 25, 2021, 8:29 p.m. UTC | #6
On 26.11.21 07:07, vijai kumar wrote:
> On Thu, Nov 25, 2021 at 10:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 25.11.21 17:27, vijai kumar wrote:
>>> On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
>>> <vijaikumar.kanagarajan@gmail.com> wrote:
>>>>
>>>> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
>>>> <quirin.gylstorff@siemens.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
>>>>>> Newer versions of u-boot require libssl-dev:native for compilation.
>>>>>> It also needs libssl-dev of the host architecture for cross compilation
>>>>>> of tools.
>>>>>>
>>>>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
>>>>>> ---
>>>>>>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
>>>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>>>> index 5198809..cfae0e2 100644
>>>>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
>>>>>> @@ -41,7 +41,9 @@ python() {
>>>>>>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
>>>>>>   }
>>>>>>
>>>>>> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
>>>>>
>>>>> Is there are reason why you didn't use `Build-Depends syntax extension`
>>>>> from[1]?
>>>>>
>>>> Hi Quirin,
>>>>
>>>> Yes. There was. The previous version of patch depends on
>>>> ISAR_CROSS_COMPILE as well.
>>>>
>>>> Guess there is nothing stopping us now. But, wondering if we can start
>>>> introducing it via some
>>>> example app with some documentation so that basic users are not
>>>> puzzled on seeing that line in
>>>> a recipe.
>>>>
>>>> Also, we could define a whole new variable to help recipe writers to
>>>> define profiles and seamlessly
>>>> use them without the need to explicitly export DEB_BUILD_PROFILES in
>>>> the recipe's dpkg_runbuild
>>>>
>>>> Now that we are serious enough, we should probably take care of your
>>>> earlier comment
>>>> as well on following the standard. So that we don't conflict with
>>>> Debian's predefined variables in case
>>>> we decided to build a package fetched from apt:// and wanted to make
>>>> use of its profile settings.
>>>>
>>>> Still need to look further but these are my initial thoughts. I could
>>>> probably send some patches for review in
>>>> coming days.
>>>>
>>>> For now, maybe we should call it and use pkg.uboot.tools instead of
>>>> tools here so that we don't
>>>> find something in that implementation that requires us to change this
>>>> in future, possibly breaking
>>>> u-boot / or the need to provide compatibility.
>>>>
>>>> Thoughts?
>>>
>>> OTOH, This could still go in. Since the design I am thinking of is not
>>> finalized and might take some discussions in the list, there is no
>>> point in holding this back.
>>>
>>
>> I think Quirin was just asking for
>>
>> DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
>>         libssl-dev:native, libssl-dev <tools>"
>>
>> rather than using bitbake logic. If that also works, would be more elegant.
> 
> Yes, that also works. But just a bit difficult to read for normal users.

It's more Debian-style, thus to be preferred according to Isar principles.

Jan
vijai kumar Nov. 25, 2021, 8:33 p.m. UTC | #7
On Fri, Nov 26, 2021 at 11:59 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 26.11.21 07:07, vijai kumar wrote:
> > On Thu, Nov 25, 2021 at 10:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> On 25.11.21 17:27, vijai kumar wrote:
> >>> On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
> >>> <vijaikumar.kanagarajan@gmail.com> wrote:
> >>>>
> >>>> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
> >>>> <quirin.gylstorff@siemens.com> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> >>>>>> Newer versions of u-boot require libssl-dev:native for compilation.
> >>>>>> It also needs libssl-dev of the host architecture for cross compilation
> >>>>>> of tools.
> >>>>>>
> >>>>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >>>>>> ---
> >>>>>>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
> >>>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>>>> index 5198809..cfae0e2 100644
> >>>>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> >>>>>> @@ -41,7 +41,9 @@ python() {
> >>>>>>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
> >>>>>>   }
> >>>>>>
> >>>>>> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
> >>>>>
> >>>>> Is there are reason why you didn't use `Build-Depends syntax extension`
> >>>>> from[1]?
> >>>>>
> >>>> Hi Quirin,
> >>>>
> >>>> Yes. There was. The previous version of patch depends on
> >>>> ISAR_CROSS_COMPILE as well.
> >>>>
> >>>> Guess there is nothing stopping us now. But, wondering if we can start
> >>>> introducing it via some
> >>>> example app with some documentation so that basic users are not
> >>>> puzzled on seeing that line in
> >>>> a recipe.
> >>>>
> >>>> Also, we could define a whole new variable to help recipe writers to
> >>>> define profiles and seamlessly
> >>>> use them without the need to explicitly export DEB_BUILD_PROFILES in
> >>>> the recipe's dpkg_runbuild
> >>>>
> >>>> Now that we are serious enough, we should probably take care of your
> >>>> earlier comment
> >>>> as well on following the standard. So that we don't conflict with
> >>>> Debian's predefined variables in case
> >>>> we decided to build a package fetched from apt:// and wanted to make
> >>>> use of its profile settings.
> >>>>
> >>>> Still need to look further but these are my initial thoughts. I could
> >>>> probably send some patches for review in
> >>>> coming days.
> >>>>
> >>>> For now, maybe we should call it and use pkg.uboot.tools instead of
> >>>> tools here so that we don't
> >>>> find something in that implementation that requires us to change this
> >>>> in future, possibly breaking
> >>>> u-boot / or the need to provide compatibility.
> >>>>
> >>>> Thoughts?
> >>>
> >>> OTOH, This could still go in. Since the design I am thinking of is not
> >>> finalized and might take some discussions in the list, there is no
> >>> point in holding this back.
> >>>
> >>
> >> I think Quirin was just asking for
> >>
> >> DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
> >>         libssl-dev:native, libssl-dev <tools>"
> >>
> >> rather than using bitbake logic. If that also works, would be more elegant.
> >
> > Yes, that also works. But just a bit difficult to read for normal users.
>
> It's more Debian-style, thus to be preferred according to Isar principles.

Ok.  v3 coming up. It should be on the mailing list anytime now.

Thanks,
Vijai Kumar K

>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
vijai kumar Nov. 25, 2021, 8:56 p.m. UTC | #8
On Fri, Nov 26, 2021 at 11:37 AM vijai kumar
<vijaikumar.kanagarajan@gmail.com> wrote:
>
> On Thu, Nov 25, 2021 at 10:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >
> > On 25.11.21 17:27, vijai kumar wrote:
> > > On Thu, Nov 25, 2021 at 12:12 PM vijai kumar
> > > <vijaikumar.kanagarajan@gmail.com> wrote:
> > >>
> > >> On Tue, Nov 23, 2021 at 3:24 PM Gylstorff Quirin
> > >> <quirin.gylstorff@siemens.com> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> On 11/22/21 4:26 PM, Vijai Kumar K wrote:
> > >>>> Newer versions of u-boot require libssl-dev:native for compilation.
> > >>>> It also needs libssl-dev of the host architecture for cross compilation
> > >>>> of tools.
> > >>>>
> > >>>> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > >>>> ---
> > >>>>   meta/recipes-bsp/u-boot/u-boot-custom.inc | 4 +++-
> > >>>>   1 file changed, 3 insertions(+), 1 deletion(-)
> > >>>>
> > >>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > >>>> index 5198809..cfae0e2 100644
> > >>>> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > >>>> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> > >>>> @@ -41,7 +41,9 @@ python() {
> > >>>>               d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
> > >>>>   }
> > >>>>
> > >>>> -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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
> > >>>
> > >>> Is there are reason why you didn't use `Build-Depends syntax extension`
> > >>> from[1]?
> > >>>
> > >> Hi Quirin,
> > >>
> > >> Yes. There was. The previous version of patch depends on
> > >> ISAR_CROSS_COMPILE as well.
> > >>
> > >> Guess there is nothing stopping us now. But, wondering if we can start
> > >> introducing it via some
> > >> example app with some documentation so that basic users are not
> > >> puzzled on seeing that line in
> > >> a recipe.
> > >>
> > >> Also, we could define a whole new variable to help recipe writers to
> > >> define profiles and seamlessly
> > >> use them without the need to explicitly export DEB_BUILD_PROFILES in
> > >> the recipe's dpkg_runbuild
> > >>
> > >> Now that we are serious enough, we should probably take care of your
> > >> earlier comment
> > >> as well on following the standard. So that we don't conflict with
> > >> Debian's predefined variables in case
> > >> we decided to build a package fetched from apt:// and wanted to make
> > >> use of its profile settings.
> > >>
> > >> Still need to look further but these are my initial thoughts. I could
> > >> probably send some patches for review in
> > >> coming days.
> > >>
> > >> For now, maybe we should call it and use pkg.uboot.tools instead of
> > >> tools here so that we don't
> > >> find something in that implementation that requires us to change this
> > >> in future, possibly breaking
> > >> u-boot / or the need to provide compatibility.
> > >>
> > >> Thoughts?
> > >
> > > OTOH, This could still go in. Since the design I am thinking of is not
> > > finalized and might take some discussions in the list, there is no
> > > point in holding this back.
> > >
> >
> > I think Quirin was just asking for
> >
> > DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
> >         libssl-dev:native, libssl-dev <tools>"
> >
> > rather than using bitbake logic. If that also works, would be more elegant.
>
> Yes, that also works. But just a bit difficult to read for normal users.

No. False positive. Just did a build after cleaning buildchroot. It
doesnot work as expected.

I will look into it when I start working on the DEB_BUILD_PROFILES
framework. I hope
I can spend time doing that. Fingers crossed.

Thanks,
Vijai Kumar K

>
> A framework for DEB_BUILD_PROFILES for isar would be helpful I guess,
> like I mentioned above.
> Will see if I can convert my thoughts to some patches sometime soon.
>
> Thanks,
> VIjai Kumar K
>
> >
> > Jan
> >
> > --
> > Siemens AG, T RDA IOT
> > Corporate Competence Center Embedded Linux
Quirin Gylstorff Nov. 25, 2021, 10:34 p.m. UTC | #9
On 11/25/21 5:34 PM, Jan Kiszka wrote:
> I think Quirin was just asking for
> 
> DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git, \
> 	libssl-dev:native, libssl-dev <tools>"
> 
> rather than using bitbake logic. If that also works, would be more elegant.
> 

I think that pattern looks much better - if it works.

Quirin

> Jan

-

Patch

diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 5198809..cfae0e2 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -41,7 +41,9 @@  python() {
             d.setVar('U_BOOT_BUILD_PROFILES_remove', "config")
 }
 
-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 bb.utils.contains('U_BOOT_BUILD_PROFILES', 'tools', 1, 0, d) else ''}"
 
 TEMPLATE_FILES = "debian/control.tmpl"
 TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"