shonen.hateblo.jp

やったこと,しらべたことを書く.

poky yocto をビルドする

X Windowを起動するところまでやりたかったけど、とりあえずもう記事を書いてしまう

www.yoctoproject.org

Getting Started

git clone https://git.yoctoproject.org/git/poky
git checkout dunfell

dunfellはコードネーム。 最新のコードネームは、https://www.yoctoproject.org/ を見る

ビルド準備

source oe-init-build-env build.foobar

以下が出る

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks

OSのビルド

bitbake core-image-sato
NOTE: Executing Tasks
ERROR: quilt-native-0.66-r0 do_configure: Execution of '/mnt/nvme0/fai/repo/poky/build.armv7/tmp/work/x86_64-linux/quilt-native/0.66-r0/temp/run.do_configure.4949' failed with exit code 126:
/home/fai/.pyenv/libexec/pyenv: line 148: /home/fai/.pyenv/libexec/pyenv-exec: Argument list too long
WARNING: exit code 126 from a shell command.

ERROR: Logfile of failure stored in: /mnt/nvme0/fai/repo/poky/build.armv7/tmp/work/x86_64-linux/quilt-native/0.66-r0/temp/log.do_configure.4949
Log data follows:
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_configure
| /home/fai/.pyenv/libexec/pyenv: line 148: /home/fai/.pyenv/libexec/pyenv-exec: Argument list too long
| WARNING: exit code 126 from a shell command.
| ERROR: Execution of '/mnt/nvme0/fai/repo/poky/build.armv7/tmp/work/x86_64-linux/quilt-native/0.66-r0/temp/run.do_configure.4949' failed with exit code 126:
| /home/fai/.pyenv/libexec/pyenv: line 148: /home/fai/.pyenv/libexec/pyenv-exec: Argument list too long
| WARNING: exit code 126 from a shell command.
| 
ERROR: Task (/mnt/nvme0/fai/repo/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 928 tasks of which 927 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /mnt/nvme0/fai/repo/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

pyenvが邪魔をしているっぽいのでpyenvを取り除いておく。 このとき、PATH等の設定の退避だけではダメで、~/.pyenvディレクトリ名の変更を行う必要があった。

Initialising tasks: 100% |#######################################| Time: 0:00:01
Sstate summary: Wanted 1148 Found 0 Missed 1148 Current 11 (0% match, 0% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 3156 tasks of which 466 didn't need to be rerun and all succeeded.

ビルド完了。既に環境変数によって、エミュレータも準備されているので、以下コマンドを叩くだけ。

runqemu qemux86-64

ターミナルが出てきたら、優勝

AOSPもコマンドは違えど似たような手順ですね