From fe7c8dfe1e177dfd85480dc3dae3b942e4db3685 Mon Sep 17 00:00:00 2001 From: heitbaum Date: Sat, 9 Oct 2021 21:32:51 +1100 Subject: [PATCH] u-boot: use setup_pkg_config_host for build Issue was that pkg-config picks wrong include folders. That is because in u-boot case, pkg-config is configured to pick up target (ARM) includes and libraries, because it's called from make_target(). Simple solution to avoid patching sources and adding CONFIG_TOOLS_LIBCRYPTO line to each and every config file is to add setup_pkg_config_host at the beginning of make_target(). Include the dependency to openssl:host. --- packages/tools/u-boot/package.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/tools/u-boot/package.mk b/packages/tools/u-boot/package.mk index 1315a6229a..faf88c9528 100644 --- a/packages/tools/u-boot/package.mk +++ b/packages/tools/u-boot/package.mk @@ -6,7 +6,7 @@ PKG_NAME="u-boot" PKG_ARCH="arm aarch64" PKG_LICENSE="GPL" PKG_SITE="https://www.denx.de/wiki/U-Boot" -PKG_DEPENDS_TARGET="toolchain Python3:host swig:host" +PKG_DEPENDS_TARGET="toolchain openssl:host Python3:host swig:host" PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems." PKG_STAMP="${UBOOT_SYSTEM} ${UBOOT_TARGET}" @@ -51,6 +51,9 @@ post_patch() { } make_target() { + # U-Boot needs host openssl for tools - make sure it finds right one + # setup_pkg_config_host is required + setup_pkg_config_host if [ -z "${UBOOT_SYSTEM}" ]; then echo "UBOOT_SYSTEM must be set to build an image" echo "see './scripts/uboot_helper' for more information"