[Qbs] Using ConanfileProbe with yocto cross compiling toolchain

Raphael Cotty raphael.cotty at gmail.com
Sat May 23 12:19:15 CEST 2020

I pushed some scripts in issue QBS-1188
They allow to compile qbs inside yocto and also to use qbs to compile
inside a recipe (just by inheriting from qbs).

But when developing code using qtc this is not very convenient so I have a
script that generates this kind of profile:

I've attached the different scripts.
It's not very clean but allows to use qbs/qtc without having to source the
yocto env.

Having a qbs-setup-yocto script/program could be used to achieve that.
This tool should be provided by qbs like all other qbs-setup-*.
I don't know what should be done about the qbs recipes. Trying to add them
in meta-qt?


Le sam. 23 mai 2020 à 03:34, Christian Gagneraud <chgans at gmail.com> a
écrit :

> 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
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20200523/a4a3ced3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt.conf
Type: application/octet-stream
Size: 1176 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20200523/a4a3ced3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qmake
Type: application/octet-stream
Size: 310 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20200523/a4a3ced3/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: post_yocto_install.sh
Type: application/x-shellscript
Size: 1236 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20200523/a4a3ced3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt5.conf
Type: application/octet-stream
Size: 1044 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20200523/a4a3ced3/attachment-0002.obj>

More information about the Qbs mailing list