This service is available only in Japanese-language.

構築

外部サイトへのアクセス

社内環境の都合でgitへアクセスできないためhttps://yoctobbq.lineo.co.jp/?q=node/183を参考に設定を変更したのですが成功しませんでした。説明に記載されているconf/local.confの一つ上のディレクトリ名はbuildで合っていますでしょうか?

また、「meta-poky/conf/site.conf.sampleを参考に site.conf ファイルを作成しプロジェクトを作成した後にconf/site.conf にコピーを行えば」という説明について具体的には、
meta-poky/conf/site.conf.sampleをコピーしてmeta-poky/conf/site.confとし、下記を追記すればよろしいのでしょうか?
PREMIRRORS_prepend = "\
git://.*/.* http://www.yoctoproject.org/sources/ \n \
ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
http://.*/.* http://www.yoctoproject.org/sources/ \n \
https://.*/.* http://www.yoctoproject.org/sources/ \n"

bitbakeエラー

Yoctoをビルドで失敗を繰り返しています。
具体的になにをすれば解決できるか、教えていただければ幸いです。

sa@sa-VirtualBox:~/user_work/build$ bitbake core-image-weston
WARNING: /home/sa/user_work/build/../poky/meta/lib/oe/maketype.py:99: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
if not isinstance(obj, collections.Callable):

WARNING: Host distribution "ubuntu-20.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: /home/sa/user_work/build/../meta-qt5/recipes-qt/qt5/qtbase_git.bb: base_contains is deprecated, please use bb.utils.contains instead. | ETA: 0:11:23
NOTE: /home/sa/user_work/build/../meta-qt5/recipes-qt/qt5/qtbase_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
NOTE: /home/sa/user_work/build/../meta-qt5/recipes-qt/qt5/qtbase_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
NOTE: /home/sa/user_work/build/../meta-qt5/recipes-qt/qt5/qtbase_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
NOTE: /home/sa/user_work/build/../meta-qt5/recipes-qt/qt5/qtbase_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
NOTE: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-qt/packagegroups/packagegroup-qt5-examples.bb: base_contains is deprecated, please use bb.utils.contains instead.
NOTE: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-qt/packagegroups/packagegroup-qt5-examples.bb: base_contains is deprecated, please use bb.utils.contains instead.
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/s3ctl-module/s3ctl-user-module.bb: Unable to get checksum for s3ctl-user-module SRC_URI entry s3ctl.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/omx-module/omx-user-module.bb: Unable to get checksum for omx-user-module SRC_URI entry RTM0AC0000ZMCL0100JPCL4.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/omx-module/omx-user-module.bb: Unable to get checksum for omx-user-module SRC_URI entry RTM0AC0000MVPL0100JPCL4.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/omx-module/omx-user-module.bb: Unable to get checksum for omx-user-module SRC_URI entry RTM0AC0000M264D100JPCL4.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/omx-module/omx-user-module.bb: Unable to get checksum for omx-user-module SRC_URI entry RTM0AC0000M264E100JPCL4.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/omx-module/omx-user-module.bb: Unable to get checksum for omx-user-module SRC_URI entry RTM0AC0000MVRC0100JPCL4.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb: Unable to get checksum for mmngrbuf-user-module SRC_URI entry mmngrbuf.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/mmngr-module/mmngr-user-module.bb: Unable to get checksum for mmngr-user-module SRC_URI entry mmngr.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/fdpm-module/fdpm-user-module.bb: Unable to get checksum for fdpm-user-module SRC_URI entry fdpm.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/vspm-module/kernel-module-vspm.bb: Unable to get checksum for kernel-module-vspm SRC_URI entry vspm-kernel.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/uvcs-module/kernel-module-uvcs.bb: Unable to get checksum for kernel-module-uvcs SRC_URI entry uvcs-kernel.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/s3ctl-module/kernel-module-s3ctl.bb: Unable to get checksum for kernel-module-s3ctl SRC_URI entry s3ctl-kernel.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/mmngr-module/kernel-module-mmngrbuf.bb: Unable to get checksum for kernel-module-mmngrbuf SRC_URI entry mmngrbuf.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/mmngr-module/kernel-module-mmngr.bb: Unable to get checksum for kernel-module-mmngr SRC_URI entry mmngr.tar.bz2: file could not be found
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-kernel/fdpm-module/kernel-module-fdpm.bb: Unable to get checksum for kernel-module-fdpm SRC_URI entry fdpm-kernel.tar.bz2: file could not be found
NOTE: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-bsp/u-boot/u-boot_2013.01.01.bb: base_contains is deprecated, please use bb.utils.contains instead.
WARNING: /home/sa/user_work/build/../meta-renesas/meta-rzg1/recipes-multimedia/vspm-module/vspm-user-module.bb: Unable to get checksum for vspm-user-module SRC_URI entry vspm-user.tar.bz2: file could not be found
Parsing recipes: 100% |########################################################################################################################| Time: 0:13:17
Parsing of 2178 .bb files complete (0 cached, 2178 parsed). 3033 targets, 268 skipped, 7 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.36.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "iwg20m-g1m"
DISTRO = "poky"
DISTRO_VERSION = "2.4.2"
TUNE_FEATURES = "arm armv7ve vfp neon callconvention-hard cortexa15"
TARGET_FPU = "hard"
SOC_FAMILY = "rzg1:r8a7743"
meta
meta-poky
meta-yocto-bsp = "tmp:342fbd6a3e57021c8e28b124b3adb241936f3d9d"
meta-rzg1 = "HEAD:3010443641f9a14d2f2a8044ddaa433c2eef2ea1"
meta-linaro-toolchain
meta-optee = "tmp:75dfb67bbb14a70cd47afda9726e2e1c76731885"
meta-oe
meta-multimedia
meta-python
meta-networking = "tmp:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta-qt5 = "tmp:c1b0c9f546289b1592d7a895640de103723a0305"
common
hmi-demo = "HEAD:14658c00367babf5b04b2a17414f7c8b8a7bdf70"

