devtoolの使い方 (1):環境準備とレシピ作成の流れ

この投稿は連載:「devtoolの使い方」(全4回)の第1回です。

これから devtool の使い方を解説していきます。まずは環境準備と、devtoolを使ったレシピ作成の流れを解説します。

環境準備

対象:Poky(2.2.1) Morty

必要なパッケージは Quick Start にしたがってインストール済みとします。

まずはクローンして oe-init-build-env を叩きます。
[shell]
git clone git://git.yoctoproject.org/poky
cd poky
git checkout morty
source oe-init-build-env
[/shell]

これでdevtoolが使えるようになります。
[shell]
devtool –help
[/shell]

usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
[--color COLOR] [-h]
...

OpenEmbedded development tool

options:
--basepath BASEPATH Base directory of SDK / build directory
--bbpath BBPATH Explicitly specify the BBPATH, rather than getting it
from the metadata
-d, --debug Enable debug output
-q, --quiet Print only errors
--color COLOR Colorize output (where COLOR is auto, always, never)
-h, --help show this help message and exit

subcommands:
Beginning work on a recipe:
add Add a new recipe
modify Modify the source for an existing recipe
upgrade Upgrade an existing recipe
Getting information:
status Show workspace status
search Search available recipes
Working on a recipe in the workspace:
edit-recipe Edit a recipe file in your workspace
configure-help Get help on configure script options
build Build a recipe
update-recipe Apply changes from external source tree to recipe
reset Remove a recipe from your workspace
finish Finish working on a recipe in your workspace
Testing changes on target:
deploy-target Deploy recipe output files to live target machine
undeploy-target Undeploy recipe output files in live target machine
build-image Build image including workspace recipe packages
Advanced:
create-workspace Set up workspace in an alternative location
extract Extract the source for an existing recipe
sync Synchronize the source tree for an existing recipe
Use devtool --help to get help on a specific command

devtoolでの基本的な流れ

devtoolでレシピを作成・編集する流れは下記のようになります。

  1. add / modify / upgrade でレシピ・ソースツリーをワークスペースに展開
  2. レシピ・ソースを編集
  3. ビルド、動作確認
    • 2,3の繰り返し
  4. レシピの編集を完了(finish)→指定したレイヤーにレシピが追加される。

また、上記流れの1にあるように、レシピの作成を始める方法は大きくわけて3種類あります。後の投稿で順に使い方を見て行きたいと思います。

  • add : レシピを新規作成する
  • modify : 既存のレシピに修正をかける
  • upgrade : レシピのパッケージのバージョンを更新する

今後の流れ

当初は環境構築を含めてaddだけで1記事にまとめられると思っていたのですがやり出したら意外と書くことが多くて分けることにしました。このあと、いくつかのポストを使ってdevtoolを実際に使ってレシピを作成していきます。その中でエミュレータ(QEMU)での動作確認も行っていきます。

シリーズ:devtoolの使い方devtoolの使い方 (2):レシピの作成(add)とビルド >>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

fourteen − seven =

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください