国产成人精品三级麻豆,色综合天天综合高清网,亚洲精品夜夜夜,国产成人综合在线女婷五月99播放,色婷婷色综合激情国产日韩

當前位置:首頁 > 嵌入式培訓(xùn) > 嵌入式學(xué)習(xí) > 講師博文 > yocto編譯總結(jié)

yocto編譯總結(jié) 時間:2018-09-28      來源:未知

前言

我們是在64位的ubuntu上編譯3.14.52版本

——》切記相關(guān)配置要求,否則錯誤極多!

官方資料:

//www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#structure-core-bitbake

//cgit.openembedded.org/bitbake/

參考資料:

https://github.com/gmacario/easy-build/tree/master/build-yocto

https://maniacbug.wordpress.com/2012/08/03/pandayocto/

1:Host Packages:

 note:不同位/版本的ubuntu的安裝準備包是不一樣的!

$sudo apt-get update

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

$sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

$sudo apt-get install u-boot-tools

2:Setting Up the Repo Utility

這一步是生成了repo工具

2.1:★

$ mkdir ~/bin 

$ curl //commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod a+x ~/bin/repo

2.2:

Add the following line to the .bashrcfile to ensure that the ~/binfolder is in your PATH variable

//如果你嚴格按照上邊的操作,下邊的操作可以直接復(fù)制下去

export PATH=~/bin:$PATH 

3:安裝Yocto Project Setup

3.1:

$ mkdir fsl-release-bsp

$ cd fsl-release-bsp

//填寫自己的相關(guān)信息

$ git config --global user.name "zhaolong"

$ git config --global user.email home_zhaolong@outlook.com

$ git config --list

3.2:★

//注意:這句要求我們選擇要現(xiàn)在的版本,這個一定根據(jù)自己的要求去填寫,不要直接拷貝執(zhí)行。這句話也可能會失敗,它說你權(quán)限不夠,那可能是你將fsl-release-bsp文件建在了/下,一旦你切換到root,它又說repo命令找不到,要你下載,千萬不要sudo apt-get insatll repo,這個絕對錯,不要懷疑絕對錯!!你應(yīng)該修改fsl-release-bsp的權(quán)限就可以了!!這句話也很容易錯誤,要么說:網(wǎng)絡(luò)不可達,要么服務(wù)拒絕!這個是正常的,要不斷試著安裝。這個不算是錯誤。我們訪問是外國的網(wǎng)站,這個正常。

$repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.52-1.1.0_ga --repo-url=//github.com/android/tools_repo

$ repo sync ------->//這條指令會執(zhí)行很長很長時間,而且是很容易出錯誤!

注意:

這一步很容易出錯,If errors occur during repo initialization, try deleting the .repo directory and running the repo initialization command again.在執(zhí)行這一步的時候一旦有錯誤就要無條件的將.repo目錄刪除再更新操作。從新走3.2這個步驟。

3.2報錯總結(jié):

 

 

錯誤:error: Exited sync due to fetch errors

