[Qbs] Using ConanfileProbe with yocto cross compiling toolchain

Christian Gagneraud chgans at gmail.com
Sat May 23 03:33:22 CEST 2020


On Sat, 23 May 2020 at 07:34, Richard Weickelt <richard at weickelt.de> wrote:
> > Thus I don't think that it should be made into the official Qbs codebase.
> > Maybe this code could be used in some How-To section or something.
>
> What's your experience in using Qbs with Yocto? Once you solved the
> EnvironmentScriptProbe, were there a lot of additional steps needed? Any
> pitfalls? I guess a howto would be nice in general and might be interesting
> for some people. On the other hand - and without having much knowledge about
> yocto - how high is the risk that this howto would be outdated by tomorrow?

Yocto is a "classic" for embedded Linux system. It's been around for
many years (ages).
It is a REFERENCE in this domain, is sponsored by the Linux
foundation, and SoC manufacturers contribute mainstream by providing
their own "hardware layer".
It support all common (and uncommon) architectures used in the
industry (PowerPC, Mips, Arm, ...)
Last but not least, Yocto is the technology behind Boot2Qt, Qt5 has
it's own layer:
https://www.yoctoproject.org/software-overview/layers/?searchTerm=meta-qt5,
and boot2qt-opensource too:
https://code.qt.io/cgit/yocto/meta-boot2qt.git/

Adding support for Yocto to Qbs is IMHO a big win.
Unfortunately using Yocto (aka. Poky, OpenEmbedded, ...) starts with
sourcing an env file.
An alternative to this probe would be a to make the qbs-setup-* tools
do the right thing when run from a shell which has sourced that file.
That will allow to setup different profiles for different version of
Yocto (typ. stable vs dev) and name them accordingly.

Call me crazy, but i would say that a qbs-setup-yocto tool that takes
a path to an env file would be a good idea, or something similar to
qbs-setup-android.

FYI, this is the sort of things the env file defines:
https://www.yoctoproject.org/docs/2.3.3/sdk-manual/sdk-manual.html#sdk-running-the-extensible-sdk-environment-setup-script

IMHO, it is worth having a quick look at the "app developer workflow":
https://www.yoctoproject.org/docs/2.3.3/sdk-manual/sdk-manual.html#sdk-use-devtool-to-add-an-application
Haven't tried, but i'm suspecting QtC integrates this somehow.

Chris


More information about the Qbs mailing list