Openembedded 介紹(一)

Openmoko distribution 是用Openembedded來建立, Openembedded是用Bitbake來做套件上管理與cross compile的建立. 而Bitbake是用.bb .bbclass .conf 來進行設定與管理

優點:

  1. 可以crosscompiler建立embedded system
  2. 能夠包裝成ipk, deb, rpm, tar
  3. 能run tasks 在qemu上

先介紹簡單例子如何使用Openembedded建立embedded linux

1. 下載 Bitbake build系統和將工具加進你的PATH

  • cd ~/bitbake
  • svn co svn://svn.berlios.de/bitbake/trunk/bitbake
  • export PATH=/work/bitbake:$PATH

2. 使用monotone去下載OE packages (example from vanille.de)

  • Monotone –db=OE.db db init
  • Monotone –db=OE.db pull monotone.vanille.de org.openembedded
  • export BBPATH=/work/build:/work/openembedded

3. 建立build目錄與configuration file

  • mkdir build/conf/
  • cp openembedded/conf/sample.conf build/conf/local.conf

4.Build root file system image

  • bitbake bootstrap-image

Bitbake Task Executor 工作流程

Bitbake Recipes –> Task Graph –> Binary Packages –> Flash Image

#Bitbake openmoko-devel-image

  • 處理所有recipes上所需的資料
  • 從receipes 建立一個整合性的task graph包含所有tasks
  • 針對openmoko-devel-image建立task的相依性
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: