0

I have a RISC-V dev board for which I am building Yocto Linux. Some of the applications require OpenSSL and the development headers and libs to build the applications.

I have been able to add openssl in IMAGE_INSTALL in the bb recipe for the base image and sdk image. However, when I use the SDK, or Extensible SDK, I cannot build the target applications, because cmake cannot find openssl.

My current workaround has been to install the EXT SDK, invoke the SDK, then install openssl and the development headers and libraries with the following: $ devtool sdk-install openssl

My question is this: What do I have to add to my SDK recipes so that all of the development headers and static libraries for openssl end up in my target sysroot?

Modified SDK BitBake recipe DEPENDS/RDEPENDS environment variables to add openssl. Didn't seem to make a difference.

Also tried adding to the TOOLCHAIN_[HOST/TARGET]_TASK. That also did not work. I also tried adding openssl with devtool sdk-install openssl, and then deriving another SDK after the install using "devtool build-sdk". However after installing this EXT-SDK, I still saw errors indicating openssl was not found.

2 Answers 2

0

In your image.bb add:

TOOLCHAIN_HOST_TASK:append = " openssl"

This is rather implicitly suggested by the docs as well.

Take note:

  • Space before openssl: " openssl".
  • The TOOLCHAIN_HOST_TASK variable can only be changed from the image you build the SDK for or in your config, e.g. local.conf.

If this doesn't fix it, please provide more information, like the exact lines that you tried.

Sign up to request clarification or add additional context in comments.

Comments

0

Thanks for the suggestion Mo_

Because I'm cross-compiling, I needed to use the TOOLCHAIN_TARGET_TASK. Also, the application that I was developing needed the static library, so I needed to find in the Yocto build where the static libraries were being built.

Searching through the build history for the sysroot of interest (in my case riscv64-oe-linux), I found all of the related packages that were built as a result of adding openssl to my yocto build. Digging in further, I found that the static libs are built as part of openssl-staticdev.

So in summary, I needed to add the following TOOLCHAIN_TARGET_TASK:append = " openssl-staticdev"

Thanks again

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.