歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Yocto系統定制入門

Yocto系統定制入門

日期:2017/2/28 15:30:50   编辑:Linux教程

1.Yocto簡介:

Yocto 是一個開源社區,它通過提供模版、工具和方法幫助開發者創建基於linux內核的定制系統,支持ARM, PPC, MIPS, x86 (32 & 64 bit)硬件體系架構。

2.Yocto定制准備工作

(1)確保電腦能聯網,並且有100G的空閒,電腦配置不低於4核

(2)獲取yocto腳本:$git clone git://git.yoctoproject.org/poky

(3)獲取硬件相關層:$git clone git://git.yoctoproject.org/meta-intel.git

(4)關於yocto的幫助:http://www.yoctoproject.org/documentation

3.開始搭建環境

(1)$source poky/oe-init-build-env xxx

xxx$cd conf

xxx/conf$ vim bblayers.conf

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

# changes incompatibly

LCONF_VERSION = "4"

BBFILES ?= ""

BBLAYERS ?= " \

/hda5/hmi/x86/yocto/poky/meta \

/hda5/hmi/x86/yocto/poky/meta-yocto \

/hda5/hmi/x86/yocto/poky/meta-intel \

/hda5/hmi/x86/yocto/poky/meta-intel/meta-crownbay \

(2)修改local.conf

xxx/conf$ vim local.conf

#MACHINE ??= "qemux86"

MACHINE ??= "crownbay"

4.開始編譯

注:(官方下載的只是腳本,yocto一邊下載一邊編譯所以很慢而且還受資源下載限制和電腦配置,下載的文件在工作目錄中的downloads中,第一次下載後保存好downloads以後就方便了)

(1)配置內核

xxx$ bitbake linux_yocto -c menuconfig

(2)定制微型yocto

xxx$ bitbake core-image-minimal

(3)定制桌面型yocto

xxx$ bitbake coure-image-sato

(4) hob config

xxx$ hob

可以在圖形化界面中方便的定制系統

Copyright © Linux教程網 All Rights Reserved