Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] boot/uboot: fix missing host-openssl for i.MX28 target
@ 2016-05-19 18:50 Jörg Krause
  2016-05-20  4:39 ` Baruch Siach
  0 siblings, 1 reply; 2+ messages in thread
From: Jörg Krause @ 2016-05-19 18:50 UTC (permalink / raw)
  To: buildroot

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 from Armadeus to Buildroot project]
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>

---
v2:
 - reset authorship
 - improve commit log (Baruch, Thomas)
 - clarify the patch is not fetched, but ported from the Armadeus project

---
 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
-- 
2.8.2

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

* [Buildroot] [PATCH v2] boot/uboot: fix missing host-openssl for i.MX28 target
  2016-05-19 18:50 [Buildroot] [PATCH v2] boot/uboot: fix missing host-openssl for i.MX28 target Jörg Krause
@ 2016-05-20  4:39 ` Baruch Siach
  0 siblings, 0 replies; 2+ messages in thread
From: Baruch Siach @ 2016-05-20  4:39 UTC (permalink / raw)
  To: buildroot

Hi J?rg,

On Thu, May 19, 2016 at 08:50:18PM +0200, J?rg Krause wrote:
> 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 from Armadeus to Buildroot project]
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> 
> ---
> v2:
>  - reset authorship

Using the --reset-author option of 'git commit' sets the patch authorship to 
you. To set Julien as author do 

  git commit --amend --author='Julien Boibessot <julien.boibessot@armadeus.com>'

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

end of thread, other threads:[~2016-05-20  4:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19 18:50 [Buildroot] [PATCH v2] boot/uboot: fix missing host-openssl for i.MX28 target Jörg Krause
2016-05-20  4:39 ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox