[ELDK] [PATCH v1 1/1] META-ELDK: u-boot-mkimage: Unbreak build (missing SSL headers)

Marek Vasut marex at denx.de
Wed Apr 16 16:30:23 CEST 2014


On Wednesday, April 16, 2014 at 04:02:23 PM, Gerhard Sittig wrote:
[...]

> It appears my local tests have omitted one variant, adding
> 
>   HOSTCFLAGS="${CFLAGS}"
> 
> to the EXTRA_OEMAKE spec.  This would be preferrable to setting
> 
>   HOSTCC="${CC} ${CFLAGS}"
> 
> which gets perceived as unnatural and dirty.  In my previous
> tests I must have misspelled this, or else it had become the
> suggested patch.
> 
> 
> Just did a quick test with U-Boot v2014.04.

This might work with 2014.04 , but you must test this with 2014.01 where such 
change will likely not work.

> To build this
> version, the configure step is required as well (mandatory now,
> even when building the tools exclusively).
> 
> For better demonstration of the changes I will cite the diff here
> between the 2014.01 and the 2014.04 recipes instead of submitting
> the complete recipe file.  Things build fine, the
> './tmp/sysroots/x86_64-linux/usr/bin/mkimage --help' command is
> operational.  Haven't built another kernel yet, as this is
> painfully time consuming.
> 
> Marek, as you are "mxs aware", can you check whether the
> resulting native binaries fit your purposes?  Or whether we need
> to configure for mx28, since this is forced in EXTRA_OEMAKE, too?

I don't know, I didn't test U-Boot 2014.04 with this recipe yet. You can always 
try building u-boot for m28evk and see if this breaks. You can test if the 
mkimage generated supports the mxsimage image type .

> > We will have to port it to 5.6 and fix this in 5.6 to work with kbuild as
> > well.
> 
> The 'HOSTCFLAGS="${CFLAGS}"' approach should work with both
> U-Boot versions.

Have you tested this please? Please make dead sure this patch work against ELDK 
5.5 with uninstalled libssl-dev . I suspect you will get a problem when building 
tools/ with U-Boot 2014.01 , because if you add HOSTCFLAGS to EXTRA_OEMAKE, they 
will override the HOSTCFLAGS in u-boot/config.mk , which in turn will cause that
the HOSTCPPFLAGS defined in tools/Makefile will not be included in HOSTCFLAGS 
and thus the tools/ build won't find u-boot's internal headers .

> ELDK 5.6 probably uses something newer than
> U-Boot v2014.01.  With this Kbuild version, the config step is
> required.  "sandbox" should be OK for the "portable tools".
> 
> > Acked-by: Marek Vasut <marex at denx.de>
> 
> Thank you!  Of course I have to create a patch which passes
> HOSTCFLAGS, while we agree that EXTRA_OEMAKE needs adjustment to
> pick up the existing OpenSSL header files correctly, and that the
> generic approach to the problem is OK.
> 
> I'd suggest that I rework the commit message to better reflect
> the underlying problem.  In hindsight the v1 commit message looks
> inappropriate.  Here is what I could come up with in the
> meantime:
> 
>   META-ELDK: u-boot-mkimage: Unbreak build (missing SSL headers)
> 
>   building the u-boot-mkimage-native package breaks with the error message

Sentences always start with capital letter and end with a fullstop ;-)

> 
>     mxsimage.c:18:25: fatal error: openssl/evp.h: No such file or directory
> 
>   OpenSSL related header files are not found despite their being present
>   in the native sysroot

Always :)

> 
>   the error can be hidden by libssl-dev packages in the build machine, in
>   this case the host's header files are used instead (which is another
>   independent potential source of issues, building applications against
>   headers that don't match the library which gets used at runtime)
> 
>   this change unbreaks compilation of the u-boot-mkimage-native package

DTTO ... otherwise good.


More information about the eldk mailing list