[PATCH v2 0/2] tools: Fix build without host OpenSSL

Alexander Dahl ada at thorsis.com
Thu Dec 14 13:11:34 CET 2023


Hei hei,

every now and then some user wants to build without having to install
OpenSSL development libraries on the build host for different reasons.
This is not possible for all boards supported by U-Boot and not for all
configurations, but at least for some.  And U-Boot has an option for
that, which currently does not work.

The topic was discussed multiple times and multiple patches were
proposed to fix things, but to my knowledge none got applied.  I'm aware
of at least the discussions listed below.

This series is based on the work done by Paul-Erwan Rio earlier this
year, but replacing the first of two patches by a new patch based on two
older approaches from 2021 and 2022 and the feedback they got.  Because
of that, I gave it the v2 right away.

I added some notes to both patches for further explanations on my
decisions.

I tested this with and without libssl-dev installed on a Debian
GNU/Linux 12 (bookworm) host (amd64 arch), with buildman and the
following options:

    buildman -b master..mybranch -a '~CONFIG_TOOLS_KWBIMAGE' -a '~CONFIG_TOOLS_LIBCRYPTO' atmel

And with libssl-dev installed this:

    buildman -b master..mybranch atmel
    buildman -b master..mybranch turris

Building 'turris' without libssl-dev installed fails as expected.

The series solves _my_ immediate problem (building a recent U-Boot for
an at91 based board _without_ FIT images and/or signing, in a BSP from
2018 which we can not update, and which does not handle host openssl
correctly), but I did not investigate other combinations, except those
listed above.  Test on real hardware was only on our at91 based boards.

Please test and let me know what you think.  I can imagine having CI
testing builds with and without CONFIG_TOOLS_LIBCRYPTO set might be
difficult, because building without won't work for every board.  It can
not, because some boards require it while others don't.

Greets
Alex

Cc: Marek Vasut <marex at denx.de>
Cc: Paul-Erwan Rio <paulerwan.rio at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefan Roese <sr at denx.de>
Link: https://lore.kernel.org/u-boot/20211021093304.25399-1-pali@kernel.org/
Link: https://lore.kernel.org/u-boot/20220111153120.1276641-1-marex@denx.de/
Link: https://lore.kernel.org/u-boot/1884029.XjOfZupGQm@ada/
Link: https://lore.kernel.org/u-boot/20230121154743.667253-1-paulerwan.rio@gmail.com/
Link: https://lore.kernel.org/u-boot/AM6PR04MB61521B84F78571B282FE1D828FD5A@AM6PR04MB6152.eurprd04.prod.outlook.com/

Alexander Dahl (1):
  tools: kwbimage: Allow disabling build on non-mvebu platforms

Paul-Erwan Rio (1):
  tools: fix build without LIBCRYPTO support

 arch/arm/mach-mvebu/Kconfig | 1 +
 include/image.h             | 2 +-
 tools/Kconfig               | 6 ++++++
 tools/Makefile              | 5 ++++-
 tools/fit_image.c           | 2 +-
 tools/image-host.c          | 4 ++++
 tools/mkimage.c             | 5 +++--
 7 files changed, 20 insertions(+), 5 deletions(-)


base-commit: 27089f1e4d11fd7e0619097b59258d0428cde2ac
-- 
2.39.2



More information about the U-Boot mailing list