ユーザ用ツール

サイト用ツール


raspberry_pi_4でyocto_project入門

Raspberry Pi 4でYocto Project入門

(2022/7/12)

Raspberry Pi 4とWSL2を使ってYocto Project入門 - Qiita

に従って試してみる。(Beelink-u59にて)

bitbake-layers add-layer ../meta-raspberrypi/

まで実行。ツールが足らないとか言われてる。そうそう、ツール類をインストールするのを忘れていた。

$ sudo apt install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping libsdl1.2-dev xterm

と言われるがままに実行。すでにインストールしているものはたくさんあるが、していないものもそこそこあるため。

今度は成功。 meta-raspberrypiが追加されたみたい。ここから先は明日にしよう。

(2022/7/13) 続きをやってみた。

$ cd ~/yocto/poky
$ git clone git://git.openembedded.org/meta-openembedded
$ cd meta-openembedded
$ git checkout -b gatesgarth origin/gatesgarth
$ cd ~/yocto/poky/rpi-build
$ bitbake-layers add-layer ../meta-openembedded/meta-oe/
$ bitbake-layers add-layer ../meta-openembedded/meta-python/
$ bitbake-layers add-layer ../meta-openembedded/meta-multimedia/
$ bitbake-layers add-layer ../meta-openembedded/meta-networking/

で、conf/bblayers.confに、add-layerしたものが追加されていることを確認して、local.confに、

MACHINE ?= "raspberrypi4-64"

と設定して、

$ cd ~/yocto/poky/rpi-build
$ bitbake core-image-base

を実行。(HDDの空き容量を確保した上で)

beelink-u59:~/yocto/poky/rpi-build$ bitbake core-image-base
Loading cache: 100% |############################################################################################################################################################| Time: 0:00:00
Loaded 3330 entries from dependency cache.
ERROR: ParseError at /home/makotoa67/yocto/poky/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.29.bb:41: Could not inherit file classes/python3targetconfig.bbclass0:00:09

別のシステム向けのYoctoでのビルドが成功した環境で、同じことをやってみたが、

sirius@ubuntu:~/yocto/poky/rpi-build$ bitbake core-image-base
Loading cache: 100% |                                                                               | ETA:  --:--:--
Loaded 0 entries from dependency cache.
ERROR: ParseError at /home/sirius/yocto/poky/meta-openembedded/meta-oe/recipes-extended/libimobiledevice/libplist_2.2.0.bb:9: Could not inherit file classes/python3targetconfig.bbclass

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
sirius@ubuntu:~/yocto/poky/rpi-build$ 

と、似たようなエラー発生。 今度は、別のノートPCで、WSL2 & Ubuntu 20.4 LST環境で同じことをやってみたところ、やっぱり、

TBD

などと、同じようなパースエラーとなった。

https://stackoverflow.com/questions/49391785/could-not-inherit-file-classes-pypi-bbclass-with-meta-raspberrypi-yocto-bitbake

あたりを見ると、

All of your layers need to use matching branches. In this case your meta-python is probably too new (it no longer has the pypi class because it was moved to oe-core). Checkout the rocko branch of meta-openembedded repo and things should start working.

などと言われている。ふむ、ブランチとの整合性な感じ。となると、あえて、Web上の情報に合わせて、

$ git checkout -b gatesgarth-24.0.1 refs/tags/gatesgarth-24.0.1

と、少しだけ古いバージョンを指定したところが間違いなのでは?meta-raspberrypiやmeta-openembeddedは、ただ、gatesgarthといブランチなのだから、Pokyの新しいバージョンのgatesgarth-24.0.4を指定してみると、、、いけたみたい、タスクが進みだした。

その時々の最新版でやるしかないのか。それでも、

