This service is available only in Japanese-language.

構築

devtool で FetchError: Recipe uses a floating tag/branch without a fixed SRCREV

いつもお世話になってます。

Compulab ボード用に Yocto/Kirkstone でイメージをビルドしてます。(https://github.com/compulab-yokneam/meta-bsp-imx8mp/blob/kirkstone-2.2.0...)。 ボードはucm-imx8m-plus SOM です。

bitbake linux-compulab

でビルドしていて、いくつかエラーがありましたが、それらを修正して今はエラーなしでビルドできています。イメージ全体(imx-image-multimedia)のビルドもエラーなくできます。そこで、devtoolを使用してソースの変更を行いたいのですが、

devtool modify linux-compulab

を行ってから、再び同じ:

bitbake linux-compulab

を行うと、長々とエラーが出ます。おそらくエラーのキモはこれではないかと思います:

bb.fetch2.FetchError: Fetcher failure: Recipe uses a floating tag/branch without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev() (use SRCPV in PV for OE).

ググってみると同じような件がいくつかヒットしますが、解決方法がよくわかりません。
devtool reset linux-compulab で、devtoolの使用をやめると、再びビルドできるようになります。
何か解決策がありますでしょうか?

pppd コマンドを生成する方法をご教授ください

wsl2 環境下でUbuntu-20.04 上にて imx-5.15.52-2.1.0(imx-linux-kirkstone) を使用して i.MX8MPlus EVK 用のイメージを作成しようとしています。
ppp 機能を有効にしたいと考えており、カーネルの設定変更を行いました。
ビルド後にrootfs を確認すると /lib/modules/5.15.52・・・/kernel/drivers/net/ppp/ フォルダが生成されており、ppp*.ko ファイルが配置されているのを確認できました。
このライブラリを使用する pppd などのコマンドを生成する方法が分からず試行錯誤しています。
古い linux では toolchain の設定変更で生成するコマンドを選択できた記憶があるのですが、yocto では pppdコマンドの生成をどのように行うのでしょうか。
ご教授をお願いいたします。

gcc-12.2.0-r0 do_compileが失敗する

bitbake core-image-minimal -c populate_sdk_ext を実行した際にエラーが発生してしまいます。
解消のためご助言をいただけましたら幸いです。
実行時のログは下記のとおりです。

NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "2.2.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-22.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "qemuarm64"
DISTRO = "poky"
DISTRO_VERSION = "4.1.3"
TUNE_FEATURES = "aarch64 armv8a crc cortexa57"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "langdale:91d0157d6daf4ea61d6b4e090c0b682d3f3ca60f"
meta-msgq = "<unknown>:<unknown>"
省略
NOTE: Running task 2057 of 3754 (/home/user/yocto/poky/meta/recipes-devtools/gcc/gcc_12.2.bb:do_compile)
NOTE: recipe gcc-12.2.0-r0: task do_compile: Started
ERROR: gcc-12.2.0-r0 do_compile: oe_runmake failed
ERROR: gcc-12.2.0-r0 do_compile: ExecutionError('/home/user/yocto/build/tmp/work/cortexa57-poky-linux/gcc/12.2.0-r0/temp/run.do_compile.1969548', 1, None, None)
ERROR: Logfile of failure stored in: /home/user/yocto/build/tmp/work/cortexa57-poky-linux/gcc/12.2.0-r0/temp/log.do_compile.1969548
NOTE: recipe gcc-12.2.0-r0: task do_compile: Failed
ERROR: Task (/home/user/yocto/poky/meta/recipes-devtools/gcc/gcc_12.2.bb:do_compile) failed with exit code '1'
NOTE: Running task 2058 of 3754 (/home/user/yocto/poky/meta/recipes-extended/unzip/unzip_6.0.bb:do_compile)
NOTE: recipe unzip-1_6.0-r5: task do_compile: Started
NOTE: recipe unzip-1_6.0-r5: task do_compile: Succeeded
NOTE: Tasks Summary: Attempted 2058 tasks of which 0 didn't need to be rerun and 1 failed.

解決方法として、
$ bitbake -c cleansstate gcc
$ bitbake gcc
を実行してgccパッケージのビルドをやり直してみたのですが、以下のエラーが出てしまいます。

省略
-o gimple-match.o -MT gimple-match.o -MMD -MP -MF ./.deps/gimple-match.TPo gimple-match.cc
| {standard input}: Assembler messages:
| {standard input}:2015626: Warning: end of file not at end of a line; newline inserted
| {standard input}:2016729: Error: unknown pseudo-op: `.lo'
| {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
| aarch64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus
| compilation terminated.
| make[1]: *** [Makefile:1144: gimple-match.o] Error 1
| make[1]: Leaving directory '/home/user/yocto/build/tmp/work/cortexa57-poky-linux/gcc/12.2.0-r0/gcc-12.2.0/build.aarch64-poky-linux.aarch64-poky-linux/gcc'
| make: *** [Makefile:4619: all-gcc] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/user/yocto/poky/meta/recipes-devtools/gcc/gcc_12.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 694 tasks of which 689 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/user/yocto/poky/meta/recipes-devtools/gcc/gcc_12.2.bb:do_compile
Summary: There were 2 ERROR messages, returning a non-zero exit code.

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

[kirkstone] "bitbake linux-raspberrypi -c devshell"で行った変更を取り消したい

お世話になります。

現在、kirkstoneを使用してRaspberry Pi CM4のOSイメージの構築を行っております。その作業の中で、カーネルに変更を加えるべく以下の作業を行いました。
 (1) 「bitbake linux-raspberrypi -c devshell」を実行してカーネルソースに変更を加える。
 (2) 「git status」を実行。
 (3) 「git add .」を実行。
 (4) 「git commit -m "変更理由等"」を実行。
 (5) 「git format-patch -n HEAD^」を実行。

と、ここまでの手順によって出来上がったパッチを指定した「linux-raspberrypi_5.10.bbappend」として配置。
その後、"bitbake core-image-base"を実行しました。
------------------
DESCRIPTION = "Kernel change"
SUMMARY = "Custom package"
SECTION = "Yamaguchi"
LICENSE = "CLOSED"
PR = "r0"
LIC_FILES_CHKSUM = "file:///${COMMON_LICENSE_DIR}/eCos-2.0;md5=8c3ea41d02fa9c9253c692351e5940e7"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
file://0001-CHANGE.patch \
"
------------------
ここまでは順調でした。変更も反映されました。

問題はここからなのですが、上記で行った変更をやめることとなり、bitbakeで反応しないよう上記のbbappendの拡張子を変更(->linux-raspberrypi_5.10.bbappend.rej)。
イチから構築しなおそうと以下のフォルダを削除し"bitbake core-image-base"を再度実行しました。
 ・build/cahce
 ・build/sstate-chache
 ・build/tmp

すると、パッチの中で追加したソースコードが見つからないというエラーで停止してしまいました。「bitbake linux-raspberrypi -c devshell」を実行し、そこで「git reflog」を行ったところ、どうもリポジトリの中に上記のコミット内容が残っているようです。
構築物は上記のフォルダを削除(残りは build/conf と build/download のみ)にしても上記の変更が消えないということになります。

これはどういうことが原因で起こっているものなのでしょうか?

カーネルオブジェクト(.ko)をmoduels-*.tgzに追加する方法?

お世話になります。Yocto初心者です。

Compulab社のimx8mp システムに新たにカメラセンサー用のデバイスドライバ(.ko)を追加しようとしています。最終的には、このドライバは /lib/modules/5.10.72/extra/ の下に追加されることになります。
bitbake imx-image-multimedia でビルドしてできた imx-image-multimedia-ucm-imx8m-plus.wic.bz2 をeMMCにフラッシュすると、正しく /lib/modules/5.10.72/extra/ にドライバがあります。

困っているのは、同時に生成される modules-*.tgz ファイルに、このドライバが含まれていないことです。製品のソフトウエアアップデート時に、フルのFailesystemではなく追加のファイルだけを配布する仕組みになっているので、modules* に .ko ファイルが含まれるようにしたいと思っています。

既存のデバイスドライバファイルは /lib/modules/5.10.72/kernel/drivers/ に位置していて、これらのファイルは modules* に既に含まれています。新ドライバのファイルを後から modules* に追加すればもちろん問題は回避できるのですが、できれば bitbake でそのまま生成できる方法があればと思い質問させていただきました。

The build has stopped, as continuing in this scenario WILL break things

Yocto/BitBake 初心者です。
既存のソースツリーに、新たにパッチをあてて、再ビルドをしようとしていて、Bitbakeでエラーがでています。

The build has stopped, as continuing in this scenario WILL break things - if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would, however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error, however switching DISTRO_FEATURES on an existing build directory is not supported - you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: linux-compulab-5.10-r0 do_packagedata: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: Logfile of failure stored in: /home/slroot/master/NXPBuild/build-ucm-imx8m-plus/tmp/work/ucm_imx8m_plus-poky-linux/linux-compulab/5.10-r0/temp/log.do_packagedata.6269
ERROR: Task (/home/slroot/master/NXPBuild/sources/meta-bsp-imx8mp/recipes-kernel/linux/linux-compulab_5.10.bb:do_packagedata) failed with exit code '1'

当てているパッチはimx219センサーに関するものなので、それ関連のエラーがでるのは予想の範囲と言えるのですけど、いったいどこに問題があるのかが全く分からずに困っています。
tmpディレクトリや、deployディレクトリを削除したり、bitbake -c cleanall をしてみましたが、同じ結果でした。
ビルドしているのは Compulab の imx8mp 用の、imx-image-multimedia です。
少しでもヒントをいただけたらと思い投稿してみました。

「implicit-function-declaration」エラーが解消できない

●NXPの BSPを使用して、linux-imxのカーネルコンフィグレーションを行い、
「bitbake linux-imx」を行うと「do_compile」タスクで、以下のエラーが発生し、解消できない。

…(略)…
| …/kernel-source/drivers/video/fbdev/mxsfb.c: In function 'mxsfb_suspend':
| …/kernel-source/drivers/video/fbdev/mxsfb.c:2452:2:
error: implicit declaration of function 'mxsfb_overlay_suspend'; did you mean 'mxsfb_runtime_suspend'? -Werror=implicit-function-declaration
| mxsfb_overlay_suspend(host);
| ^~~~~~~~~~~~~~~~~~~~~
| mxsfb_runtime_suspend
| …/kernel-source/drivers/video/fbdev/mxsfb.c: In function 'mxsfb_resume':
| …/kernel-source/drivers/video/fbdev/mxsfb.c:2472:2:
error: implicit declaration of function 'mxsfb_overlay_resume'; did you mean 'mxsfb_overlay_exit'? -Werror=implicit-function-declaration
| mxsfb_overlay_resume(host);
| ^~~~~~~~~~~~~~~~~~~~
| mxsfb_overlay_exit
…(略)…

①「mxsfb.c:2452/2472」を見てみると、以下のように関数およびマクロ定義されています。
2142:#ifdef CONFIG_PM_SLEEP
2146:static void mxsfb_overlay_resume()
  …(略)…
2168:static void mxsfb_overlay_suspend()
  …(略)…
2185:#endif

2411:#ifdef CONFIG_PM
2412:static int mxsfb_runtime_suspend()
  …(略)…
2427:static int mxsfb_runtime_resume()
  …(略)…
2442:#endif

2444:#ifdef CONFIG_PM_SLEEP
2445:static int mxsfb_suspend()
  …(略)…
2452: mxsfb_overlay_suspend(host)
  …(略)…
2464:static int mxsfb_resume()
  …(略)…
2472: mxsfb_overlay_resume(host)
  …(略)…
2479:#endif

2481:static const struct dev_pm_ops mxsfb_pm_ops = {
2482: SET_RUNTIME_PM_OPS(mxsfb_runtime_suspend, mxsfb_runtime_resume, NULL)
2483: SET_SYSTEM_SLEEP_PM_OPS(mxsfb_suspend, mxsfb_resume)
2484:};

②「.config」では、以下のように定義されています。
CONFIG_PM_SLEEP=y
CONFIG_PM=y

特に問題ないように思うのですが、何故「mplicit-function-declaration」エラーが発生するのかわかりません。
何か、知見がございましたらご教授いただけないでしょうか?

なお、開発環境は以下のとおりです。
● 環 境
・i.MX Linux Yocto Project BSP 4.14.98_2.3.3 Release
・BitBake Build Tool Core version 1.38.0

よろしく、お願いします。

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
================================================================================================
となっています。

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

パッケージ取得先を「source.codeaurora.org」からローカル(将来的には git.codelinaro.org)に変更したい。

よろしくお願いします。

i.MX6ULでのyocto(honister)を使ったLinux構築を行っております。
基本的な手順はこちら<https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf>を参照しているのですが、カーネルソースの取得先は「git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=lf-5.15.y」となっております。
# 通常、honisterでは v5.14 ですが NXP(freescaleコミュニティ)で独自に v5.15 対応をしています。

ただ、このリポジトリはすでに更新が完了しており「git.codelinero.org」へ移行されたとサイト上で公告されています。以下、その和訳です。
----
注意:Qualcomm Innovation Center Inc.が管理するリポジトリは、git.codelinaro.orgに移行されました。このサイトのQUICリポジトリは、2022年3月31日以降に更新されず、2023年3月31日に削除されます。
これらのリポジトリに依存しているプロジェクトでは、新しい最新のプロジェクトの場所を使用するようにツールの設定を調整してください。
----

do_fetchにて上記のURLから取得しようとすると404が返り、ミラーの「http://sources.openembedded.org/git2_source.codeaurora.org.external.imx....」を取得しようとして途中で「Read error at byte 208551397/1488668463 (Connection timed out). Giving up.」で失敗するようです。
→なのでwgetを使って根気よくリトライしてローカル環境にダウンロードしました。

それで、既存のレシピをcodeaurora.orgからローカルに向けるためにbbappendを用意しようと思うのですが、いかんせんNXPのレシピはなんだか複雑で単純にbbappendを用意しただけですとうまくいかず、sources.openembedded.orgから取得しようとします。
以下、作成した「linux-imx_5.15.bbappend」です。取得先をローカルに強制しようと考えてこのようにしましたがうまくいきませんでした。
----
require recipes-kernel/linux/linux-imx.inc

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"

DEPENDS += "lzop-native bc-native"

SRCBRANCH = "lf-5.15.y"
LOCALVERSION = "-lts-next"
KERNEL_SRC = " \
file://git2_source.codeaurora.org.external.imx.linux-imx.git.tar.gz \
"
SRC_URI = "${KERNEL_SRC}"
#SRCREV = "c1084c2773fc1005ed140db625399d5334d94a28"
SRCREV = ""

# Do not fetch Seaquence
do_fetch:append() {
:
}
----

ここまででなにかアドバイスなどいただけますとありがたいです。
よろしくお願いします。

sdk環境にC++の新しいライブラリを後から入れることができるのかどうか

古いyoctoのバージョンのsdkには、新しいC++のライブラリが入っていない場合があります。

(例)sumoのsdk
fatal error: filesystem.h: No such file or directory
#include <filesystem.h>

そこで2点ご質問がございます。

① この古いSDK環境に、手動でライブラリを導入することは難しいでしょうか?
② 最新のYoctoのsdkでアプリのバイナリイメージを作成し、古いYoctoで動いているプラットフォームで動かすことは可能でしょうか?

ページ