yocto Flashcards

(12 cards)

1
Q

How to enable the yocto build environment?

A
> source    oe-init-build-env

You will be dropped in build directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to list/show existing yocto layers?

A
> bitbake-layers  show-layers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In yocto, how to add/remove a layer?

A

First clone the layer inside the poky directory. Then,

> bitbake-layers  add-layer  ../meta-openembedded/meta-oe

This will modify the file conf/bblayers.conf

You can also modify the conf/bblayers.conf file manually.

To remove a layer,

> bitbake-layers  remove-layer  meta-openembedded/meta-oe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In yocto, how to find the value of a variable?

A
> bitbake-getvar  TOPDIR
> bitbake-getvar   PACKAGE_CLASSES
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In yocto, which are two most important configuration files?

A

build/conf/bblayers.conf
This contains all layers that will be used for image building.

build/conf/local.conf
We set/modify variables here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Name some important yocto variables.

A
  • TOPDIR
  • DL_DIR
  • DISTRO
  • PACKAGE_CLASSES
  • EXTRA_IMAGE_FEATURES
  • RM_OLD_IMAGE
  • INHERIT

bitbake-getvar TOPDIR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In yocto what is the relationship between a layer and recipes?

A

A layer contains many recipes. E.g., layer poky/meta contains many recipes in various subdirectories. E.g., subdir poky/meta/recipes-extended containes recipes for tar, grep, wget etc.

All recipes for a layer are contained in subdirs of that layer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to list recipes in yocto?

A
> bitbake-layers   show-recipes    # lists all recipes
> bitbake-layers show-recipes  git  libxml2  # only shows info about these components.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name some yocto image names.

A
> bitbake  core-image-minimal
> bitbake  core-image-full-cmdline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to include additional software/utilities/recipes (like python3, git etc.) in a yocto image?

A

First, make sure those software/utilities are available as recipes in included layers,

> bitbake-layers   show-recipes   git  python3

If available, append following lines at the end of build/conf/local.conf file,

IMAGE_INSTALL:append  =  "   python3"
IMAGE_INSTALL:append  =  "   git"

Now build image,

> bitbake  core-image-full-cmdline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to create a new yocto layer?

A
> bitbake-layers  create-layer   ../meta-mylayer

> bitbake-layers  add-layer   ../meta-mylayer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some recipe specific yocto variables, how to find there value?

A
  • PN (Package Name)
  • PV (Package Version)
  • PR (Package Revision)
  • S (Source code directory)
  • D (Destination directory)
  • SRC_URI
  • WORKDIR

You can find there value for a specific recipe (e.g., libsdl2) like this,

> bitbake  -e   libsdl2  | grep ^PN=
How well did you know this?
1
Not at all
2
3
4
5
Perfectly