u-boot.inc: Add host compiler flags and openssl-native dependency
PATCH v2 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' 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.
---
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(+)
meta/recipes-bsp/u-boot/u-boot.inc +7 -0
@@ -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
Signature · 1 line
2.5.1
Quoted 7 lines · Nathan Rossi
U-Boot will compile its own tools during the build, with specific configurations (aka when
CONFIG_FIT_SIGNATUREis 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 <[email protected]>
Ideally we ought to ensure U-Boot stops to build the native part when doing the target one.
Signature · 3 lines
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
Quoted 11 lines · Otavio Salvador
Quoted 7 lines · Nathan Rossi
U-Boot will compile its own tools during the build, with specific configurations (aka when
CONFIG_FIT_SIGNATUREis 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 <[email protected]>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
Quoted 9 lines · Nathan Rossi
Quoted 7 lines · Otavio Salvador
Quoted 6 lines · Nathan Rossi
U-Boot will compile its own tools during the build, with specific configurations (aka when
CONFIG_FIT_SIGNATUREis 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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Nathan Rossi <[email protected]>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_.
Signature · 3 lines
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
Quoted 12 lines · Otavio Salvador
Quoted 11 lines · Nathan Rossi
Quoted 9 lines · Otavio Salvador
Quoted 7 lines · Nathan Rossi
U-Boot will compile its own tools during the build, with specific configurations (aka when
CONFIG_FIT_SIGNATUREis 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 <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
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
Quoted 21 lines · Nathan Rossi
Quoted 19 lines · Otavio Salvador
Quoted 17 lines · Nathan Rossi
Quoted 11 lines · Otavio Salvador
Quoted 7 lines · Nathan Rossi
U-Boot will compile its own tools during the build, with specific configurations (aka when
CONFIG_FIT_SIGNATUREis 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 <[email protected]>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?
Quoted 7 lines
Quoted 1 line
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.
Signature · 3 lines
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