3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Yoctoを試す(その2:PC向け)

Posted at

x64(PC向け)のBuild

その1の続き。検索すると、YoctoにてRaspberryPi用Buildの記事は多数見つかるが、PC向け(x64用Build)のものはあまり見つからないので、作業記録をここに残す。

開発環境

Hardware: Mac mini Late 2014, Core i5 2.6GHz, 16GB
OS: Lubuntu 20.04 LTS

準備

必要なツール類のインストール

$ sudo apt-get install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev
$ git clone http://git.yoctoproject.org/git/poky
$ git clone git://git.openembedded.org/meta-openembedded

上記の情報は多数見つかるので、説明省略。

x64(PC)向け

本家サイトのmeta-intelをもとに進める。

$ git clone git://git.yoctoproject.org/meta-intel

poky

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

conf/local.conf

下記を追加。

MACHINE ?= "intel-corei7-64"

64bit用には「intel-corei7-64」を設定すると、本家サイトに記載有り。

conf/bblayer.conf

全てを下記に記載。

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /home/undeux3/proj/yocto/poky/meta \
  /home/undeux3/proj/yocto/poky/meta-poky \
  /home/undeux3/proj/yocto/poky/meta-yocto-bsp \
  /home/undeux3/proj/yocto/meta-openembedded/meta-oe \
  /home/undeux3/proj/yocto/meta-openembedded/meta-networking \
  /home/undeux3/proj/yocto/meta-openembedded/meta-python \
  /home/undeux3/proj/yocto/meta-intel \
  "

「meta-intel」が必須、「meta-openembedded」については適当に選んだ。PC向けにどれが必須かまでは未調査。

Build

$ cd build
$ bitbake core-image-sato

途中、その1と同じFetch Errorがあったが、5-6時間かかってBuild完了。また、86GBもの容量が必要であった。

USBスティックへのイメージ書き込み

$ cd tmp/deploy/images/intel-corei7-64
$ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress
$ sync
$ eject /dev/sdf

「/dev/sdf」は環境により異なる。

USB起動

Macbook AirにUSBスティックを差し込み起動させた状況を表示。

SATA HDD起動

同じような方法で、SATA HDDにイメージ(wicファイル)を書き込み、自作PCにそのHDDを入れたが起動せず。調査すると、これらなどの記事から、BIOS起動用のイメージであるhddimgファイルを作れば起動するようなので、トライして書き込むと起動成功(写真などは省略)。そのためには、local.confに記載追加(&Build)が必要。

conf/local.conf

IMAGE_FSTYPES += "wic hddimg"

IMAGE_FSTYPESに指定できるタイプについては、ここのIMAGE_TYPESを参照されたし。

SATA HDDへのイメージ書き込み

$ sudo dd if=core-image-sato-intel-corei7-64.hddimg of=/dev/sdf status=progress

その他参考にしたサイト

こちらなど。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?