yocto环境搭建和常用命令配置

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

yocto环境搭建和常用命令配置_第1张图片

OpenEmbedded uses the bitbake tool which is developed in python to generate images from packages built from recipes provided in layers

Poky是基于Bitbake和oe(OpenEmbedded)的参考,提供了一些有用的脚本.

你自己的项目可以参考Poky,直接使用后两者,也可以基于Poky,使用其提供的一些脚本

一、环境搭建

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
     build-essential chrpath socat libsdl1.2-dev xterm

git clone git://git.yoctoproject.org/poky
cd poky
git checkout -b krogoth origin/krogoth
source oe-init-build-env

二、常用配置

local.conf

#删除每个软件包的构建结构以节省空间

INHERIT += "rm_work"

#指定要编译的架构

MACHINE = "qemux86"

或通过echo方式,

echo 'MACHINE = "qemux86"' >> conf/local.conf

#指定中间生成的软件包格式

PACKAGE_CLASSES ?= "package_rpm"

汇总

MACHINE = "qemux86"
SHAREDIR = "/media/itviewer/linux"
DL_DIR = "${SHAREDIR}/downloads"
DISTRO = "poky"
PACKAGE_CLASSES = "package_rpm"
INHERIT+="rm_work"
RM_OLD_IMAGE = "1"

bblayers.conf

#添加layer

bitbake-layers add-layer "$HOME/poky/meta-intel"

 

三、编译或运行

查看target

ls meta*/recipes*/images/*.bb

#编译镜像或软件包

bitbake core-image-base
runqemu qemux86

四. 查看依赖

bitbake -u depexp -g weston

 

转载于:https://my.oschina.net/assange/blog/731115

你可能感兴趣的:(yocto环境搭建和常用命令配置)