Initialising tasks: 100% |#####################################################################################################################| Time: 0:00:54
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: m4-native-1.4.18-r0 do_compile: oe_runmake failed
ERROR: m4-native-1.4.18-r0 do_compile: Function failed: do_compile (log file is located at /home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.4584)
ERROR: Logfile of failure stored in: /home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.4584
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 1 infodir=/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/share/info
| make all-recursive
| make[1]: Entering directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
| Making all in .
| make[2]: Entering directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
| make[2]: Nothing to be done for 'all-am'.
| make[2]: Leaving directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
| Making all in examples
| make[2]: Entering directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/examples'
| make[2]: Nothing to be done for 'all'.
| make[2]: Leaving directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/examples'
| Making all in lib
| make[2]: Entering directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make all-am
| make[3]: Entering directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| gcc -I. -I../../m4-1.4.18/lib -isystem/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -isystem/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o freadahead.o ../../m4-1.4.18/lib/freadahead.c
| ../../m4-1.4.18/lib/freadahead.c: In function ‘freadahead’:
| ../../m4-1.4.18/lib/freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| 92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| | ^~~~~
| make[3]: *** [Makefile:1915: freadahead.o] Error 1
| make[3]: Leaving directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[2]: *** [Makefile:1674: all] Error 2
| make[2]: Leaving directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[1]: *** [Makefile:1572: all-recursive] Error 1
| make[1]: Leaving directory '/home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
| ERROR: oe_runmake failed
| make: *** [Makefile:1528: all] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/sa/user_work/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.4584)
ERROR: Task (/home/sa/user_work/build/../poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 34 tasks of which 33 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/sa/user_work/build/../poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile
Summary: There were 18 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Ubootソースのパッチ適用について

YoctoイメージのU-Bootソースを変更するために下記の手順でパッチおよびレシピを作成しました。
bitbakeを実行するとエラーとなりました。
パッチの作り方および、パッチを当てるレシピの作成方法について間違っている部分があればご指摘ください。

●U-Bootソースコピー
$ mkdir -p ../local_repos/uboot-imx
$ cp -a tmp/work/imx8mmevk-poky-linux/u-boot-imx/1_2019.04-r0/git/. ../local_repos/uboot-imx
$ cd ../local_repos/uboot-imx
$ git reset --hard
$ git clean -fdx

●U-Bootソース編集およびパッチ作成
U-boot Source edit and save

$ git diff > u_boot_Change.diff

●U-Bootにパッチを当てるレシピ作成
$ cd /usr/local/tools-imx8mm/source/imx-yocto-bsp/Build_dir
$ bitbake-layers create-layer -p 9 ../local_repos/meta-uboot
$ bitbake-layers add-layer ../local_repos/meta-uboot
$ mkdir -p ../local_repos/meta-uboot/recipes-bsp/u-boot
$ cp ../local_repos/uboot-imx/u_boot_Change.diff ../local_repos/meta-uboot/recipes-bsp/u-boot
$ vi ../local_repos/meta-uboot/recipes-bsp/u-boot/uboot_git.bbappend
SRC_URI += "u_boot_Change.diff"

●bitbake実行
$ bitbake imx-image-full
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 4069 entries from dependency cache.
ERROR: No recipes available for:
/usr/local/tools-imx8mm/source/imx-yocto-bsp/local_repos/meta-uboot/recipes-bsp/u-boot/uboot_git.bbappend

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

既存ドライバの組み込み

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

i.MX8M Mini EVKの環境で、realtek 8821au/8812auチップを使用したUSB-WiFiを使用したく、
ドライバをモジュールとして組み込んだのですが、modprobeすると
[WARNING: Module rtl8812au not found in directroy /lib/modules/4.14.98-2.3.1+g860ec89]
とエラーとなってしまいます。
実際に/lib/modules/4.14.98-2.3.1+g860ec89/kernel/drivers/net/wirelessを見ても、
broadcomのディレクトリしかなく、組み込んだはずのrealtek関連のモジュールは一つもありませんでした。
どのようにしたら、ドライバを組み込むことができるのでしょうか?
手順が何か足りないのでしょうか?

■行ったこと
 1)ソースコードを取得
  https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip
 2)ソースをYoctoの下記ディレクトリに展開
  /build/tmp/work-shared/imx8mmevk/kernel-source/drivers/net/wireless/realtek/rtl8812au/
 2)使用するUSB-WiFiドングルをLinuxPCに差し込み、
   lsusbでデバイスIDを確認。
 3)ソースのos_dep/linux/usb_intf.c に、使用するUSB-WiFiの情報を追記
   {USB_DEVICE(0x****, 0x****),.driver_info = RTL8821},
 4)/build/tmp/work-shared/imx8mmevk/kernel-source/drivers/net/wireless/realtek/KConfig
   に下記を追記
   Source "drivers/net/wireless/realtek/rtl8812au/Kconfig"
 5)bitbake linux-imx –c menuconfig で
    Device Drivers->Network device support->Wireless LAN->Realtek devices->Realtek 8812A USB WiFi
    をモジュール選択
 6)bitbake fsl-image-qt5-validation-imx でビルド
 7)cd tmp/deploy/images/imx8mmevk
   bunzip2 -dk -f fsl-image-qt5-validation-imx-imx8mmevk.sdcard.bz2
 8)生成されたfsl-image-qt5-validation-imx-imx8mmevk.sdcardをbalenaEtcherというツールで
   SDカードに書き込み

