LoginSignup
4
6

More than 5 years have passed since last update.

YoctoでのQt5.5ビルドログ

Last updated at Posted at 2016-11-02

いきあたりばったりの個人的ログです

全体的には
http://embedded-software-architecture.com/?page_id=134
ここを参考に

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/usrfs/bin/repo
$ chmod a+x ~/usrfs/bin/repo
$ mkdir fsl-community-bsp
$ cd fsl-community-bsp
$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b master-next
$ repo sync
$ cd sources
$ git clone -b master-next https://github.com/meta-qt5/meta-qt5.git
$ cd ..
$ MACHINE=imx6dlsabresd source ./setup-environment build
$ cd conf
$ cp local.conf local.conf.orig
$ cd sources/meta-qt5
$ git checkout jethro
$ cd ../../

ビルド開始してみると

$ cd build
$ bitbake fsl-image-multimedia
NOTE: Your conf/bblayers.conf has been automatically updated.
NOTE: Your conf/bblayers.conf has been automatically updated.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    You system needs to support the en_US.UTF-8 locale.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

どうやらロケールがないらしい、/etc/local.genen_US.UTF-8のコメントアウトを外し

/etc/local.gen
en_US.UTF-8 UTF-8

以下のコマンドでロケール生成

$ sudo locale-gen

改めてbitbake実行

$ bitbake fsl-image-multimedia

qtのビルドでコケる

ERROR: qtbase-5.5.1+gitAUTOINC+5afc431323-r0 do_populate_sysroot: QA Issue: libQt5Widgets.la failed sanity test (workdir) in path /home/maueki/work/yocto/fsl-community-bsp/build/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/sysroot-destdir/usr/lib [la]

上記のようなエラーが31個ほど、いずれもQt関係

jethroではなくjethro-nextを使ってみる

$ cd ../sources/meta-qt5
$ git checkuot jethro-next
$ ../../build
$ bitbake fsl-image-multimedia

→ 変わらずエラー発生

ぐぐるとこのパッチを適用、とかいてあるもののすでに適用済み。
jethro使ってるのがまずいのかと考え上記パッチを手パッチで逆適用。

Qtはビルドできたが、次はboostがchecksum mismatchでビルド失敗

あまり良くはなさそうだが
fsl-community-bsp/sources/poky/meta/recipes-support/boost/boost-1.62.0.inc にあるチェックサムをエラーメッセージにあるチェックサムで無理やり上書きして続行

さらに次のエラー

ERROR: qtbase-5.5.1+gitAUTOINC+5afc431323-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: qtbase-examples-dev path '/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/packages-split/qtbase-examples-dev/usr/share/qt5/examples/widgets/tools/echoplugin/plugin/libechoplugin.so'
-dev package contains non-symlink .so: qtbase-examples-dev path '/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/packages-split/qtbase-examples-dev/usr/share/qt5/examples/widgets/tools/styleplugin/styles/libsimplestyleplugin.so'
-dev package contains non-symlink .so: qtbase-examples-dev path '/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/packages-split/qtbase-examples-dev/usr/share/qt5/examples/widgets/tools/plugandpaint/plugins/libpnp_extrafilters.so' [dev-elf]

やむなくqtbase-examplesをlocal.confから外す

今度はqtdeclarative-example-devで同じエラー

ERROR: qtdeclarative-5.5.1+gitAUTOINC+3e9f61f305-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: qtdeclarative-examples-dev path '/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.5.1+gitAUTOINC+3e9f61f305-r0/packages-split/qtdeclarative-examples-dev/usr/share/qt5/examples/quick/customitems/painteditem/TextBalloonPlugin/libqmltextballoonplugin.so'
-dev package contains non-symlink .so: qtdeclarative-examples-dev path '/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.5.1+gitAUTOINC+3e9f61f305-r0/packages-split/qtdeclarative-examples-dev/usr/share/qt5/examples/quick/imageprovider/ImageProviderCore/libqmlimageproviderplugin.so'
-dev package contains non-symlink .so: qtdeclarative-examples-dev path '/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.5.1+gitAUTOINC+3e9f61f305-r0/packages-split/qtdeclarative-examples-dev/usr/share/qt5/examples/qml/qmlextensionplugins/imports/TimeExample/libqmlqtimeexampleplugin.so' [dev-elf]

以下の変更を加えた

