Introduction to Yocto Project - Let's make customized embedded linux

22
2013/10/19 OSC2013 Tokyo/Fall 1 入門 ~カスタマイズした組込み Linux を作ってみよう~ Introduction to Yocto Project Let's make customized embedded Linux Yocto Project and all related marks and logos are registered trademarks of The Linux Foundation. This slide is not, in any way, endorsed by the Yocto Project or The Linux Foundation.

description

Yocto Project 入門 〜カスタマイズした組込み Linux を作ってみよう〜 October 19th, 2013 @ Open Source Conference 2013 Tokyo/Fall

Transcript of Introduction to Yocto Project - Let's make customized embedded linux

Page 1: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 1

         入門~カスタマイズした組込み Linux

を作ってみよう~Introduction to Yocto Project

Let's make customized embedded Linux

Yocto Project and all related marks and logos are registered trademarks of The Linux Foundation. This slide is not, in any way, endorsed by the Yocto Project or The Linux Foundation.

Page 2: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 2

自己紹介● くまだす(Hiroshi Sakate)● 自称 組込みやさん● 所属

– Yocto Project Japan– 日本Androidの会 神戸支部

● ペットとお菓子 * Raspberry Pi is a trademark of the Raspberry Pi Foundation. http://raspberrypi.org/

Kumadasu

Embedded Engineer

animal companions and sweets

Japan Android Group Kobe

Groups

Who

Page 3: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 3

書籍紹介

HTML5とJavaScriptによるiPhone/Android両対応アプリ開発ガイド

電子書籍もあるよYocto Project と 関係無いですが

Book

Page 4: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 4

  とは● 組込み向けカスタマイズLinuxシステムを

作るためのOSSプロジェクト– テンプレート– ツールなど

● 第3のモバイルOSではない● OSでもディストリビューションでもない● かっこいい

What is

Open-source project to help developers create custom

embedded Linux-based system

TemplateTools, etc...

Not the 3rd mobile OSNot the OS, not the destribution

Cool

Page 5: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 5

Yocto の意味

涅槃寂静 = 10-24

Meaning of yocto

deci, centi, milli, micro, nano,pico, femto, atto, zepto, yocto

Ceptillionth

Page 6: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 6

ロゴに込められた意味

● シンプルでエレガント● 青い点は最小単位(yocto)を表現

● フットプリントサイズやリソースを象徴

Behind the trademark

Simplicity and elegance

The blue dot symbolizes the smallest unit mesure, which

reflects the size of footprint and resources in the embedded market.

From Brand Guidelines June2012

Page 7: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 7

紹介動画1● http://vimeo.com/24743626● 組込みLinuxの苦しいところ● 問題を解決へ

Introducing video

What sucks in embedded LinuxSolving the problem

Page 8: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 8

紹介動画2● Yocto Project Workflow

http://vimeo.com/55050773● Yocto Project のざっくりした仕組み

Introducing video

Functional overview

Page 9: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 9

ボード紹介● RaspberryPi● BeagleBoard● MinnowBoard● Galileo● Etc...

Compatible boards

Page 10: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 10

開発環境● Linux

– Ubuntu, Fedora, OpenSUSE, CentOS, Debian● ストレージ:最低50GB、推奨100GB以上● Yocto Project version 1.5 (Galileoのみ?)

– Windows– Mac OSX– https://www.linux.com/news/featured-blogs/200-libby-clar

k/743351-yocto-project-adds-mac-and-windows-cross-compiler-for-intels-linux-based-galileo-board

Development environment

Least 50GBRecommend 100GB

Page 11: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 11

企業のYocto対応● Intel● Wind River● Mentor Graphics● Enea● Altera● Etc...

Companies which releses Yocto related board, software

Page 12: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 12

LTSI● Long Term Support Institute● 組込み製品で扱いやすいように長期サポート● Yocto Project は LTSI を採用● 次期 LTS Kernel 3.10 は 2014年2月頃リ

リースLongterm support is useful for embedded system.

Yocto Project uses LTSI kernel.Nest LTS 3.10 will release on 2014 Feb.

Page 13: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 13

ワークフロー Workflow

a

Page 14: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 14

ツール群● BitBake:タスク実行、スケジューラ● Metadata:タスク定義

Tools

Task execution, scheduler

Task definition

Page 15: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 15

使い方紹介● ビルド環境:Ubuntu● ターゲット:Raspberry Pi● 今回の手順はこちらのもの

http://www.cnx-software.com/2013/07/05/12mb-minimal-image-for-raspberry-pi-using-the-yocto-project/

example

Build env: UbuntuTarget: Raspberry Pi

This example is equal to below URL.

Page 16: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 16

使い方(準備)● パッケージのインストール(Ubuntuの場合)● $ sudo apt-get install gawk wget

git-core diffstat unzip texinfo build-essential chrpath libsdl1.2-dev xterm

How to use (preperation)

Install packages

Page 17: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 17

使い方(ダウンロード)● YoctoProject のダウンロード

– mkdir yocto– cd yocto– git clone -b dylan git://git.yoctoproject.org/poky.git

● RaspberryPi 用メタレイヤーのダウンロード

– cd poky– git clone -b dylan

git://git.yoctoproject.org/meta-raspberrypi

How to use(Download)

Download Yocto Project

DownloadRaspberryPi meta layer

Page 18: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 18

使い方(ビルド準備)● 環境設定

– . oe-init-build-env build● conf/local.conf を編集

– BB_NUMBER_THREADS = "9"– PARALLEL_MAKE = "-j 9"– MACHINE ?= "raspberrypi"– GPU_MEM = "16"

How to use(Build preparation)

Environment setting

Edit

コア数×2 + 1

Page 19: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 19

使い方(ビルド準備)● meta-raspberrypiを追加● conf/bblayers.conf

– BBLAYERS ?= " \– /home/kumadasu/es/yocto/poky-rpi/meta \– /home/kumadasu/es/yocto/poky-rpi/meta-yocto \– /home/kumadasu/es/yocto/poky-rpi/meta-yocto-bsp \– /home/kumadasu/es/yocto/poky-rpi/meta-raspberrypi \– "

How to useBuild preparation

Add meta-raspberrypi

Page 20: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 20

使い方(ビルド・書込み)● bitbake rpi-basic-image

● sudo dd.sh if=tmp/deploy/images/rpi-basic-image-raspberrypi.rpi-sdimg of=/dev/sdb bs=1M

How to useBuild and write

Page 21: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 21

Hob● フロントエンド● レシピを簡単にいじれる

FrontendEasy to modify recipe

Page 22: Introduction to Yocto Project - Let's make customized embedded linux

2013/10/19 OSC2013 Tokyo/Fall 22

コミュニティ紹介● Google+ メイン(オンラインで情報共有)

https://plus.google.com/u/0/communities/104589130307728717400

● MinnowBoardJapan もよろしく

https://plus.google.com/u/0/communities/102601323012769759697

Community

Online information sharing

Refer Minnow too.