Adding openssl to toolchain/SDK

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

Adding openssl to toolchain/SDK

8,646 Views
termiflyer
Contributor I

I've successfully added OpenSSL to the fsl-core-image (debugging adding my own layer with the image) so I can use openssl from an application. How do I get the header files for OpenSSL into the SDK/ALT install tree (/opt/fsl-networking/...)? Or, am I supposed to add include paths back out to the target sysroot which has those files (E. G., tmp/sysrtoots/p4080ds_...)?

0 Kudos
Reply
6 Replies

4,801 Views
sivaprasathmani
Contributor I

We are adding the openssl binary into yocto sdk. While building yocto sdk we are facing the below error:

 

ERROR: core-image-sato-sdk-1.0-r0 do_populate_sdk: Could not invoke dnf. Command '/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /opt/workspace/yoctol/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/sdk/image/opt/poky/3.1.2/sysroots/corei7-32-poky-linux/etc/dnf/dnf.conf --setopt=reposdir=/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/sdk/image/opt/poky/3.1.2/sysroots/corei7-32-poky-linux/etc/yum.repos.d --installroot=/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/sdk/image/opt/poky/3.1.2/sysroots/corei7-32-poky-linux --setopt=logdir=/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/temp --repofrompath=oe-repo,/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/oe-sdk-repo --nogpgcheck install coreutils packagegroup-core-eclipse-debug run-postinsts packagegroup-core-ssh-openssh intel-vaapi-driver packagegroup-base-extended target-sdk-provides-dummy gstreamer1.0-vaapi perl packagegroup-core-standalone-sdk-target psplash kernel-devsrc packagegroup-core-sdk packagegroup-core-boot packagegroup-core-tools-testapps packagegroup-core-x11-sato dnf packagegroup-core-tools-profile packagegroup-core-x11-base packagegroup-core-tools-debug rpm' returned 1:
DNF version: 4.2.2
cachedir: /opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/sdk/image/opt/poky/3.1.2/sysroots/corei7-32-poky-linux/var/cache/dnf
Added oe-repo repo from /opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/oe-sdk-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Thu 03 Jun 2021 06:48:52 AM UTC.
Last metadata expiration check: 0:00:01 ago on Thu 03 Jun 2021 06:48:55 AM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: package packagegroup-base-extended-1.0-r83.intel_x86_32 requires libcrypto-bin, but none of the providers can be installed
- conflicting requests
- nothing provides /opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/hosttools/perl needed by libcrypto-bin-1.0.2n-r16.5.corei7_32
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

ERROR: Logfile of failure stored in: /opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/build/tmp/work/intel_x86_32-poky-linux/core-image-sato-sdk/1.0-r0/temp/log.do_populate_sdk.5622
ERROR: Task (/opt/workspace/yocto/Git_Repo/BUILD/i686/poky-dunfell-23.0.2/meta/recipes-sato/images/core-image-sato-sdk.bb:do_populate_sdk) failed with exit code '1'

Anyone can help on this?

0 Kudos
Reply

4,968 Views
adamhuang
Contributor III

How to check if the openssl library is integrated into yocto perfectly? there is only libssl.so.1.0.0 seen in /usr/lib folder. Can I integrate an openssl-devel package into yocto?

0 Kudos
Reply

5,354 Views
yipingwang
NXP TechSupport
NXP TechSupport

After building openssl in Yocto, the header files have been deployed in tmp/sysroots/p4080ds/usr/include/openssl/, tmp/sysroots/p4080ds/usr/include/ has been added into include paths in SDK bitbake build environment, so you could include these openssl header files directly for building other packages.

5,354 Views
termiflyer
Contributor I

yipingwang is there a way to unmark as "Assumed Answered"?  Maybe answered, but not solved! See follow up ...

0 Kudos
Reply

5,354 Views
termiflyer
Contributor I

That's what I expected and that is true, however it seems that I am using the SDK slightly improperly: when I install the SDK, there does not appear to be a p4080ds environment setup:

/opt/fsl-networking/QorIQ-SDK-V1.4/environment-setup-ppce500mc-fsl_networking-linux references the following sysroots:

export OECORE_NATIVE_SYSROOT="/opt/fsl-networking/QorIQ-SDK-V1.4/sysroots/x86_64-fsl_networking_sdk-linux"

export OECORE_TARGET_SYSROOT="/opt/fsl-networking/QorIQ-SDK-V1.4/sysroots/ppce500mc-fsl_networking-linux"

whereas tmp/environment-setup-ppce500mc-fsl_networking-linux references the following sysroots:

export OECORE_NATIVE_SYSROOT="/home/dave/qoriq14/build_p4080ds_release/tmp/sysroots/x86_64-linux"

export OECORE_TARGET_SYSROOT="/home/dave/qoriq14/build_p4080ds_release/tmp/sysroots/p4080ds"

tmp/sysroots/x86-64-linux/usr/include does indeed have the openssl headers (amongst many others), but /opt/fsl-networking/QorIQ-SDK-V1.4/sysroots/x86_64-fsl_networking_sdk-linux/usr/include does not (and only has python2.7).  /opt/fsl-networking/QorIQ-SDK-V1.4/sysroots/ppce500mc-fsl_networking-linux/usr/include does not have openssl headers either.

If i use the environment-setup that is installed with the SDK (e.g., installed via tmp/deploy/sdk/fsl-networking-eglibc-x86_64-ppce500mc-toolchain-1.4.sh) with autotools, the package build can't find the headers.  If i use the environment-setup in tmp, the build does find the headers.

What am i missing with regards to using the SDK that is built by bitbake?

0 Kudos
Reply

5,354 Views
yipingwang
NXP TechSupport
NXP TechSupport

After running "bitbake openssl", openssl header files have been deployed in tmp/sysroots/p4080ds/usr/include/openssl/ in Yocto build environment.

SDK 1.4 also provides standalone Toolchain as you mentioned, and there is no openssl headers in "/opt/fsl-networking/QorIQ-SDK-V1.4/sysroots/ppce500mc-fsl_networking-linux", if you want to use this standalone toolchain instead of the Yocto environment, you also could specify OECORE_TARGET_SYSROOT as "/home/dave/qoriq14/build_p4080ds_release/tmp/sysroots/p4080ds" in Yocto build environment.

0 Kudos
Reply