Task #6 - Customize the image

Document created by Daiane Angolini Employee on Jul 1, 2013Last modified by Daiane Angolini Employee on Mar 27, 2014
Version 2Show Document
  • View in full screen mode

Don't forget to update your source code.

 

How to customize the image

 

Enter <yocto>/source and find any image available:

 

$ find -name *image*.bb

./meta-fsl-demos/recipes-fsl/images/fsl-image-gui-sdk.bb

./meta-fsl-demos/recipes-fsl/images/fsl-image-test.bb

./meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb

./meta-fsl-demos/recipes-qt/images/qt-in-use-image.bb

./meta-fsl-demos/recipes-qt/images/qte-in-use-image.bb

./meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb

./meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb

./meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_6.7.5.bb

./meta-openembedded/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb

./poky/meta-hob/recipes-core/images/hob-image.bb

./poky/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb

./poky/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb

./poky/meta/recipes-sato/images/core-image-sato-dev.bb

./poky/meta/recipes-sato/images/core-image-sato.bb

./poky/meta/recipes-sato/images/core-image-sato-sdk.bb

./poky/meta/recipes-qt/images/qt4e-demo-image.bb

./poky/meta/recipes-core/images/core-image-minimal.bb

./poky/meta/recipes-core/images/core-image-base.bb

./poky/meta/recipes-core/images/core-image-minimal-dev.bb

./poky/meta/recipes-core/images/core-image-minimal-initramfs.bb

./poky/meta/recipes-core/images/build-appliance-image.bb

./poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb

./poky/meta/recipes-extended/images/core-image-lsb-sdk.bb

./poky/meta/recipes-extended/images/core-image-basic.bb

./poky/meta/recipes-extended/images/core-image-lsb-dev.bb

./poky/meta/recipes-extended/images/core-image-lsb.bb

./poky/meta/recipes-graphics/images/core-image-directfb.bb

./poky/meta/recipes-graphics/images/core-image-x11.bb

./poky/meta/recipes-graphics/images/core-image-clutter.bb

./poky/meta/recipes-graphics/xcb/xcb-util-image_0.3.9.bb

./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2012.04.01.bb

./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2011.06.bb

./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2011.03.bb

./poky/meta/recipes-rt/images/core-image-rt-sdk.bb

./poky/meta/recipes-rt/images/core-image-rt.bb


The above images (and packages with 'image' in file name) may be used as a base image, where new packages may be added, or example of new images.

 

bitbake -s  shows any *available* package locally. Grep for the name of desired package:

 

 

$ bitbake -s | grep calibrat

calibrateproto                      :0.0+gitAUTOINC+1da6fd1e2c7a49648245c98481fabea8b9690a8c-r2            

libxcalibrate                       :0.0+gitAUTOINC+209d83af61ed38a002c8096377deac292b3e396c-r0            

xinput-calibrator                   :0.7.5+gitAUTOINC+c01c5af807cb4b0157b882ab07a893df9a810111-r1

 

For example, the package name is xinput-calibrator, in order to include this package this would be the string needed.

 

The dependency tree is shown with

 

$ bitbake -g fsl-image-test

 

 

For the fsl-image-test. Or any other image

 

Include the package name on the image definition file.

 

$ cd meta-fsl-demos/

$ vim recipes-fsl/images/fsl-image-test.bb

 

Include the package name on IMAGE_INSTALL list:

IMAGE_INSTALL += " \

    packagegroup-fsl-gstreamer \

    packagegroup-fsl-tools-testapps \

    packagegroup-fsl-tools-benchmark \

xinput-calibrator \

"

 

In order to include the package on any image, configure conf/local.conf file the as the following:

 

 

MACHINE ??= 'imx6qsabresd'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks tools-sdk"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'

PARALLEL_MAKE = '-j 8'

ACCEPT_FSL_EULA = "1"

 

CORE_IMAGE_EXTRA_INSTALL += "xinput-calibrator"

 

And then

 

$ bitbake fsl-image-test

 

 

In order to add debug or native builder include on conf/local.conf:

EXTRA_IMAGE_FEATURES += "tools-sdk"

 

Every image created after that will include development tools. The same may be included in any bb image file.

 

 

From Poky description:

'tools-sdk" - Adds development tools such as gcc, make, pkgconfig and so forth.

"dev-pkg" - Adds -dev packages for all installed packages. This is useful if you want to develop against the libraries in the image.

"tools-debug" - Adds debugging tools such as gdb and strace.

 

If you don't like command line, or you prefer a window-like interface, you can take a look on HOB.

 

See hob documentation https://www.yoctoproject.org/documentation/hob-manual

See getting started video for hob Introducing Hob - YouTube

 

Go to Yocto Training - HOME

Go to Task #5 - Kernel

Attachments

    Outcomes