2
3

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.

UbuntuでQEMUを使ってYoctoを動かす。

Last updated at Posted at 2020-09-04

■ やること

UbuntuにYoctoの開発環境を入れます。

他の機器にYoctoを入れる予定ですが、そもそもYoctoについて知らないことが多いので、
QEMUを使って仮想的なYoctoを実行したいと思います。

■ 試した環境

2020/09/04
Intel® Core™ i5-4570 CPU @ 3.20GHz × 4
メモリ 32GB
Ubuntu 20.04.1 LTS (64bit)

■ 注意点

仮想環境上のUbuntuでは動かない場合があります。
実環境を推奨します。

■やり方

● 環境のインストール

sudo apt‑get install sed wget subversion git‑core coreutils \
     unzip texi2html texinfo libsdl1.2‑dev docbook‑utils fop gawk \
     python‑pysqlite2 diffstat make gcc build‑essential xsltproc \
     g++ desktop‑file‑utils chrpath libgl1‑mesa‑dev libglu1‑mesa‑dev \
     autoconf automake groff libtool xterm libxml‑parser‑perl

● pokyをクローン

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

バージョンを指定する際は・・・・

git checkout -b yocto-3.1 yocto-3.1

● ビルド環境の初期化

source poky/oe-init-build-env

● Yoctoコアのコンパイル

bitbake core-image-minimal

image.png

CPU4コアを100%使用してコンパイルします。仮想環境でコンパイルするには厳しすぎると思われます。

コンパイルに2時間かかりました。

● QEMUで起動する

runqemu tmp/deploy/images/qemux86-64/

image.png

ターミナルが起動しました。
なるほど、これがYoctoですか。

● ログインしてみる

デフォルトが何か調べてみた。

User: root
Pass: なし

へぇ。

image.png

へぇ。

■ 他のコアをコンパイルしてみる。

bitbake core-image-sato

satoはGUI機能を含んだ最小構成(なのかな)なので、コンパイルしてみる。

runqemu tmp/deploy/images/qemux86-64/

image.png

コンパイルは・・・1時間・・・・え?
core-image-minimalより、core-image-satoのほうが早いの?なんで??

という事で、Ubuntu上でQEMU使ってYoctoが立ち上がりました。
チャンチャン!

■ まとめ

ひとまず、デフォルトの設定でYoctoをビルド出来、更にそれQEMUでを実行することが出来た。
コンパイル時間を把握することで、何かを修正もしくは変更を行う際に、
どれくらい待てばよいかわかる。

が、何故minimalが遅い(もしくはsotaが早い)のか不明。何が違うんだろう。

さて、とりあえず環境は整った。使い方を学んでいくか。ではでは。

2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?