u-boot.inc: Add host compiler flags and openssl-native dependency
PATCH 1/1 u-boot.inc: Add host compiler flags and openssl-native dependency
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.
---
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(+)
meta/recipes-bsp/u-boot/u-boot.inc +6 -0
@@ -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.
Signature · 1 line
2.5.1
Quoted 3 lines · Nathan Rossi
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.
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Nathan Rossi
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
Quoted 4 lines · Nathan Rossi
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.
Quoted 9 lines · Phil Blundell
Quoted 4 lines · Nathan Rossi
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
Quoted 5 lines · Nathan Rossi
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