All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: "u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: Terry Lv <terry.lv@nxp.com>, Marek Vasut <marex@denx.de>
Subject: Re: 回复: Build failed when CONFIG_TOOLS_LIBCRYPTO is disabled on latest u-boot
Date: Wed, 13 Dec 2023 16:00:29 +0100	[thread overview]
Message-ID: <2370209.ElGaqSPkdT@ada-pc> (raw)
In-Reply-To: <GVXPR04MB995027625009662BDCDB81948FBDA@GVXPR04MB9950.eurprd04.prod.outlook.com>

Hello,

Am Montag, 27. November 2023, 03:53:49 CET schrieb Terry Lv:
> Hi Experts,
> 
>   Any feedback on this?

Bitten by the same problem again, I did a quick search on lore and found 
these:

1. Patch from 2021:

   https://lore.kernel.org/u-boot/20211021093304.25399-1-pali@kernel.org/

   I carried that patch up to 2022.04, but it does not solve the whole problem 
in recent U-Boot anymore.

2. Another patch tackling the same issue from early 2022:

   https://lore.kernel.org/u-boot/20220111153120.1276641-1-marex@denx.de/

3. Discussion from mid 2022: 

   https://lore.kernel.org/u-boot/1884029.XjOfZupGQm@ada/

4. Patch series from earlier this year:

   https://lore.kernel.org/u-boot/20230121154743.667253-1-paulerwan.rio@gmail.com/

As far as I can tell none of the proposed patches got applied.  I'm going to 
test those now which I was not aware of yet.

Greets
Alex

> 
>   Thanks!
> 
> Regards
> Terry
> ________________________________
> 发件人: Terry Lv
> 发送时间: 2023年10月18日 12:03
> 收件人: u-boot@lists.denx.de <u-boot@lists.denx.de>
> 主题: Build failed when CONFIG_TOOLS_LIBCRYPTO is disabled on latest u-boot
> 
> 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-lin
> ux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-lin
> ux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-lin
> ux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-lin
> ux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-lin
> ux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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-li
> nux/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





      reply	other threads:[~2023-12-13 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  4:03 Build failed when CONFIG_TOOLS_LIBCRYPTO is disabled on latest u-boot Terry Lv
2023-11-27  2:53 ` 回复: " Terry Lv
2023-12-13 15:00   ` Alexander Dahl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2370209.ElGaqSPkdT@ada-pc \
    --to=ada@thorsis.com \
    --cc=marex@denx.de \
    --cc=terry.lv@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.