Hi all,
We want to use the SE05x middleware libraries 04.05.00 version on an i.MX8MP board.
Middleware is built using Yocto recipe with these Cmake settings (basically they are the default ones):
-DWithSharedLIB=ON -DCMAKE_BUILD_TYPE=Debug -DPTMW_Host=iMXLinux -DPTMW_HostCrypto=OPENSSL -DPTMW_OpenSSL=3_0 \
-DPTMW_SMCOM=T1oI2C -DPTMW_SE05X_Auth=None -DPTMW_Applet=SE051_H -DPTMW_SE05X_Ver=07_02 \
-DOPENSSL_INSTALL_PREFIX=${WORKDIR}/recipe-sysroot/usr/ \
-DPAHO_BUILD_DEB_PACKAGE=OFF -DPAHO_BUILD_DOCUMENTATION=OFF -DPAHO_BUILD_SAMPLES=OFF \
-DPAHO_BUILD_SHARED=ON -DPAHO_BUILD_STATIC=OFF -DPAHO_ENABLE_CPACK=ON \
-DPAHO_ENABLE_TESTING=OFF \
-DPAHO_WITH_SSL=ON \
-DOPENSSL_ROOT_DIR=${WORKDIR}/recipe-sysroot/usr/
When bitabake runs "do_package" command, I get this error:
ERROR: se05x-4.5.0-r0 do_package: dwarfsrcfiles failed with exit code 1 (cmd was ['dwarfsrcfiles', '/opt/variscite/var-fsl-yocto/build_xwayland_qt5/tmp/work/armv8a-fslc-linux/se05x/4.5.0-r0/package/home/root/se05x_mw_v04.05.00/simw-top/ext/openssl/lib_mingw/libssl.a']):
dwarfsrcfiles: /opt/variscite/var-fsl-yocto/build_xwayland_qt5/tmp/work/armv8a-fslc-linux/se05x/4.5.0-r0/package/home/root/se05x_mw_v04.05.00/simw-top/ext/openssl/lib_mingw/libssl.a: not a valid ELF file
Since I'm new to Edgelock product, can anyone help me? What am I doing wrong?
Thanks in advance,
Igor
Solved! Go to Solution.
HI Kan_Li,
To solve that issue, it seems to be necessary to add "INHIBIT_PACKAGE_STRIP_FILES" to the Secure Elements recipe in order to allow libraries to remain unstripped:
INHIBIT_PACKAGE_STRIP_FILES += "${PKGD}/home/root/${NXP-PLUG-TRUST-MW}/simw-top/ext/openssl/lib_mingw/libcrypto.a"
INHIBIT_PACKAGE_STRIP_FILES += "${PKGD}/home/root/${NXP-PLUG-TRUST-MW}/simw-top/ext/openssl/lib_mingw/libssl.a"
Hope that helps others who face same issue,
Igor
Hi @Igor I am trying to build with se05x_4.5.1 and using the recipe file from scripts/yocto/v04.03.01/se05x_4.3.1.bb but its failing heavily on do_compile can you kindly help me on this. Please provide the coreect recipe file for this.
Please anyone help me on this
Hi @acharya_7,
Attached is the file you asked for.
I had a problem with the path where Yocto expects to find the package, so I changed the recipe.
I Hope this helps,
Igor
Thank you so much @Igor Now i got it why the previous recipe file was failing. If you dont mind i need some confirmation that this recipe also compile all the demos in the libraries and put it in our main image am i correct?
You're welcome. I'll show you the contents of the binary and library folders: keep in mind that I've just started working with the Secure Element so I am not very experienced.
tmp/work/armv8a-poky-linux/se05x/4.5.1-r0/image/usr/local/bin/
├── apdu_player_demo
├── ex_ecc
├── ex_ecdh
├── ex_eddsa
├── ex_hkdf
├── ex_symmetric
├── jrcpv1_server
├── se052_deep_pwr_down
├── se052_reset_example
├── se05x_ConcurrentEcc
├── se05x_ConcurrentSymm
├── se05x_GetInfo
├── se05x_InvokeGarbageCollection
├── se05x_Minimal
└── se05x_MultipleDigestCryptoObj
tmp/work/armv8a-poky-linux/se05x/4.5.1-r0/image/usr/local/lib/
├── liba7x_utils.so
├── libex_common.so
├── libmwlog.so
├── libnxp_iot_agent_common.so
├── libse05x.so
├── libSEMS_LITE_AGENT_APIs.so
├── libsmCom.so
├── libSSS_APIs.so
├── libsssapisw.so
├── libsss_pkcs11.so
└── libsssProvider.so
Thank you @Igor , same for me too i have also just started to work on this, and i have also the same files in my rootfs but the problem that i facing that
1) ssscli tool and pkcs-tool i am not able to get (please help if you know anything)
2)how can i install all the demos binaries (if you know anything kindly help)
Hi @Igor Actually i have followed everything from there, the required libraries are there but the sssclitool is not present. Okay thanks for this. Btw are you able to use ssscli tool?
Yes, I installed the SSSCli tool.
After uploading the image to the target, I ran the following commands (the same you find in the Se05x recipe):
# cd /home/root/se05x_mw_v04.05.01/simw-top/pycli/src
# python3 setup.py develop
The last command returned the following error: AttributeError: module ‘cryptography.utils’ has no attribute ‘register_interface’
Then I downgraded the cryptography library:
# python3 -m pip install PGPy
# python3 -m pip uninstall -y cryptography
# python3 -m pip install cryptography==37.0.4
I ran the python3 setup.py develop command again and the installation was successful.
For now I stopped here.
I hope this helps
Thank you so much @Igor yeah it is very helpful. just a last question you ran all these commands on your board right?
and @Igor if you have installed pkcs-tool kindly please help me with that too i am unable to get it.
Thank you so much for these help!
Hi @Igor ,
It looks like a yocto issue, please kindly refer to https://lists.yoctoproject.org/g/yocto/topic/75700982?p=Created,,,20,2,0,0 for details.
Hope that helps,
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
HI Kan_Li,
To solve that issue, it seems to be necessary to add "INHIBIT_PACKAGE_STRIP_FILES" to the Secure Elements recipe in order to allow libraries to remain unstripped:
INHIBIT_PACKAGE_STRIP_FILES += "${PKGD}/home/root/${NXP-PLUG-TRUST-MW}/simw-top/ext/openssl/lib_mingw/libcrypto.a"
INHIBIT_PACKAGE_STRIP_FILES += "${PKGD}/home/root/${NXP-PLUG-TRUST-MW}/simw-top/ext/openssl/lib_mingw/libssl.a"
Hope that helps others who face same issue,
Igor