All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] boot/uboot: fix missing host-openssl for i.MX28 target
@ 2016-05-25 15:09 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2016-05-25 15:09 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0dca644e443c8f28bfe5aa1c98201dc3b49e1165
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Building an U-Boot image for the i.MX23 or i.MX28 target requires to run the
bootloaders 'mxsimage' tool on the host. As mxsimage needs unconditionally
OpenSSL, building U-Boot for those targets fails if it is not available on
the host:

tools/mxsimage.c:18:25: fatal error: openssl/evp.h: No such file or directory
  #include <openssl/evp.h>

Add the required dependency 'host-openssl' to all the different U-Boot image
types used to build a bootloader image for an i.MX23/i.MX28 target.

Also pass HOST_CFLAGS and HOST_LDFLAGS to the U-Boot build process so the right
-I/-L options will be used to find OpenSSL.

Ported from the Armadeus project:
https://sourceforge.net/p/armadeus/mailman/message/33595402/

Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
[J??rg: port to recent Buildroot version]
Signed-off-by: J??rg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 boot/uboot/uboot.mk | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index e071303..e739638 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -58,16 +58,17 @@ UBOOT_BIN = u-boot.imx
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
 UBOOT_BIN = u-boot.sb
 UBOOT_MAKE_TARGET = $(UBOOT_BIN)
-UBOOT_DEPENDENCIES += host-elftosb
+# mxsimage needs OpenSSL
+UBOOT_DEPENDENCIES += host-elftosb host-openssl
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SD),y)
 # BootStream (.sb) is generated by U-Boot, we convert it to SD format
 UBOOT_BIN = u-boot.sd
 UBOOT_MAKE_TARGET = u-boot.sb
-UBOOT_DEPENDENCIES += host-elftosb
+UBOOT_DEPENDENCIES += host-elftosb host-openssl
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y)
 UBOOT_BIN = u-boot.nand
 UBOOT_MAKE_TARGET = u-boot.sb
-UBOOT_DEPENDENCIES += host-elftosb
+UBOOT_DEPENDENCIES += host-elftosb host-openssl
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
 UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
 else
@@ -87,7 +88,9 @@ endif
 
 UBOOT_MAKE_OPTS += \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
-	ARCH=$(UBOOT_ARCH)
+	ARCH=$(UBOOT_ARCH) \
+	HOSTCFLAGS="$(HOST_CFLAGS)" \
+	HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
 UBOOT_DEPENDENCIES += host-dtc

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-25 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-25 15:09 [Buildroot] [git commit] boot/uboot: fix missing host-openssl for i.MX28 target Peter Korsgaard

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.