Yocto SDKについて

Yoctoイメージをビルドした環境で、下記のようにSDKの構築を行いました。

$ bitbake fsl-image-qt5-validation-imx -c populate_sdk

$ ls tmp/deploy/sdk
fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-validation-imx-aarch64-toolchain-5.4-zeus.host.manifest
fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-validation-imx-aarch64-toolchain-5.4-zeus.sh
fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-validation-imx-aarch64-toolchain-5.4-zeus.target.manifest
fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-validation-imx-aarch64-toolchain-5.4-zeus.testdata.json

質問1
 QtCreatorを使った開発環境構築したいのですが、上記のSDKをインストールするだけで
 Qt5用のクロスコンパイルツールキットは構築可能でしょうか?

 Debian10.1上にi.MX7用のクロスコンパイル環境を用意したときは下記の手順を踏みました。
  1.i.MX7用のクロスコンパイルパッケージインストール
  2.Qt5コンパイルに必要なパッケージインストール
  3.i.MX7上で動作しているルートファイルシステムイメージを取得して、開発環境側で展開
  4.gitでQt5ソースコード取得
     git clone https://github.com/qt/qt5.git
     cd qt5 
     git checkout 5.13
     git submodule update --init
  5.Qt5ビルドとインストール
  6.QtCreatorインストールとツールキット設定

 上記SDKで、Qt5ライブラリまでビルドされているのであれば、QtCreatorをインストールして、ツールキットを
 設定するだけで構築できると思います。