MakotoA67:~/yocto/poky/rpi-build$ bitbake core-image-base
Loading cache: 100% |                                                                                   | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |##################################################################################| Time: 0:01:19
Parsing of 2323 .bb files complete (0 cached, 2323 parsed). 3534 targets, 139 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.48.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "raspberrypi4-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.2.4"
TUNE_FEATURES        = "aarch64 armv8a crc crypto cortexa72"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "heads/gatesgarth-24.0.4:60c8482769f38a4db6f38d525405c887794511a9"
meta-raspberrypi     = "gatesgarth:e5e976da0bed8eb9d3c4dc61e8ee3a6a864ff56b"
meta-oe
meta-python
meta-multimedia
meta-networking      = "gatesgarth:f3f7a5f1a4713f145107bb043e0d14cb3a51c62f"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.0/x86_64-nativesdk-libc.tar.xz;sha256sum=5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b (will check PREMIRRORS first)
Initialising tasks: 100% |###############################################################################| Time: 0:00:05
Sstate summary: Wanted 1822 Found 0 Missed 1822 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: libpcre2-native-10.35-r0 do_fetch: Failed to fetch URL https://ftp.pcre.org/pub/pcre/pcre2-10.35.tar.bz2, attempting MIRRORS if available
WARNING: expat-2.2.9-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/expat/expat-2.2.9.tar.bz2, attempting MIRRORS if available
WARNING: libpcre-8.44-r0 do_fetch: Failed to fetch URL https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.bz2, attempting MIRRORS if available
WARNING: linux-raspberrypi-1_5.10.17+gitAUTOINC+5833ca7017_ec967eb45f-r0 do_fetch: Failed to fetch URL git://github.com/raspberrypi/linux.git;name=machine;branch=rpi-5.10.y, attempting MIRRORS if available
WARNING: bluez-firmware-rpidistro-0.0+gitAUTOINC+96eefffccc-r0 do_fetch: Failed to fetch URL git://github.com/RPi-Distro/bluez-firmware, attempting MIRRORS if available
WARNING: pi-bluetooth-0.1.12-r0 do_fetch: Failed to fetch URL git://github.com/RPi-Distro/pi-bluetooth, attempting MIRRORS if available
WARNING: linux-firmware-rpidistro-20190114-1+rpt10-r0 do_fetch: Failed to fetch URL git://github.com/RPi-Distro/firmware-nonfree, attempting MIRRORS if available
ERROR: linux-firmware-rpidistro-20190114-1+rpt10-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/home/makotoa67/yocto/poky/rpi-build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/makotoa67/yocto/poky/scripts:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot/usr/bin/crossscripts:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot-native/usr/sbin:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot-native/usr/bin:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot-native/sbin:/home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/recipe-sysroot-native/bin:/home/makotoa67/yocto/poky/bitbake/bin:/home/makotoa67/yocto/poky/rpi-build/tmp/hosttools"; export HOME="/home/makotoa67"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/RPi-Distro/firmware-nonfree /home/makotoa67/yocto/poky/rpi-build/downloads/git2/github.com.RPi-Distro.firmware-nonfree --progress failed with exit code 128, output:
Cloning into bare repository '/home/makotoa67/yocto/poky/rpi-build/downloads/git2/github.com.RPi-Distro.firmware-nonfree'...
fatal: unable to connect to github.com:
github.com[0: 13.114.40.48]: errno=Connection timed out


ERROR: linux-firmware-rpidistro-20190114-1+rpt10-r0 do_fetch: Fetcher failure for URL: 'git://github.com/RPi-Distro/firmware-nonfree'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/makotoa67/yocto/poky/rpi-build/tmp/work/all-poky-linux/linux-firmware-rpidistro/20190114-1+rpt10-r0/temp/log.do_fetch.19263
ERROR: Task (/home/makotoa67/yocto/poky/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1999 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/makotoa67/yocto/poky/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb:do_fetch
Summary: There were 7 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
MakotoA67:~/yocto/poky/rpi-build$

と、エラー発生。

raspberry_pi_4でyocto_project入門.txt · 最終更新: 2022/07/26 19:32 by makotoa67