building lsdk 21.08 for ls1046ardb - openssl error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

building lsdk 21.08 for ls1046ardb - openssl error

896 Views
Kavana
Contributor I

Unable to build lsdk for ls1046ardb due to below error. Building on ubuntu 20.04 with Openssl 3.0.

 

Building CST ...
make[4]: Entering directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst'
common/crypto_utils.c: In function ‘crypto_hash_init’:
common/crypto_utils.c:46:2: error: ‘SHA256_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
46 | SHA256_Init(c);
| ^~~~~~~~~~~
In file included from /usr/local/include/openssl/x509.h:41,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/sha.h:73:27: note: declared here
73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
| ^~~~~~~~~~~
common/crypto_utils.c: In function ‘crypto_hash_update’:
common/crypto_utils.c:56:2: error: ‘SHA256_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
56 | SHA256_Update(c, data, len);
| ^~~~~~~~~~~~~
In file included from /usr/local/include/openssl/x509.h:41,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/sha.h:74:27: note: declared here
74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
| ^~~~~~~~~~~~~
common/crypto_utils.c: In function ‘crypto_hash_final’:
common/crypto_utils.c:66:2: error: ‘SHA256_Final’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
66 | SHA256_Final(hash, c);
| ^~~~~~~~~~~~
In file included from /usr/local/include/openssl/x509.h:41,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/sha.h:76:27: note: declared here
76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
| ^~~~~~~~~~~~
common/crypto_utils.c: In function ‘crypto_hash_update_file’:
common/crypto_utils.c:105:3: error: ‘SHA256_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
105 | SHA256_Update(c, buf, bytes);
| ^~~~~~~~~~~~~
In file included from /usr/local/include/openssl/x509.h:41,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/sha.h:74:27: note: declared here
74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
| ^~~~~~~~~~~~~
common/crypto_utils.c: In function ‘crypto_rsa_sign’:
common/crypto_utils.c:131:2: error: ‘PEM_read_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
131 | priv_key = PEM_read_RSAPrivateKey(fpriv, NULL, NULL, NULL);
| ^~~~~~~~
In file included from /usr/local/include/openssl/ssl.h:36,
from common/crypto_utils.c:37:
/usr/local/include/openssl/pem.h:447:1: note: declared here
447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
| ^~~~~~~~~~~~~~~~~~~~~~
common/crypto_utils.c:139:2: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
139 | ret = RSA_sign(NID_sha256, img_hash, len,
| ^~~
In file included from /usr/local/include/openssl/x509.h:36,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/rsa.h:348:27: note: declared here
348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
| ^~~~~~~~
common/crypto_utils.c: In function ‘crypto_extract_pub_key’:
common/crypto_utils.c:172:2: error: ‘PEM_read_RSAPublicKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
172 | pub_key = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL);
| ^~~~~~~
In file included from /usr/local/include/openssl/ssl.h:36,
from common/crypto_utils.c:37:
/usr/local/include/openssl/pem.h:448:1: note: declared here
448 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSAPublicKey, RSA)
| ^~~~~~~~~~~~~~~~~~~
common/crypto_utils.c:180:2: error: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
180 | key_len = RSA_size(pub_key);
| ^~~~~~~
In file included from /usr/local/include/openssl/x509.h:36,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/rsa.h:204:27: note: declared here
204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
| ^~~~~~~~
common/crypto_utils.c:189:2: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
189 | RSA_get0_key(pub_key, &modulus, &exponent, NULL);
| ^~~~~~~~~~~~
In file included from /usr/local/include/openssl/x509.h:36,
from /usr/local/include/openssl/ssl.h:31,
from common/crypto_utils.c:37:
/usr/local/include/openssl/rsa.h:217:28: note: declared here
217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:172: crypto_utils.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst'
make[3]: *** [/home/ubuntu/Downloads/flexbuild_lsdk2108_github/packages/apps/security/cst.mk:10: cst] Error 2
make[3]: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/packages/apps'
make[2]: *** [Makefile:25: cst] Error 2
make[2]: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github'
cp: cannot stat '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst/srk.*': No such file or directory
make -s -j2 fip pbl PLAT=ls1046ardb BOOT_MODE=sd RCW=firmware/rcw/ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_sdboot_sben.bin BL33=/home/ubuntu/Downloads/flexbuild_lsdk2108_github/build/firmware/u-boot/ls1046ardb/uboot_ls1046ardb_tfa_SECURE_BOOT.bin BL32=/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/optee_os/out/arm-plat-ls/core/tee_ls1046ardb.bin SPD=opteed TRUSTED_BOARD_BOOT=1 CST_DIR=/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst
make[2]: Entering directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf'
Including services/spd/opteed/opteed.mk
board PAth = plat/nxp/soc-ls1046a/ls1046ardb
setting chssis
SFP in BL2 code
Generating CSF Header for /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf/build/ls1046ardb/release/bl32.bin.cst /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/optee_os/out/arm-plat-ls/core/tee_ls1046ardb.bin
make[2]: /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst/create_hdr_esbc: Command not found
Generating CSF Header for /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf/build/ls1046ardb/release/bl33.bin.cst /home/ubuntu/Downloads/flexbuild_lsdk2108_github/build/firmware/u-boot/ls1046ardb/uboot_ls1046ardb_tfa_SECURE_BOOT.bin
make[2]: /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/apps/security/cst/create_hdr_esbc: Command not found
make[2]: *** [Makefile:1121: /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf/build/ls1046ardb/release/bl32.bin.cst] Error 127
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1128: /home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf/build/ls1046ardb/release/bl33.bin.cst] Error 127
make[2]: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/components/firmware/atf'
cp: cannot stat 'build/ls1046ardb/release/bl2_sd*.pbl': No such file or directory
make[1]: *** [atf.mk:11: atf] Error 1
make[1]: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github/packages/firmware'
make: *** [Makefile:19: atf] Error 2
make: Leaving directory '/home/ubuntu/Downloads/flexbuild_lsdk2108_github'

0 Kudos
Reply
1 Reply

871 Views
yipingwang
NXP TechSupport
NXP TechSupport

On Ubuntu 20.04. openssl version should be 1.1.1f, why did you use openssl 3.0?

$ openssl version
OpenSSL 1.1.1f 31 Mar 2020

Please remove openssl 3.0, then use command "sudo apt-get install openssl" to install openssl 1.1.1f on Ubuntu 20.04 host PC.

0 Kudos
Reply