This service is available only in Japanese-language.

i.MX向けBSP 5.15.32-2.0.0のimx-image-fullの構築でnnsharkのdo_configureでエラーになる

社内からの問い合わせです。

NXPのi.MX向けの最新BSP 5.15.32-2.0.0 を入手して、imx-image-full の構築を実行したところ、
コンソールには
ERROR: nnshark-2021.10.imx-r0 do_configure: ExecutionError
と表示され、
tmp/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/temp/log.do_configure では
================================================================================================
Cloning into '/home/lineo/imx/5.15.32-2.0.0/build-xwayland/tmp/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/git/common'...
fatal: unable to look up anongit.freedesktop.org (port 9418) (Temporary failure in name resolution)
fatal: clone of 'git://anongit.freedesktop.org/gstreamer/common' into submodule path '/home/lineo/imx/5.15.32-2.0.0/build-xwayland/tmp
/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/git/common' failed
Failed to clone 'common'. Retry scheduled
Cloning into '/home/lineo/imx/5.15.32-2.0.0/build-xwayland/tmp/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/git/common'...
fatal: unable to look up anongit.freedesktop.org (port 9418) (Temporary failure in name resolution)
fatal: clone of 'git://anongit.freedesktop.org/gstreamer/common' into submodule path '/home/lineo/imx/5.15.32-2.0.0/build-xwayland/tmp
/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/git/common' failed
Failed to clone 'common' a second time, aborting
There is something wrong with your source tree.
You are missing common/gst-autogen.sh
================================================================================================
となっています。

どうすれば構築がとおりますか?

今回リリースされた i.MX向けBSP 5.15.32-2.0.0 は、ベースとなるYoctoのバージョンが4.0 LTS(kirkstone) に変更となっています。
Yocto4.0では、bitbakeのリビジョンが、2.0 に変更されるなど、いくつかの仕様変更がおこなわれています。
弊社のブログ https://www.lineo.co.jp/blog/yocto/vol01-kirkstone.html でも紹介していますが
タスク内でのネットワークアクセスの原則禁止への対応が行われていないのが原因となります。
do_configure タスクの中で fatal: unable to look up anongit.freedesktop.org (port 9418) となっているよう、
nnshark の configure スクリプト内で、ネットワークアクセスを試み、遮断されているためエラーとなっています。

よって、do_configureタスクに対してネットワーク許可を与えるbbappendを作成すれば
外部ネットワークへのアクセスも可能となり構築が通るようになります。

以下の内容の nnshark_2021.10.imx.bbappend を作成して、構築確認を行っています。
=====================================
do_configure[network] = "1"
=====================================

 

imx-image-full の bitbake に関して、こちらを参照して以下を実施しました。
do_configure[network] = "1" を ~/imx-yocto-bsp/sources/meta-imx/meta-ml/recipes-nnstreamer/nnshark 以下の
・nnshark_2021.10.imx.bb に追加 or
・nnshark_2021.10.imx.bbappend を作成し、記載

しかしエラーによりイメージビルドができませんでした。エラー文を見ると、

| fatal: repository 'https://anongit.freedesktop.org/gstreamer/common/' not found
| fatal: clone of 'git://anongit.freedesktop.org/gstreamer/common' into submodule path '<ホームディレクトリ>/imx-yocto-bsp/build-wayland/tmp/work/armv8a-poky-linux/nnshark/2021.10.imx-r0/git/common' failed
| Failed to clone 'common'. Retry scheduled

と表示されていました。ここでリポジトリの URL https://anongit.freedesktop.org/gstreamer/common/ にアクセスしてみると 404 でしたので、この URL が異なっているのかと思うのですが、いかがでしょうか?
https://gitlab.freedesktop.org/gstreamer/common/-/issues/5 では異なる URL をサジェストされています。)
もし、この URL の修正が必要な場合、どこを編集するのが適当か分かりませんでしょうか?

以上、よろしくお願いいたします。

当該レシピですが、meta-imx-ml として5.15.5_1.0.0 でも存在していましたが、その際当方の環境では特にエラーが出ることなく構築出来ておりました。
5.15.5-1.0.0 で同様な現象が出る場合は、do_configure 実行中のネットワークアクセスにおいて、gitのプロトコルでエラーが発生していることが考えられます。(do_fetchの場合は、bitbake側でproxyの設定を行うことができますが……)
なお、最新の5.15.52-2.1.0 では、imx8p以外のマシンではnnsharkではなく、gst-shark を使用するようpackagegroup-imx-ml.bb が変更されています。imx-image-full の構築が目的でnnsharkに拘りが無いようでしたら5.15.52-2.1.0 をご利用いただければ構築は通ると考えます。