Yocto 安裝01

Yocto 安裝01

依照 Yocto Project 快速入門文件的步驟下載 Poky 参考建構系统,官方文件

httpss://www.yoctoproject.org/docs/1.7.1/yocto-project-qs/yocto-project-qs.html

* 作業環境為 x86 64 位元 Ubuntu 14.04 64 bit AMD 這裡

STEP: 安裝軟體的升級
~$ apt-get update
~$ apt-get upgrade

STEP: 安裝必要套件
~$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm

STEP: 建立工作路徑

$ cd ~/Desktop

$mkdir yocto

$ cd yocto

STEP: 下載 Poky

$ git clone httpsss://git.yoctoproject.org/git/poky

$ git clone httpss://git.yoctoproject.org/git/poky

$ cd poky

$ git checkout -b fido origin/fido

$ source oe-init-build-env

STEP: 取得特定的yocto 版本

這次我們使用yocto的 dizzy 分支版本

~$ cd poky
~/poky$ git checkout -b dizzy origin/dizzy

STEP: 環境配置

編輯工作檔案

~/poky$ source oe-init-build-env
~/poky/build$ gedit ./conf/local.conf
#
# Machine Selection
#
# You need to select a specific machine to target the build with. There are a selection
# of emulated machines available which can boot and run in the QEMU emulator:
#
#MACHINE ?= “qemuarm”
#MACHINE ?= “qemumips”
#MACHINE ?= “qemuppc”
#MACHINE ?= “qemux86”
MACHINE ?= “qemux86-64”
#
# There are also the following hardware board target machines included for
# demonstration purposes:
#
#MACHINE ?= “beaglebone”
#MACHINE ?= “genericx86”
#MACHINE ?= “genericx86-64”
#MACHINE ?= “mpc8315e-rdb”
#MACHINE ?= “edgerouter”
#
# This sets the default machine to be qemux86 if no other machine is selected:
#MACHINE ??= “qemux86”

STEP: 使用 bitbake 建立映像檔

~/poky/build$ bitbake -k core-image-sato

编譯過程需數小時…請耐心等待

 

 

STEP: 使用 QEMU 啟動

~/poky/build$ runqemu qemux86-64