diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index dbe82e65b1..a7eaedb06f 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -307,6 +307,11 @@ define UBOOT_BUILD_CMDS cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/ ) $(TARGET_CONFIGURE_OPTS) \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_SYSROOT_DIR="/" \ + PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \ + PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \ + PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig" \ $(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ $(UBOOT_MAKE_TARGET) $(if $(BR2_TARGET_UBOOT_FORMAT_SD), diff --git a/support/testing/tests/package/test_uboot_openssl_pkgconfig.py b/support/testing/tests/package/test_uboot_openssl_pkgconfig.py new file mode 100644 index 0000000000..de2d83f5b8 --- /dev/null +++ b/support/testing/tests/package/test_uboot_openssl_pkgconfig.py @@ -0,0 +1,20 @@ +import os + +import infra.basetest + + +class TestUbootOpensslPkgConfig(infra.basetest.BRTest): + config = infra.basetest.MINIMAL_CONFIG + \ + """ + BR2_x86_64=y + BR2_x86_atom=y + BR2_PACKAGE_OPENSSL=y + BR2_TARGET_UBOOT=y + BR2_TARGET_UBOOT_BOARD_DEFCONFIG="efi-x86_payload64" + BR2_TARGET_UBOOT_NEEDS_OPENSSL=y + BR2_PACKAGE_HOST_PKGCONF=y + """ + + def test_run(self): + img = os.path.join(self.builddir, "images", "u-boot.bin") + self.assertTrue(os.path.exists(img))