【Yocto】安装ADT(解决OECORE related items are not found in envrionement setup files.)

官方资料

http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html

1> 安装ADT

官方给出了3种安装ADT的方法

    Use the ADT Installer Script: This method is the recommended way to install the ADT because it automates much of the process for you. For example, you can configure the installation to install the QEMU emulator and the user-space NFS, specify which root filesystem profiles to download, and define the target sysroot location.

    Use an Existing Toolchain Tarball: Using this method, you select and download an architecture-specific toolchain tarball and then hand-install the toolchain. If you use this method, you just get the cross-toolchain and QEMU - you do not get any of the other mentioned benefits had you run the ADT Installer script.

    Use the Toolchain from within a Yocto Project Build Tree: If you already have a Yocto Project build tree, you can build the cross-toolchain within tree. However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you do not get any of the other benefits without taking separate steps.

官方推荐第一个,但是我试了以后,首先是adt-install的时间很长,其次是容易出错,所以最简单的方法还是第二种

综上,我选择了第二种方法,Using a Cross-Toolchain Tarball

按照官方的步骤

1 download the toolchain Tarball

Go to http://downloads.yoctoproject.org/releases/yocto/yocto-1.1.1/toolchain and find the folder that matches your host development system (i.e.i686 for 32-bit machines orx86_64 for 64-bit machines).

因为官方给的系统是X86的,我的系统也是x86的所以下载的包是i686-i586然后解压

# cd /
# tar -xjf /home/scottrif/Downloads/poky-eglibc-i686-i586-toolchain-gmae-1.1.1.tar.bz2
注意,官方的那个地方写的是
/home/scottrif/Downloads/poky-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2
后面问题,可以从这里猜测出来。

解压后发现opt文件出现,将他移到/opt下面

2 Setting Up the Cross-Development Environment(这一步很关键)

export OECORE_DISTRO_VERSION="1.1"
export OECORE_SDK_VERSION="1.1"

# vim environment-setup-i586-poky-linux

注意最后两行,把1.1.1改成1.1(这个是唯一对官方进行修改的地方,其他都可以按照官方来)

否则会出现

OECORE related items are not found in envrionement setup files.
The ADT version you're using is too old.
Please upgrade to our latest ADT Version!

source environment-setup-i586-poky-linux 

注意那个envir...这个文件可能是隐藏的

2 配置Eclipse(离线安装cdt)

Help--Install New software

安装 cdt

1 下载cdt

http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr2

2 help---install newsotware--add

选择下好的cdt 然后安装。重启cdt

然后,可以发现 cdt已经安装

按照官方的ppt的那个需要安装。

或者按这里就可以了。http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html#installing-eclipse-ide


总结一下

就是出现

OECORE related items are not found in envrionement setup files.
The ADT version you're using is too old.
Please upgrade to our latest ADT Version!
可以通过修改

export OECORE_DISTRO_VERSION="1.1"
export OECORE_SDK_VERSION="1.1"

来解决,其他全都按照官方的来就行。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值