Page MenuHomePhabricator

PSoc64 fails to build NS image due to the change of PSA tests library
Closed, ResolvedPublic

Description

Git repository: tf-m-tests

**93ce2f59c0** (HEAD, origin/master) app: Add a static library for the PSA tests

Error message (when TEST_PSA_API is set)

/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_intf.o): in function `pal_attestation_function':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_intf.c:43: undefined reference to `psa_initial_attest_get_token'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_intf.c:48: undefined reference to `psa_initial_attest_get_token_size'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_cose_crypto_hash_start':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:66: undefined reference to `psa_hash_setup'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_cose_crypto_hash_update':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:87: undefined reference to `psa_hash_update'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:87: undefined reference to `psa_hash_update'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_cose_crypto_hash_finish':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:97: undefined reference to `psa_hash_finish'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_attest_get_public_key':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:204: undefined reference to `tfm_initial_attest_get_public_key'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_import_attest_key':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:283: undefined reference to `psa_import_key'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_crypto_pub_key_verify':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:328: undefined reference to `psa_asymmetric_verify'
/opt/ARM/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: psa_api_tests/platform/pal_nspe.a(pal_attestation_crypto.o): in function `pal_destroy_attest_key':
/home/alamyliu/prjs/tf-m/tf-m.master/BUILD.PSA_fail/lib/ext/psa_arch_tests-src/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c:304: undefined reference to `psa_destroy_key'
collect2: error: ld returned 1 exit status
make[2]: *** [app/CMakeFiles/tfm_ns.dir/build.make:152: bin/tfm_ns.axf] Error 1
make[1]: *** [CMakeFiles/Makefile2:966: app/CMakeFiles/tfm_ns.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Event Timeline

AlamyLiu created this task.Dec 22 2020, 6:14 PM

Apparently, the patch didn't work for GCC. Sorry about that.
It has been reverted for the time being:
https://review.trustedfirmware.org/c/TF-M/tf-m-tests/+/7651

AlamyLiu closed this task as Resolved.Dec 23 2020, 3:53 PM

Verified that it passed the compiling & running tests, with the reverted patch.
Thank you for the quick response/fix~