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

來源:互聯網
上載者:User

官方資料

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"

來解決,其他全都按照官方的來就行。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.