This service is available only in Japanese-language.

構築

デバイスツリーファイルを追加したい

お世話になります。

imx8mplusボード用に新規デバイスツリーを
imx8mp-myboard.dts
という名前で追加したいのです。

現在は以下の手順で新規デバイスツリーをコンパイルして、手動で/bootパーティションに配置しています

以下のフォルダにデバイスツリーを配置する
\tmp\work-shared\imx8mpevk\kernel-source\arch\arm64\boot\dts\freescale\imx8mp-myboard.dts

Makefileを編集してビルド対象にする
\tmp\work-shared\imx8mpevk\kernel-source\arch\arm64\boot\dts\freescale\Makefile

dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-ndm.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-myboard.dts <--- 追加

ここで
  bitbake linux-imx -c devshell
make dtbs
を実行すると

以下のフォルダには imx8mp-myboard.dtbが作成されます
\tmp\work\imx8mpevk-poky-linux\linux-imx\6.6.36+git\build\arch\arm64\boot\dts\freescale

このファイルを/bootパーティションに手動でコピーしています。

-------------------------------------------------------------------------------------------------------------
この手動でdtbを配置するのではなく、bitbake linux-imxのビルドプロセスに組み込みたいのですが、
devshellを使用せずに、bitbake linux-imxを実行しても、追加配置したデバイスツリーのコンパイルが実行されず、
最終イメージに反映されません。

新規で追加したデバイスツリーのコンパイルとデプロイを
bitbake linux-imx
の構築手順に組み込むにはどうすればよいでしょうか。

ご存じあればご教授おねがいします。

Toaster構築での `source toaster start` でのエラーについて

Toaster構築において、以下の手順でコマンドを実行しました。
=====
$sudo apt install -y python3-pip

$python3 -m venv ~/mypy
$source ~/mypy/bin/activate

$pip3 install -r sources/poky/bitbake/toaster-requirements.txt

$source sources/poky/oe-init-build-env

$source toaster start webport=0.0.0.0:8400
=====

すると、以下のようなエラーが見られました。
=====
Updating distros 53%Failure while trying to setup toaster: 2047802
Traceback (most recent call last):
File "sources/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py", line 123, in _verify_be
call_command("lsupdates")
File "/home/pf2024/mypy/lib/python3.12/site-packages/django/core/management/__init__.py", line 181, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pf2024/mypy/lib/python3.12/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "sources/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py", line 290, in handle
self.update()
File "sources/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py", line 233, in update
pk=li_layer_branch_id_to_toaster_lv_id[index.distros[id].layerbranch_id]))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 2047802
=====

distroのフェッチ処理でエラーが出ていると思うのですが、エラーの原因がわからず、困っています。
エラーの原因と、その対策について、ご教示いただけますでしょうか?

nnsharkのfetchエラー

NXPのimx-docker環境でiMX8MPlus用のイメージを構築しています。
imx-image-core、imx-image-multimediaは構築できるのですが、imx-image-fullを構築する際に、nnsharkのfetchでエラーとなり失敗します。
解決方法をご存じであればご教授お願いいたします。

--------------------------------------------------------------------------------------------------------------------------------
WARNING: nnshark-2023.11.imx-r0 do_fetch: Failed to fetch URL gitsm://github.com/nxp-imx/nnshark.git;protocol=https;branch=2023.11.imx, attempting MIRRORS if available
ERROR: nnshark-2023.11.imx-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/sysroots-uninative/x86_64-linux/usr/bin:/opt/yocto/imx-6.6.3-1.0.0-build/sources/poky/scripts:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot/usr/bin/crossscripts:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot-native/usr/sbin:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot-native/usr/bin:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot-native/sbin:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/recipe-sysroot-native/bin:/opt/yocto/imx-6.6.3-1.0.0-build/sources/poky/bitbake/bin:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/hosttools"; export HOME="/home/satoshi"; LANG=C git -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/nxp-imx/nnshark.git /opt/yocto/imx-6.6.3-1.0.0-build/downloads//git2/github.com.nxp-imx.nnshark.git --progress failed with exit code 128, no output
ERROR: nnshark-2023.11.imx-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'gitsm://github.com/nxp-imx/nnshark.git;protocol=https;branch=2023.11.imx')
ERROR: Logfile of failure stored in: /opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-xwayland/tmp/work/armv8a-mx8mp-poky-linux/nnshark/2023.11.imx/temp/log.do_fetch.267
ERROR: Task (/opt/yocto/imx-6.6.3-1.0.0-build/sources/meta-imx/meta-imx-ml/recipes-nnstreamer/nnshark/nnshark_2023.11.imx.bb:do_fetch) failed with exit code '1'
--------------------------------------------------------------------------------------------------------------------------------