sources/meta-qt5/recipes-qt/qt5/qtdeclarative_git.bb
PACKAGES_remove = "${PN}-examples-dev ${PN}-examples-staticdev ${PN}-examples-dbg"

qtdeclarativeはこれでうまく言ったのでqtbase-examplesの方も同様の修正にした。
→ 結局qtbase-examplesはエラー

qtbase_git.bbのQT_CONFIG_FLAGSに-nomake examples追加

ビルド完了

起動

build/tmp/deploy/images/imx6dlsabresd にビルドイメージができている

SDカードへ焼く

$ zcat ./fsl-image-multimedia-imx6dlsabresd.sdcard.gz | sudo dd of=/dev/sdb

of指定は環境に合わせて。間違うとデスクトップのシステムが死んだりするので細心の注意を払う。

LVDSへの表示

起動するとLVDSにロゴはでるが、その後の出力がない。USB UARTで接続するとログインプロンプトは出るので起動は問題なさそう。

再起動してubootの変数を見ると

=> printenv
(省略)
video_interfaces=hdmi lvds lcd

となっていたので

=> setenv video_interfaces lvds hdmi lcd
=> saveenv
=> boot

これでペンギンとともに起動時の出力がLVDSに出るようになった。

スクリーンセーバーの無効化

$ echo 0 > /sys/class/graphics/fb0/blank

ツールチェインの作成

$ bitbake meta-toolchain-qt5

またしてもエラー

ERROR: qtsystems-5.5.1+gitAUTOINC+0577ffca58-r0 do_configure: Error calling /home/maueki/work/yocto/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/qt5/qmake -makefile -o Makefile     --disable-static  /home/maueki/work/yocto/fsl-community-bsp/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtsystems/5.5.1+gitAUTOINC+0577ffca58-r0/git/qtsystems.pro
ERROR: qtsystems-5.5.1+gitAUTOINC+0577ffca58-r0 do_configure: Function failed: do_configure (log file is located at /home/maueki/work/yocto/fsl-community-bsp/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtsystems/5.5.1+gitAUTOINC+0577ffca58-r0/temp/log.do_configure.1595)
ERROR: Logfile of failure stored in: /home/maueki/work/yocto/fsl-community-bsp/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtsystems/5.5.1+gitAUTOINC+0577ffca58-r0/temp/log.do_configure.1595

--disable-statisオプションを除けば良さそうだがいまいちどこで指定されているかわからなかった。

エラーしているのが、qtsystemsとqtconnectivityだったので、sources/meta-qt5/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb の RDEPENDS_${PN}から関係パッケージを除いてみる。

ビルド完了

インストール

$ cd build/tmp/deploy/sdk
$ sh ./poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.2.sh
(中略)
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/poky/2.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

最後の行はインストーラからのメッセージで、このコマンドを実行すると環境がセットアップされる。

クロスビルドしてみる

githubから持ってきたqt5.5/qtbaseのexample/widget/graphicsview/collidingmiceで実行

$ source /opt/poky/2.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
$ source /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/environment-setup.d/qt5.sh
$ qmake
 Project ERROR: Could not find feature force_asserts.

エラーが…

qt5.4で試してみる。

$ qmake
$ make
linking collidingmice
/home/maueki/work/qt5.4/qtbase/lib/libQt5Widgets.so: file not recognized: ファイル形式が認識できません
collect2: error: ld returned 1 exit status
Makefile:199: ターゲット 'collidingmice' のレシピで失敗しました
make: *** [collidingmice] エラー 1

なぜかツールチェインではなくqtbase内のライブラリ(これはデスクトップ用にビルドされていた)を見に行ってしまう。
このディレクトリを/opt/workにコピーしてみると。なぜかビルドが通った。

$ cp -r collidingmice /opt/work
$ cd /opt/work/colligingmice
$ qmake
$ make

gdbの追加

ボード上にgdbが無いので追加してみる。

build直下で実行

$ bitbake gdb

tmp/deploy/rpm/cortexa9hf_neon以下にrpmパッケージができている。
と、 ここまできてボード上にそもそもパッケージマネージャが入ってないことが判明。

build/conf/local.confのEXTRA_IMAGE_FEATURESpackage-managementを追加、ついでにIMAGE_INSTALL_appendgdbも追加して再ビルド。

SDカードに焼き直して無事完了

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6