[Ubuntu]yocto installation configuration and development __ubuntu

Source: Internet
Author: User
Tags bz2 yocto
Reprint please specify from: Qin Dynasty moon _whu
Http://blog.sina.com.cn/s/blog_690aa174010111b3.html

Yocto Official website: http://www.yoctoproject.org




There are a lot of English documents here: Http://www.yoctoproject.org/documentation


All of the following methods I have read are summarized in this document.






1. Install Yocto


Reference: http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html


Step1: Switch to bash
Command: sudo dpkg-reconfigure dash


and choose No.


If you do not switch to bash, the following step will complain: Using dash as/bin/sh causes various subtle build problems, for use bash instead (e.g. ' dpkg -reconfigure Dash ' on a Ubuntu system.
------------------The following is my problem, perhaps you did not meet, then bravely jump over it----------------------


Strangely enough, I did not jump out of the dialog box that asked you to choose No when I executed the sudo dpkg-reconfigure dash.


So he looked under the/bin:


lrwxrwxrwx 1 root 4 2011-10-30 16:57 rbash-> Dash


Find that the current shell is pointing to the dash. No way, you can only force the link.


bear@bear-k40ie:~$ sudo dpkg-reconfigure Dash
[sudo] password for:
bear@bear-k40ie:~$ ln-s/bin/bash/bin/dash
ln:creating Symbolic Link '/bin/dash ': File exists
bear@bear-k40ie:~$ ln-s--force/bin/bash/bin/dash # #没办法, you can only force links.


--------------------------------------------------------------------------------




Stpe2. Install the Yocto dependent libraries under Ubuntu


Command:
$ sudo apt-get install sed wget cvs subversion git-core coreutils \ Unzip texi2html texinfo Libsdl1.2-dev GA WK \ python-pysqlite2 diffstat help2man make gcc build-essential \ g++ desktop-file-utils chrpath Libgl1-mesa-dev Mesa-dev \ Mercurial autoconf automake groff Libtool xterm




Step3. Download Yocto Project


http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/poky-edison-6.0.tar.bz2






Step4. Compiling mirrors, running under QEMU virtual machine yocto


(In fact, you can not compile the mirror, directly using other people compiled a good mirror can also, but I did not compile the system, so very curious to try it)


Note: Before performing this step, make sure you have at least 50G of space left ...


Command:
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/poky-edison-6.0.tar.bz2
$ tar xjf poky-edison-6.0.tar.bz2
$ source Poky-edison-6.0/oe-init-build-env Edison-6.0-build


After performing this, you will find that the directory is Edison-6.0-build, and the current directory will jump to Edison-6.0-build.


Then in order to speed up the compilation of the Mirror, you need to modify the edison-6.0-build/conf/local.conf parameters
$gedit conf/local.conf


Bb_number_threads = "4" # #就是你电脑核数 X 2 My computer is dual-core, so "4"
Parallel_make = "J 3" # #电脑核数的1.5 times Times


The original tutorial said that if there is no 50G space, add at the end of the local.conf: INHERIT + + Rm_work side of the compile file to delete the used files. However, however, it is recommended not to add this thing, because the compilation of a mirror 7-8 hours, and most of the time spent on the download required files above, no one can guarantee that the compilation is passed, so, or not add. (I on each add, the first time to compile, 8h after the error, again compiled, and changed the next local.conf parameters, compiled as long as 1h)


There are a lot of parameters can also be modified, a closer look at the local.conf, which said very clearly.




After modifying the local.conf, remember to save it.




Then execute:
$ bitbake-k Core-image-sato


Start a lengthy mirroring compilation process
......
......
......
That's when you away from your computer to call your mom and dad and talk about it or something.


......
......


Finally compiled, try to execute


$runqemu qemux86


If you have an error or something, CD to the poky-edison-6.0 directory (mine is/home/bear/study)
bear@bear-k40ie:~/study$ Source Poky-edison-6.0/oe-init-build-env Edison-6.0-build
Runqemu qemux86


$runqemu qemux86


(In fact, Bitbake and Runqemu need $ source poky-edison-6.0/oe-init-build-env edison-6.0-build before execution)


Then Qemu appears and Yocto is installed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.