ROS2ユーザアプリのクロスコンパイル環境の構築

こんにちは。

Advantech社製エッジコンピュータEPC-R3720にて参考URL①を参考にし、Yocto+ROS2(Foxy)の環境を作成しました。
Linux自体のビルドは成功してSDカードにも書込め、ターゲットでの起動にも成功しました。
また、参考URL②を参考にしてツールチェーンの作成を行いました。

ただ、ROS2のユーザアプリ(node?)をクロスコンパイルする環境の作成方法がわからず困っています。
Ubuntu20.04(ROS2 Foxy インストール済み)にて参考URL②で作成したツールチェーンを使用して参考URL③のチュートリアルを行ったのですが、下記のエラーになってしまいます。

ーここからーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
$ source /opt/imx-robot-xwayland/1.0/environment-setup-aarch64-poky-linux
$ source /opt/ros/foxy/setup.bash
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ git clone https://github.com/ros/ros_tutorials.git -b foxy-devel
Cloning into 'ros_tutorials'...
remote: Enumerating objects: 3159, done.
remote: Counting objects: 100% (479/479), done.
remote: Compressing objects: 100% (201/201), done.
remote: Total 3159 (delta 313), reused 419 (delta 271), pack-reused 2680 (from 1)
Receiving objects: 100% (3159/3159), 718.13 KiB | 251.00 KiB/s, done.
Resolving deltas: 100% (1930/1930), done.
$ cd ..
$ rosdep install -i --from-path src --rosdistro foxy -y
#All required rosdeps installed successfully
$ colcon build
[0.653s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
'turtlesim' is in: /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
--allow-overriding turtlesim

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> turtlesim
--- stderr: turtlesim
CMake Error at CMakeLists.txt:12 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.

Could not find a package configuration file provided by "ament_cmake" with
any of the following names:

ament_cmakeConfig.cmake
ament_cmake-config.cmake

Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
"ament_cmake_DIR" to a directory containing one of the above files. If
"ament_cmake" provides a separate development package or SDK, be sure it
has been installed.

---
Failed <<< turtlesim [0.86s, exited with code 1]

Summary: 0 packages finished [1.21s]
1 package failed: turtlesim
1 package had stderr output: turtlesim
ーここまでーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
※/opt/imx-robot-xwayland/1.0/environment-setup-aarch64-poky-linux は、ツールチェーンのための環境設定

上記のYocto+ROS2(Foxy)上で動作するアプリをクロスコンパイルする環境の作成方法について何かアドバイスいただくことは可能でしょうか?

こちらで質問する内容なのか不明なのですが、商社を経由して製造メーカに質問したところ、こちらのサイトに誘導されましたのでトピックを作成した次第です。

参考URL①:https://forum.aim-linux.advantech.com/t/how-to-article-get-started-with-...
参考URL②:https://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_L...
参考URL③:https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Creatin...

ntpdateを追加できない

以下のページのBSPを使用し、ntpdateパッケージをイメージに含めようとしています。
https://github.com/TechNexion/tn-imx-yocto-manifest/tree/mickledore_6.1....

ですが、以下のようなログが表示され、追加できない状態です。

WARNING: Layer nxp-nfc should set LAYERSERIES_COMPAT_nxp-nfc in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Host distribution "ubuntu-24.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'ntpdate' (but /home/pf2024/Ubuntu/TechNexion/tn_ubuntu_22_04_6_1_55/sources/meta-imx/meta-sdk/recipes-fsl/images/imx-image-core.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'ntpdate' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['ntpdate']
ERROR: Required build target 'imx-image-core' has no buildable providers.
Missing or unbuildable dependency chain was: ['imx-image-core', 'ntpdate']

・「do_install:append」で、既存のntpdateバイナリファイルをインストール
・「PACKAGE_CLASSES」「EXTRA_IMAGE_FEATURES」をコメントアウト
・「DISTRO_FEATURES:append」の検討
等を行いましたが、イメージに追加できない状態です。

何か、策はありますでしょうか?

sshd.socketの無効化について

よろしくお願いします。
----
Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi-cm3-64" ←独自にマシン設定を作成
DISTRO = "poky"
DISTRO_VERSION = "4.0.9"
TUNE_FEATURES = "aarch64 armv8a crc cortexa53"
----
質問です。initをsystemdとした上で
・IMAGE_FEATURES:append = " ssh-server-openssh" ←local.conf
・IMAGE_INSTALL:append = " openssh"

「bitbake core-image-base」を実施しますと、systemdとしては「sshd.socket」および「sshd@.service」が有効になるかと思います。
とある理由から「sshd.service」に切り替えたいのですが、両者はunitファイルのConflicts関係なので「sshd.socket」を無効化したいと考えています。
しかし、systemdへのbbappendをどのように書けばよいのかがわかりません。

systemd_%.bbappendファイルを作成して、中身を
----
SYSTEMD_SERVICE:sshd = "sshd.socket"
SYSTEMD_AUTO_ENABLE:ssh = "disable"
----
としてみましたが、効果はありませんでした。どのようにすれば解決できるでしょうか?

Ti社製AM3358におけるPRUの使用について

デモビデオ:https://www.ti.com/ja-jp/video/5982634862001によれば、SDK:https://www.ti.com/tool/PROCESSOR-SDK-AM335Xを用いることで本CPUにおいてPRUがセットアップできるようになっておりこちらを使用したいと思っています。
Yoctoに関しては、Meta-ti kirkstone branchにPRU-ICSSのフォルダがあり、bb-layerに追加済みで、ビルド時に
おそらくインストール済みではないかと考えています。
ただし、
https://layers.openembedded.org/layerindex/recipe/378053/root/meta-ti-ex...
・PRU-ICSS<->ARM
/dev/以下にrpmsgがあるか確認したところ存在しておらず、インストール手順で抜けているところがあればコメントいただきたくお願いします。
また、デモビデオではADとの接続ができておりましたが、CAN・GPIOとの通信は可能でしょうか。(AM335xn構成をみれば、PRU-ICSS⇔L3andL4 interconnect⇔CAN/GPIOの経路はあると思われます)

レシピ、ソースコードの固定化

Yoctoで生成したディストリビューションを製品適用する場合、
使用しているOSSのライセンスに従い、ソースコードを公開する必要があります。

マニフェストファイルやレシピ、ソースコードは常に更新されているため、
環境構築やbitbakeを行うタイミングで変化する考えでおります。

各ビルドマシンで全く同じ環境で開発を行うにはリビジョンを固定する必要があると考えています。
質問なのですが、マニフェストやレシピ、ソースコードを固定した開発を行う場合、どのようにすればよいのでしょうか。

[i.MX8M Plus]USB3.0のファンクション設定について

初めて投稿させていただきます。
i.MX8M Plusの評価キット(8MPLUSLPD4-EVK)のサンプルコードについて質問させてください。

この評価キットには、USB3.0(Function)として動作させるサンプルコードは用意されておりますでしょうか?
Host側は「PC(OS:Windows11 USB2.0 / USB3.0)」としてデータ送受信できるようにさせたいです。

また、「USB3.0(Function)」を組み込むための環境構築やビルド手順などのマニュアルはありますでしょうか?
下記、NXPサイトのリファレンスマニュアルを見つけたのですが、USB2.0の設定という記載のため、
USB3.0(Function)として動作するか、事前に確認したいと思っております。
<https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf>
関連項目:「4.9 USB」「4.10 USB3」

もし回答をいただければとても助かります。
宜しくお願い致します。

Ubuntu 20.04上でdevtoolを使用するとエラーになる

Ubuntu18.04で問題なくビルド・devtoolの使用ができていたワークスペースに関して、
Ubuntu20.04にアップデートしたところ、devtool modify systemdにて下記エラーを出力するようになりました。
ビルドは問題なく可能です。

ビルド対象はOpenSTLinux,展開しようとしたレシピはsystemdです
解決策をご存知でしたらご教示いただけますでしょうか。

ERROR: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:devtool_post_unpack(d)
0003:
File: '/(省略)/layers/openembedded-core/meta/classes/devtool-source.bbclass', lineno: 68, function: devtool_post_unpack
0064:}
0065:
0066:
0067:python devtool_post_unpack() {
*** 0068: import oe.recipeutils
0069: import shutil
0070: sys.path.insert(0, os.path.join(d.getVar('COREBASE'), 'scripts', 'lib'))
0071: import scriptutils
0072: from devtool import setup_git_repo
File: '/home/makita/Doc/(省略)/layers/openembedded-core/meta/lib/oe/recipeutils.py', lineno: 21, function: <module>
0017:import shutil
0018:import re
0019:import fnmatch
0020:import glob
*** 0021:import bb.tinfoil
0022:
0023:from collections import OrderedDict, defaultdict
0024:from bb.utils import vercmp_string
0025:
File: '/(省略)/layers/openembedded-core/bitbake/lib/bb/tinfoil.py', lineno: 19, function: <module>
0015:from collections import OrderedDict, defaultdict
0016:from functools import partial
0017:
0018:import bb.cache
*** 0019:import bb.cooker
0020:import bb.providers
0021:import bb.taskdata
0022:import bb.utils
0023:import bb.command
File: '/(省略)/layers/openembedded-core/bitbake/lib/bb/cooker.py', lineno: 25, function: <module>
0021:import bb, bb.exceptions, bb.command
0022:from bb import utils, data, parse, event, cache, providers, taskdata, runqueue, build
0023:import queue
0024:import signal
*** 0025:import prserv.serv
0026:import pyinotify
0027:import json
0028:import pickle
0029:import codecs
File: '/(省略)/layers/openembedded-core/bitbake/lib/prserv/serv.py', lineno: 7, function: <module>
0003:#
0004:
0005:import os,sys,logging
0006:import signal, time
*** 0007:from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
0008:import threading
0009:import queue
0010:import socket
0011:import io
File: '/usr/lib/python3.8/xmlrpc/server.py', lineno: 117, function: <module>
0113:import socketserver
0114:import sys
0115:import os
0116:import re
*** 0117:import pydoc
0118:import traceback
0119:try:
0120: import fcntl
0121:except ImportError:
File: '/usr/lib/python3.8/pydoc.py', lineno: 370, function: <module>
0366: return module
0367:
0368:# ---------------------------------------------------- formatter base class
0369:
*** 0370:class Doc:
0371:
0372: PYTHONDOCS = os.environ.get("PYTHONDOCS",
0373: "https://docs.python.org/%d.%d/library"
0374: % sys.version_info[:2])
File: '/usr/lib/python3.8/pydoc.py', lineno: 400, function: Doc
0396: raise TypeError(message)
0397:
0398: docmodule = docclass = docroutine = docother = docproperty = docdata = fail
0399:
*** 0400: def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')):
0401: """Return the location of module docs or None"""
0402:
0403: try:
0404: file = inspect.getabsfile(object)
File: '/usr/lib/python3.8/sysconfig.py', lineno: 525, function: get_path
0521: """Return a path corresponding to the scheme.
0522:
0523: ``scheme`` is the install scheme name.
0524: """
*** 0525: return get_paths(scheme, vars, expand)[name]
0526:
0527:
0528:def get_config_vars(*args):
0529: """With no arguments, return a dictionary of all configuration
File: '/usr/lib/python3.8/sysconfig.py', lineno: 515, function: get_paths
0511: ``scheme`` is the install scheme name. If not provided, it will
0512: return the default scheme for the current platform.
0513: """
0514: if expand:
*** 0515: return _expand_vars(scheme, vars)
0516: else:
0517: return _INSTALL_SCHEMES[scheme]
0518:
0519:
File: '/usr/lib/python3.8/sysconfig.py', lineno: 177, function: _expand_vars
0173:def _expand_vars(scheme, vars):
0174: res = {}
0175: if vars is None:
0176: vars = {}
*** 0177: _extend_dict(vars, get_config_vars())
0178:
0179: for key, value in _INSTALL_SCHEMES[scheme].items():
0180: if os.name in ('posix', 'nt'):
0181: value = os.path.expanduser(value)
File: '/usr/lib/python3.8/sysconfig.py', lineno: 563, function: get_config_vars
0559:
0560: if os.name == 'nt':
0561: _init_non_posix(_CONFIG_VARS)
0562: if os.name == 'posix':
*** 0563: _init_posix(_CONFIG_VARS)
0564: # For backward compatibility, see issue19555
0565: SO = _CONFIG_VARS.get('EXT_SUFFIX')
0566: if SO is not None:
0567: _CONFIG_VARS['SO'] = SO
File: '/usr/lib/python3.8/sysconfig.py', lineno: 431, function: _init_posix
0427:def _init_posix(vars):
0428: """Initialize the module as appropriate for POSIX systems."""
0429: # _sysconfigdata is generated at build time, see _generate_posix_vars()
0430: name = _get_sysconfigdata_name()
*** 0431: _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
0432: build_time_vars = _temp.build_time_vars
0433: vars.update(build_time_vars)
0434:
0435:def _init_non_posix(vars):
Exception: ModuleNotFoundError: No module named '_sysconfigdata'

ページ