Difference between revisions of "Yocto Project Build Instructions"

From Klaus' wiki
Jump to: navigation, search
(Created page with 'In order to prevent excess disk and CPU usage when a class tries to build the Yocto Project distribution for the BeagleBone Black please follow the instructions below. I cuts dow…')
 
(Preparation)
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
  
 
NOTE: Be sure to use the correct "back-ping" ` not the ' "ping"!
 
NOTE: Be sure to use the correct "back-ping" ` not the ' "ping"!
 +
 +
NOTE: Use the above command everytime you have logged out and comes back in order to run the Yocto tools again. If you don't it will not work correctly.
  
 
You are brought into a directory named bbb-<your loginname>. This is where you can work with you local copy of the Yocto Project.
 
You are brought into a directory named bbb-<your loginname>. This is where you can work with you local copy of the Yocto Project.
Line 32: Line 34:
 
  DL_DIR ?= "/home/EESY2/poky/bbb/downloads"
 
  DL_DIR ?= "/home/EESY2/poky/bbb/downloads"
 
be sure to copy exactly this line - it points to the huge download that has already been done once.
 
be sure to copy exactly this line - it points to the huge download that has already been done once.
 +
  
 
And finally locate  
 
And finally locate  
Line 38: Line 41:
 
Create a new line with this content:
 
Create a new line with this content:
 
  SSTATE_DIR ?= "/home/EESY2/poky/bbb/sstate-cache"
 
  SSTATE_DIR ?= "/home/EESY2/poky/bbb/sstate-cache"
 +
 +
NOTE: If you get errors in your first run of bitbake (see below) the comment out the line that you just added as describe above.
  
 
There is no need to configure anything else at this point.
 
There is no need to configure anything else at this point.
  
in your /home/EESY2/poky/bbb-<your username> directory you can now execute the command:
+
===Baking a fresh distribution===
 +
 
 +
In your /home/EESY2/poky/bbb-<your username> directory you can now execute the command:
  
 
<source lang=bash>
 
<source lang=bash>
]$ bitbake core-image-base
+
]$ bitbake core-image-sato
 
</source>
 
</source>
  
 
After a few minutes your newly created distribution for BeagleBone Black is ready.  
 
After a few minutes your newly created distribution for BeagleBone Black is ready.  
  
Follow the instruction on [BeagleBone Black] page to copy the necessary files to a SD-card.
+
Follow the instruction on [[BeagleBone Black]] page to copy the necessary files to a SD-card.

Latest revision as of 08:22, 27 November 2015

In order to prevent excess disk and CPU usage when a class tries to build the Yocto Project distribution for the BeagleBone Black please follow the instructions below. I cuts down the compilation time from one to two hours to about five minutes.

Preparation

Change directory to /home/EESY2/poky

If you cannot go into that directory ask to be included in the embnerds group.

Execute this command:

]$ . oe-init-build-env bbb-`logname`

NOTE: Be sure to use the correct "back-ping" ` not the ' "ping"!

NOTE: Use the above command everytime you have logged out and comes back in order to run the Yocto tools again. If you don't it will not work correctly.

You are brought into a directory named bbb-<your loginname>. This is where you can work with you local copy of the Yocto Project.

Next important thing to do is to change a few settings in the conf/local.conf file.

First locate the line

#MACHINE ?= "beaglebone"

remove the #

Next locate the line

#DL_DIR ?= "${TOPDIR}/downloads"

it is just a few lines below the machine configuration line.

Create a new line here with this content:

DL_DIR ?= "/home/EESY2/poky/bbb/downloads"

be sure to copy exactly this line - it points to the huge download that has already been done once.


And finally locate

#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"

Create a new line with this content:

SSTATE_DIR ?= "/home/EESY2/poky/bbb/sstate-cache"

NOTE: If you get errors in your first run of bitbake (see below) the comment out the line that you just added as describe above.

There is no need to configure anything else at this point.

Baking a fresh distribution

In your /home/EESY2/poky/bbb-<your username> directory you can now execute the command:

]$ bitbake core-image-sato

After a few minutes your newly created distribution for BeagleBone Black is ready.

Follow the instruction on BeagleBone Black page to copy the necessary files to a SD-card.