解決方案1(失。:repo sync -f -j10

 

-f 是強制force執(zhí)行的意思。

-jx 就是表示開x個線程來進行編譯。X的數(shù)目是你實際處理器個數(shù)的2倍。

解決方案2(失。篻it版本太低

git –version查看相關(guān)git的版本,git版本太低了, repo 升級,不兼容git  1.7.2 以下的版本(git --version,1.7.0.4,貌似是低了點),總之就是git的版本要 >= 1.7.2以上。

 

修改/etc/apt/sources.list文件(該文件是只讀文件,sudo vi sources.list) 把下面內(nèi)容加到后面

deb //mirrors.163.com/ubuntu/ oneiric main universe restricted multiverse

deb-src //mirrors.163.com/ubuntu/ oneiric main universe restricted multiverse

deb //mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted

deb-src //mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted

deb //mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted

deb //mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted

deb-src //mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted

deb //mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted

deb-src //mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted

deb-src //mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted 

執(zhí)行命令:sudo apt-get update 

如果出現(xiàn):提示MMap 沒有空間了。請增大 APT::Cache-Limit 的大小。 

按下面的方法解決: 

 編輯 sudo gedit /etc/apt/apt.conf

 修改APT::Cache-Limit 99999999;  

改完之后,重新執(zhí)行sudo apt-get update

執(zhí)行命令:sudo apt-get install git 好了,執(zhí)行完畢后再重新查看git的版本, 

解決方案3(失。簉epo sync --force-sync

repo sync --force-sync system/core

repo sync -j1 -f --force-sync 

4:compiling生成bsp

4.1:配置編譯項

4.1.1這個生成完整的bsp:

$MACHINE=imx6qsabresd source fsl-setup-release.sh -b imx6qsabresd-fb -e fb

$MACHINE=imx6ulevk source fsl-setup-release.sh -b imx6ulevk-fb -e fb

$MACHINE=imx6ulevk source fsl-setup-release.sh -b imx6ulevk2-fb -e fb

DISTRO:發(fā)行版配置    可以定制!

我們可以后將配置項目保存到source/meta-fsl-bsprelease/imx/meta-sdk/conf/distro的配置文件中看到相關(guān)配置。主要支持的發(fā)行版配置:

• fsl-imx-x11    -Only X11 graphics

• fsl-imx-wayland   -Wayland weston graphics

• fsl-imx-xwayland  -Wayland graphicsand X11.X11 applications using EGL not supported

• fsl-imx-fb    -Frame Buffer graphics - no X11 or Way

MACHINE:板子配置項

這個是機器的名字,就是你板子的名字。這個具體可以在meta-fsl-arm and meta-fsl-bsp-release的配置文件conf/machine找到的。實際上meta-fsl-arm and meta-fsl-bsp-release和meta-fsl-arm-extra是可用的其他的都沒有用!

可以選項如下:

• imx6qpsabreauto

• imx6qpsabresd

• imx6ulevk

• imx6dlsabreauto

• imx6dlsabresd

• imx6qsabreauto

• imx6qsabresd

• imx6slevk

• imx6solosabreauto

• imx6solosabresd

• imx6sxsabresd

• imx6sxsabreauto

• imx7dsabresd

-b:編譯目錄配置項

這個是指明了配置編譯時候的目錄

-e:后端圖像配置項

這個是指明了顯示平臺和DISTRO作用一樣,如果你沒有指定DISTRO,那在后用-e fb 指明的是使用的是DISTRO=fsl-imx-fb否則是DISTRO=fsl-imx-x11可以支持的后端圖像有:

• fb

• dfb

• wayland

• x11

正常執(zhí)行后:

You can now run 'bitbake <target>'

Common targets are:

core-image-minimal

meta-toolchain

meta-toolchain-sdk

adt-installer

meta-ide-support

 

Your build environment has been configured with:

 

MACHINE=imx6ulevk

SDKMACHINE=i686

DISTRO=fsl-imx-x11

EULA=1

BSPDIR=

BUILD_DIR=.

root@ubuntu:~/fsl-release-bsp-L3.14.52/imx6ul-sabresd-fb#  

4.1.2這個僅僅生成uboot:

$MACHINE=imx6ulevk  bitbake -c deploy u-boot-imx

 

4.2:編譯

//在執(zhí)行這一步的時候我們可以bitbake –help下看看。能夠顯示說明,當前環(huán)境還算可以,但絕對不是就是百分百OK了,只能說可以了。

 $bitbake fsl-image-machine-test ------》//這個命令執(zhí)行更費時間!不要著急。

 

Build Configuration:

BB_VERSION        = "1.26.0"

BUILD_SYS         = "x86_64-linux"

NATIVELSBSTRING   = "Ubuntu-14.04"

TARGET_SYS        = "arm-poky-linux-gnueabi"

MACHINE           = "imx6ulevk"

DISTRO            = "fsl-imx-fb"

DISTRO_VERSION    = "3.14.52-1.1.1"

TUNE_FEATURES     = "arm armv7a vfp neon callconvention-hard cortexa7"

TARGET_FPU        = "vfp-neon"

meta               ----->poky

meta-yocto         ----->poky

meta-fsl-arm       ----->meta-fsl-arm

meta-fsl-arm-extra  ----->meta-fsl-arm-extra

meta-fsl-demos     ----->meta-fsl-demos

meta-bsp           ----->meta-fsl-bsp-release

meta-sdk           ----->meta-fsl-bsp-release

meta-gnome         ----->meta-openembedded

meta-networking    ----->meta-openembedded

meta-python        ----->meta-openembedded

meta-ruby          ----->meta-openembedded

meta-filesystems   ----->meta-openembedded

meta-oe            ----->meta-openembedded

meta-multimedia    ----->meta-openembedded

meta-qt5   ----->

meta-browser       ----->

4.2報錯總結(jié):

 

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.

    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).

    Following is the list of potential problems / advisories:

 

Do not use Bitbake as root.

這個記住這個報錯是軟件安全考慮造成的錯誤。這個時候你一定是root權(quán)限進行操作的,你這個時候su ubuntu的時候在去執(zhí)行,他一定會報錯:沒有bitbake命令這個時候切記不要sudo apt-get bitbake一定不要!!你仔細留意的化你會發(fā)現(xiàn)你當前在你編譯項指定的那個目錄層次里面,退出去刪除這個目錄,切換權(quán)限su Ubuntu ,然后在執(zhí)行bitbake 命令。就OK了。

 

 5:compiling and install sdk

 //這個命令也是耗費時間的!

 $bitbake fsl-image-machine-test -c populate_sdk

成功執(zhí)行的:

 

 $cd tmp/deploy/sdk/

 //你會看到下邊的交叉編譯工具鏈,OK了。

  ./poky-glibc-x86_64-fsl-image-gui-cortexa7hf-vfp-neon-toolchain-1.8.sh

 //press enter and Y, do not change the install folder

總結(jié):

(一) 這個環(huán)境做好了以后就可以不要刪除了,你以后就直接走步驟4就可以了。

(二) 一旦退出再次進入,那么bitbake一定不能用了,這個時候你要么將編譯目錄刪除重走步驟4,或者source  setup-environment  ./imx6ulevk-fb/ 后邊的是你的編譯目錄。

 

文件系統(tǒng)位置:

work/imx6ulevk-poky-linux-gnueabi/base-files/3.0.14-r89/image

上一篇:SylixOS熱插拔概述

下一篇:SylixOS源碼分析

熱點文章推薦
華清學(xué)員就業(yè)榜單
高薪學(xué)員經(jīng)驗分享
熱點新聞推薦
前臺專線:010-82525158 企業(yè)培訓(xùn)洽談專線:010-82525379 院校合作洽談專線:010-82525379 Copyright © 2004-2022 北京華清遠見科技集團有限公司 版權(quán)所有 ,京ICP備16055225號-5,京公海網(wǎng)安備11010802025203號

回到頂部