All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
@ 2015-09-10 10:24 Nathan Rossi
  2015-09-10 17:50 ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-10 10:24 UTC (permalink / raw)
  To: openembedded-core

U-Boot will compile its own tools during the build, with specific
configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
enables the use of openssl-native as a dependency and also adds the
HOSTCC flags that U-Boot uses when compiling the host tools.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
Changes in v2:
* Changed from using an unconditional DEPEND +=, to using PACKAGECONFIG with
  the "openssl" config and defaulting PACKAGECONFIG to enable the "openssl"
  config.
* Reworded the commit message and comments.
---
 meta/recipes-bsp/u-boot/u-boot.inc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 990ddb1..3d00b14 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -15,6 +15,13 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit uboot-config deploy
 
 EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+
+PACKAGECONFIG ??= "openssl"
+# u-boot will compile its own tools during the build, with specific
+# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
+# a host build dependency.
+PACKAGECONFIG[openssl] = ",,openssl-native"
 
 # Allow setting an additional version string that will be picked up by the
 # u-boot build system and appended to the u-boot version.  If the .scmversion
-- 
2.5.1



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

* Re: [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
  2015-09-10 10:24 [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency Nathan Rossi
@ 2015-09-10 17:50 ` Otavio Salvador
  2015-09-14  9:29   ` Nathan Rossi
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2015-09-10 17:50 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: Patches and discussions about the oe-core layer

On Thu, Sep 10, 2015 at 7:24 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
> U-Boot will compile its own tools during the build, with specific
> configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
> require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
> enables the use of openssl-native as a dependency and also adds the
> HOSTCC flags that U-Boot uses when compiling the host tools.
>
> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>

Ideally we ought to ensure U-Boot stops to build the native part when
doing the target one.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
  2015-09-10 17:50 ` Otavio Salvador
@ 2015-09-14  9:29   ` Nathan Rossi
  2015-09-14 11:49     ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-14  9:29 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Fri, Sep 11, 2015 at 3:50 AM, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
> On Thu, Sep 10, 2015 at 7:24 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>> U-Boot will compile its own tools during the build, with specific
>> configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
>> require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
>> enables the use of openssl-native as a dependency and also adds the
>> HOSTCC flags that U-Boot uses when compiling the host tools.
>>
>> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
>
> Ideally we ought to ensure U-Boot stops to build the native part when
> doing the target one.

Are you suggesting that the compile step (of the recipe) should build
the "tools"/native make target first, then execute the make target for
the rest afterwards as two separate steps?

For reference the U-Boot makefile setup handles the dependence on the
tools, and will ensure they are built before needed. So splitting out
the steps is probably not necessary.

Regards,
Nathan


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

* Re: [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
  2015-09-14  9:29   ` Nathan Rossi
@ 2015-09-14 11:49     ` Otavio Salvador
  2015-09-14 12:05       ` Nathan Rossi
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2015-09-14 11:49 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: Patches and discussions about the oe-core layer

On Mon, Sep 14, 2015 at 6:29 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
> On Fri, Sep 11, 2015 at 3:50 AM, Otavio Salvador
> <otavio.salvador@ossystems.com.br> wrote:
>> On Thu, Sep 10, 2015 at 7:24 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>>> U-Boot will compile its own tools during the build, with specific
>>> configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
>>> require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
>>> enables the use of openssl-native as a dependency and also adds the
>>> HOSTCC flags that U-Boot uses when compiling the host tools.
>>>
>>> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
>>
>> Ideally we ought to ensure U-Boot stops to build the native part when
>> doing the target one.
>
> Are you suggesting that the compile step (of the recipe) should build
> the "tools"/native make target first, then execute the make target for
> the rest afterwards as two separate steps?

Two separated _recipes_.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
  2015-09-14 11:49     ` Otavio Salvador
@ 2015-09-14 12:05       ` Nathan Rossi
  2015-09-14 12:59         ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-14 12:05 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Mon, Sep 14, 2015 at 9:49 PM, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
> On Mon, Sep 14, 2015 at 6:29 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>> On Fri, Sep 11, 2015 at 3:50 AM, Otavio Salvador
>> <otavio.salvador@ossystems.com.br> wrote:
>>> On Thu, Sep 10, 2015 at 7:24 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>>>> U-Boot will compile its own tools during the build, with specific
>>>> configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
>>>> require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
>>>> enables the use of openssl-native as a dependency and also adds the
>>>> HOSTCC flags that U-Boot uses when compiling the host tools.
>>>>
>>>> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
>>>
>>> Ideally we ought to ensure U-Boot stops to build the native part when
>>> doing the target one.
>>
>> Are you suggesting that the compile step (of the recipe) should build
>> the "tools"/native make target first, then execute the make target for
>> the rest afterwards as two separate steps?
>
> Two separated _recipes_.

Ah ok, to some degree that already exists with the u-boot-mkimage and
u-boot-fw-utils recipes. However the problem is that there is
currently no easy way (at least with mainline U-Boot) to get U-Boot to
use the tools provided by the host/sysroot/PATH instead of building
them.

Regards,
Nathan


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

* Re: [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency
  2015-09-14 12:05       ` Nathan Rossi
@ 2015-09-14 12:59         ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2015-09-14 12:59 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: Patches and discussions about the oe-core layer

On Mon, Sep 14, 2015 at 9:05 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
> On Mon, Sep 14, 2015 at 9:49 PM, Otavio Salvador
> <otavio.salvador@ossystems.com.br> wrote:
>> On Mon, Sep 14, 2015 at 6:29 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>>> On Fri, Sep 11, 2015 at 3:50 AM, Otavio Salvador
>>> <otavio.salvador@ossystems.com.br> wrote:
>>>> On Thu, Sep 10, 2015 at 7:24 AM, Nathan Rossi <nathan@nathanrossi.com> wrote:
>>>>> U-Boot will compile its own tools during the build, with specific
>>>>> configurations (aka when CONFIG_FIT_SIGNATURE is enabled) the host tools
>>>>> require openssl. This patch adds 'openssl' as a PACKAGECONFIG that
>>>>> enables the use of openssl-native as a dependency and also adds the
>>>>> HOSTCC flags that U-Boot uses when compiling the host tools.
>>>>>
>>>>> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
>>>>
>>>> Ideally we ought to ensure U-Boot stops to build the native part when
>>>> doing the target one.
>>>
>>> Are you suggesting that the compile step (of the recipe) should build
>>> the "tools"/native make target first, then execute the make target for
>>> the rest afterwards as two separate steps?
>>
>> Two separated _recipes_.
>
> Ah ok, to some degree that already exists with the u-boot-mkimage and
> u-boot-fw-utils recipes. However the problem is that there is
> currently no easy way (at least with mainline U-Boot) to get U-Boot to
> use the tools provided by the host/sysroot/PATH instead of building
> them.

I know but this seems to be the route we ought to pursuit.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2015-09-14 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10 10:24 [PATCH v2] u-boot.inc: Add host compiler flags and openssl-native dependency Nathan Rossi
2015-09-10 17:50 ` Otavio Salvador
2015-09-14  9:29   ` Nathan Rossi
2015-09-14 11:49     ` Otavio Salvador
2015-09-14 12:05       ` Nathan Rossi
2015-09-14 12:59         ` Otavio Salvador

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.