Skip to contentSkip to conversation

boot/uboot: fix missing host-openssl for i.MX28 target

PATCH Superseded Jörg Krause 2 participants 2 messages May 19, 2016 – May 20, 2016

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 boot/uboot: fix missing host-openssl for i.MX28 target

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/

[J?rg: port from Armadeus to Buildroot project]

---
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(-)
boot/uboot/uboot.mk +7 -4
index e071303..e739638 100644
@@ -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
Signature · 1 line
2.8.2
#1 lore raw

PATCH v2 1/1 boot/uboot: fix missing host-openssl for i.MX28 target

Hi J?rg,

Quoted 17 lines · J?rg Krause

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/

Quoted 7 lines
[J?rg: port from Armadeus to Buildroot project]

---
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 <[email protected]>'

baruch

Signature · 3 lines
     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 -