
Hi Experts,
We need to disable CONFIG_TOOLS_LIBCRYPTO in our u-boot.
But when I disable CONFIG_TOOLS_LIBCRYPTO from menuconfig, my u-boot build fails.
Logs: /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/image-host.o: in function `read_pub_key': image-host.c:(.text+0x8f): undefined reference to `PEM_read_X509' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: image-host.c:(.text+0x9e): undefined reference to `X509_get_pubkey' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: image-host.c:(.text+0xae): undefined reference to `i2d_PublicKey' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: image-host.c:(.text+0xc1): undefined reference to `X509_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `openssl_err': kwbimage.c:(.text+0xbb): undefined reference to `ERR_get_error' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0xd7): undefined reference to `ERR_error_string' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwb_load_rsa_key': kwbimage.c:(.text+0x19d): undefined reference to `PEM_read_RSAPrivateKey' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwb_compute_pubkey_hash': kwbimage.c:(.text+0x278): undefined reference to `EVP_MD_CTX_new' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x28c): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x291): undefined reference to `EVP_sha256' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x29c): undefined reference to `EVP_DigestInit' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x2b6): undefined reference to `EVP_DigestUpdate' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x2ca): undefined reference to `EVP_DigestFinal' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x2d9): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x2e1): undefined reference to `EVP_MD_CTX_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwb_export_pubkey': kwbimage.c:(.text+0x3b2): undefined reference to `RSA_get0_key' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x3c3): undefined reference to `RSA_get0_key' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x3f5): undefined reference to `BN_num_bits' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x408): undefined reference to `BN_num_bits' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x47e): undefined reference to `BN_bn2bin' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x49f): undefined reference to `BN_bn2bin' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwb_verify': kwbimage.c:(.text+0x66f): undefined reference to `EVP_PKEY_new' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x686): undefined reference to `EVP_PKEY_set1_RSA' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x696): undefined reference to `EVP_PKEY_size' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6a6): undefined reference to `EVP_MD_CTX_new' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6ba): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6bf): undefined reference to `EVP_sha256' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6ca): undefined reference to `EVP_DigestInit' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6e2): undefined reference to `EVP_DigestUpdate' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x6fd): undefined reference to `EVP_VerifyFinal' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x71d): undefined reference to `EVP_MD_CTX_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x73b): undefined reference to `EVP_PKEY_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x807): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x80f): undefined reference to `EVP_MD_CTX_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x817): undefined reference to `EVP_PKEY_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwb_sign_and_verify': kwbimage.c:(.text+0x84e): undefined reference to `EVP_PKEY_new' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x865): undefined reference to `EVP_PKEY_set1_RSA' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x875): undefined reference to `EVP_PKEY_size' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x885): undefined reference to `EVP_MD_CTX_new' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x89a): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x89f): undefined reference to `EVP_sha256' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x8ae): undefined reference to `EVP_DigestInit' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x8cc): undefined reference to `EVP_DigestUpdate' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x8ef): undefined reference to `EVP_SignFinal' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x907): undefined reference to `EVP_MD_CTX_reset' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x913): undefined reference to `EVP_MD_CTX_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x91b): undefined reference to `EVP_PKEY_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x93b): undefined reference to `EVP_PKEY_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: kwbimage.c:(.text+0x9ed): undefined reference to `EVP_MD_CTX_free' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `kwbimage_set_header': kwbimage.c:(.text+0x26aa): undefined reference to `d2i_RSAPublicKey' /opt/samba/nxa08304/gcc_cross_toolchain/5.4-zeus/sysroots/x86_64-pokysdk-linux/usr/bin/ld: tools/kwbimage.o: in function `EVP_MD_CTX_cleanup': kwbimage.c:(.text+0x4aa5): undefined reference to `EVP_MD_CTX_reset' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: tools/dumpimage] Error 1 make[1]: *** Waiting for unfinished jobs....
Do you know whether there is a patch to fix the issue?
Thanks!
Regards Terry