質問2
 Yocto SDKのみをインストールした、クロスコンパイル開発環境OSイメージを作成したいのですが、
 tmp/deploy/sdk以下をコピーして、「fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-validation-imx-aarch64-toolchain-5.4-zeus.sh」を
 実行するだけでSDKを構築可能でしょうか?
 Yoctoソースコード一式必要でしょうか?

initfamfsの追加について

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

カーネルとrootfs(cpio.gz)、dtbをそれぞれ別ファイルで作成し、
Yoctoが起動出来ないか検討しております。

cpio.gzを読み込むと以下のエラーメッセージが表示され、うまく読み込めませんでした。
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

IMAGE_FSTYPES = "cpio.gz"以外に必要な設定があるのでしょうか?

※ブートは以下のような設定としております。
booti ${loadaddr} ${initrfs_addr} ${fdt_addr};'

ドライバ開発環境の構築

NXPのi.MX8m Mini EVKボードで開発準備を進めています。

bitbake core-image-minimal -c populate_sdk
で、アプリケーション用のSDKを作り、"hello world" を コンソール表示する
アプリケーションは作れることを確認しました。

次にカーネルモジュールを作成する環境を作りたいのですが
同様な方法では作成できないのでしょうか?
bitbake meta-toolchain
で、SDKを作り、"hello world"とprintkするkoファイルを作りたかったのですが
linux/init.hが見つからないといわれてしまいました。
SDK先のincludeディレクトリを-Iで指定しても同じ結果でした。

何が間違っているのでしょうか?
(そもそも、開発手法として間違っていて、
 カーネルモジュールはレシピを書いて開発するものですか?)

カーネルコンフィグの設定を上書きしたい(TIのBSP)

TIのBSP(meta-tiやmeta-aragoなどのレイヤー)を使用した構築に取り組んでいます。
自前のカーネルコンフィグを元に.configを変更するにはどうすればよいでしょうか。
カーネルのレシピにはlinux-ti-stagingというものが用いられているようであり、

$ MACHINE=<ボード名> bitbake linux-ti-staging -c listtasks

を実行してみたところ、どうやらdo_configureというタスクでカーネルコンフィグが設定されているようです。
しかしMACHINEに応じてカーネルコンフィグが設定される流れが理解しづらく、どこにパッチを当てればよいか分かりません。

MACHINEに応じてレシピの挙動を変えたい

特定のMACHINEの時のみ挙動が変わるレシピを作りたい場合はどうすればよいでしょうか。
例えば
$ MACHINE=hoge bitbake <レシピ名>
といった形でビルドを行う際、MACHINE=hogeのときだけ特別なパッチが当たったり、追加のタスクが実行されるようにしたいです。

postgresqlを含めたツールチェインについて

ツールチェイン(populate_sdk)を作成しようと試みたところ、エラーが発生して停止しました。
エラーの内容を確認してみると、以下の内容が表示されていました。
- package postgresql-11.5-r0.aarch64 requires libperl.so.5()(64bit), but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

通常のイメージ作成(bitbake core-image-minimal)は成功し、libperl.so.5もrootfsのuser/libに展開されていました。
またIMAGE_INSTALL_appendからpostgresqlを外すと、populate_sdkが完了いたします。

postgressqlを含めたsdkを作成する場合、何か良い方法は無いでしょうか?
※allowerasingのオプションを追加する方法などご教授願えればと考えております。

ページ