* [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
@ 2015-09-09 9:34 Nathan Rossi
2015-09-09 11:56 ` Phil Blundell
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-09 9:34 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-native as a dependency and also
adds the complete CC flags (as done in u-boot-mkimage) for the HOSTCC
variable that U-Boot uses when compiling the host tools.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
Note: Only a few different board configurations use CONFIG_FIT_SIGNATURE,
for 2015.07 this includes "ids8313", "am335x_boneback_vboot" as well as all the
Xilinx Zynq boards.
---
meta/recipes-bsp/u-boot/u-boot.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 990ddb1..51f5423 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -16,6 +16,12 @@ inherit uboot-config deploy
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
+# u-boot will compile its own tools during the build, with specific
+# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) or when compiling
+# just the tools, openssl is needed as a HOST dependency.
+DEPENDS += "openssl-native"
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+
# 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
# file already exists it will not be overwritten.
--
2.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
2015-09-09 9:34 [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency Nathan Rossi
@ 2015-09-09 11:56 ` Phil Blundell
2015-09-09 15:42 ` Nathan Rossi
0 siblings, 1 reply; 6+ messages in thread
From: Phil Blundell @ 2015-09-09 11:56 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core
On Wed, 2015-09-09 at 19:34 +1000, Nathan Rossi wrote:
> Note: Only a few different board configurations use CONFIG_FIT_SIGNATURE,
> for 2015.07 this includes "ids8313", "am335x_boneback_vboot" as well as all the
> Xilinx Zynq boards.
Can you make the openssl dependency be a PACKAGECONFIG then (or, even
better, auto-detect it based on the actual configuration in use)?
Dragging it in for everyone doesn't seem all that great if the majority
of users don't actually need the feature.
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
2015-09-09 11:56 ` Phil Blundell
@ 2015-09-09 15:42 ` Nathan Rossi
2015-09-09 23:08 ` Phil Blundell
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-09 15:42 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On Wed, Sep 9, 2015 at 9:56 PM, Phil Blundell <pb@pbcl.net> wrote:
> On Wed, 2015-09-09 at 19:34 +1000, Nathan Rossi wrote:
>> Note: Only a few different board configurations use CONFIG_FIT_SIGNATURE,
>> for 2015.07 this includes "ids8313", "am335x_boneback_vboot" as well as all the
>> Xilinx Zynq boards.
>
> Can you make the openssl dependency be a PACKAGECONFIG then (or, even
> better, auto-detect it based on the actual configuration in use)?
> Dragging it in for everyone doesn't seem all that great if the majority
> of users don't actually need the feature.
Auto-detecting would be quite complex as it would need to take into
account processing the configs in u-boot before being able to know
whether to add the dependency or not. Making this user configurable
via PACKAGECONFIG might add additional confusion, especially since it
is not a dependency of the target output.
Please keep in mind, openssl-native is already dragged in by other
dependencies in order to build u-boot (e.g. rpm-native which is added
to all recipes inheriting package.bbclass regardless of
PACKAGE_CLASSES). Also if you are using u-boot it is likely that you
are depending on u-boot-mkimage-native as it is used for kernel image
and/or rootfs image packing.
Regards,
Nathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
2015-09-09 15:42 ` Nathan Rossi
@ 2015-09-09 23:08 ` Phil Blundell
2015-09-10 6:57 ` Nathan Rossi
0 siblings, 1 reply; 6+ messages in thread
From: Phil Blundell @ 2015-09-09 23:08 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core
On Thu, 2015-09-10 at 01:42 +1000, Nathan Rossi wrote:
> Please keep in mind, openssl-native is already dragged in by other
> dependencies in order to build u-boot (e.g. rpm-native which is added
> to all recipes inheriting package.bbclass regardless of
> PACKAGE_CLASSES).
The openssl dependency in rpm is already a PACKAGECONFIG though, isn't
it?
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
2015-09-09 23:08 ` Phil Blundell
@ 2015-09-10 6:57 ` Nathan Rossi
2015-09-10 8:11 ` Phil Blundell
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Rossi @ 2015-09-10 6:57 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On Thu, Sep 10, 2015 at 9:08 AM, Phil Blundell <pb@pbcl.net> wrote:
> On Thu, 2015-09-10 at 01:42 +1000, Nathan Rossi wrote:
>> Please keep in mind, openssl-native is already dragged in by other
>> dependencies in order to build u-boot (e.g. rpm-native which is added
>> to all recipes inheriting package.bbclass regardless of
>> PACKAGE_CLASSES).
>
> The openssl dependency in rpm is already a PACKAGECONFIG though, isn't
> it?
>
Yes rpm does have openssl as a PACKAGECONFIG, but other packages such
as python-native are not setup with PACKAGECONFIG.
I think the best solution that would cover your request but also not
add any potential confusion for users, would be to have the
PACKAGECONFIG for u-boot but default to having the config enabled. And
for users who want to completely remove the openssl dependency from
their chain they are able to do so.
Regards,
Nathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency
2015-09-10 6:57 ` Nathan Rossi
@ 2015-09-10 8:11 ` Phil Blundell
0 siblings, 0 replies; 6+ messages in thread
From: Phil Blundell @ 2015-09-10 8:11 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core
On Thu, 2015-09-10 at 16:57 +1000, Nathan Rossi wrote:
> I think the best solution that would cover your request but also not
> add any potential confusion for users, would be to have the
> PACKAGECONFIG for u-boot but default to having the config enabled. And
> for users who want to completely remove the openssl dependency from
> their chain they are able to do so.
Yes, that would be fine. Please also add a small comment next to the
PACKAGECONFIG[openssl] definition explaining why and when it's needed.
Thanks
Phil
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-09-10 8:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 9:34 [PATCH] u-boot.inc: Add host compiler flags and openssl-native dependency Nathan Rossi
2015-09-09 11:56 ` Phil Blundell
2015-09-09 15:42 ` Nathan Rossi
2015-09-09 23:08 ` Phil Blundell
2015-09-10 6:57 ` Nathan Rossi
2015-09-10 8:11 ` Phil Blundell
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.