Installing, Building, and Running Yocto*
44
Getting Started Guide
# cd ~/poky
# source oe-init-build-env
This will also change the current working directory to ~/poky/build.
Note:
Be sure to source the file while in ~/poky since the build directory will be created based on the
current working directory.
Edit the file
~/poky/build/conf/local.conf
. Uncomment the lines with
BB_NUMBER_THREADS
and
PARALLEL_MAKE
and change the number to the max logical
cores available, if desired for the greatest compilation speed. For instance, on a system with
8 logical cores, the two lines will be as follows:
BB_NUMBER_THREADS = "8"
PARALLEL_MAKE = "-j 8"
Edit the file
~/poky/build/conf/local.conf
. Change the uncommented
MACHINE
line
to the correct target. By default, the line is as follows:
MACHINE ??= "qemux86"
If building for 32-bit, change the line to:
MACHINE ?= "mohonpeak32"
If building for 64-bit, change the line to:
MACHINE ?= "mohonpeak64"
Note:
To add extra packages to the generated image, edit EXTRA_IMAGE_FEATURES variable and
add the following package names separated by a space:
EXTRA_IMAGE_FEATURES = "debug-tweaks dev-pkgs"
Note:
To execute a package management tool "smart" on the generated image, edit the
PACKAGE_CLASSES
variable and add the following:
PACKAGE_CLASSES = "package_rpm"
Optional: Edit the file
~/poky/build/conf/local.conf
to enable the
DL_DIR
variable
to a directory path of your choosing. This can shorten the build time when rerunning the
bitbake
command below.
Edit the file
~/poky/build/conf/bblayers.conf
to add
meta-intel
and meta-
mohonpeak to the targets. Before the edit, the applicable lines will be the same as or
similar to the following:
BBLAYERS ?= " \
/home/user/poky/meta \
/home/user/poky/meta-yocto \
/home/user/poky/meta-yocto-bsp \
After the edit, the applicable lines should be as follows:
BBLAYERS ?= " \
/home/user/poky/meta \
/home/user/poky/meta-yocto \
/home/user/poky/meta-yocto-bsp \
/home/user/poky/meta-intel \
/home/user/poky/meta-intel/meta-mohonpeak \