Task #3 - The build result

cancel
Showing results for 
Search instead for 
Did you mean: 

Task #3 - The build result

Task #3 - The build result

You already know. Your source code is one week old now, so please, update it!

$ repo sync

What was the changes? Please, read the output and determinate what file was changed.

Directory tree

This is what I have under fsl-community-bsp directory:

$ tree -d -L 2 -A

.

├── build_mx53

│   ├── conf

│   ├── sstate-cache

│   └── tmp

├── build_mx6

│   ├── conf

│   ├── sstate-cache

│   └── tmp

├── downloads

│   └── git2

└── sources

    ├── base

    ├── meta-fsl-arm

    ├── meta-fsl-arm-extra

    ├── meta-fsl-demos

    ├── meta-openembedded

    └── poky

Sstate-cache keeps the pre-build packages cache so once one package is built, and it´s not changes, no need to re-build it again.

If a team shares the same build environment, the sstate-cache folder can be shared as well. I´m not personally used to configure it, so, please, follow the doc: Yocto Project Reference Manual

The downloads folder is shared for any build folder. It holds every package´s source code. For example, the ssh source code (and this source code can be built for any architecture)

In addition, you may want to share the download folder with your team (one download folder for the complete team), so please, go to Yocto Project Reference Manual and look for DL_DIR.

Build_mx6 tree

.../build_mx6$ tree -d -L 2 -A

.

├── conf

├── sstate-cache

└── tmp

    ├── buildstats

    ├── cache

    ├── deploy

    ├── log

    ├── pkgdata

    ├── sstate-control

    ├── stamps

    ├── sysroots

    ├── work

    └── work-shared

Inside tmp folder you will find images and build results. Images is placed inside deploy.

Build statistics like initial and final time for each package/task are under buildstats

The complete log for any 'bitbake' you did is under log. Take a look, for example, on the file  log/cooker/imx6qsabresd/11111111111.log. Please, notice that 111111111 is the PID number, so every time you run bitbake you have a different one.

The source code, the patches, and the logs for the last bitbake, for each package is under work. Take a look on the files under tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/ for example, for the kernel.

.../build_mx6$ tree -d -L 1 -A tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/

tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/

├── deploy-linux-imx

├── deploy-rpms

├── git

├── image

├── license-destdir

├── package

├── packages-split

├── pkgdata

├── pseudo

├── sysroot-destdir

└── temp

Go under temp, and see a lot of log.* and run.*:

.../build_mx6$ ls tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/temp/

log.do_bundle_initramfs             log.do_uboot_mkimage                run.do_package_write_rpm.28992      run.perform_packagecopy.16364

log.do_bundle_initramfs.28986       log.do_uboot_mkimage.2325           run.do_patch                        run.populate_packages.16364

log.do_compile                      log.do_unpack                       run.do_patch.2556                   run.read_shlibdeps.16364

log.do_compile.3483                 log.do_unpack.1155                  run.do_populate_lic                 run.read_subpackage_metadata.28992

log.do_compile_kernelmodules        log.task_order                      run.do_populate_lic.10988           run.split_and_strip_files.16364

log.do_compile_kernelmodules.29051  run.base_do_fetch.28859             run.do_populate_sysroot             run.split_kernel_module_packages.16364

log.do_configure                    run.base_do_unpack.1155             run.do_populate_sysroot.17692       run.split_kernel_packages.16364

log.do_configure.3048               run.BUILDSPEC.28992                 run.do_qa_configure.3048            run.sstate_create_package.10988

log.do_deploy                       run.debian_package_name_hook.16364  run.do_qa_staging.17692             run.sstate_create_package.16364

log.do_deploy.617                   run.do_bundle_initramfs             run.do_sizecheck                    run.sstate_create_package.17692

log.do_fetch                        run.do_bundle_initramfs.28986       run.do_sizecheck.2323               run.sstate_create_package.2724

log.do_fetch.28859                  run.do_compile                      run.do_strip                        run.sstate_create_package.28992

log.do_install                      run.do_compile.3483                 run.do_strip.2321                   run.sstate_create_package.617

log.do_install.2327                 run.do_compile_kernelmodules        run.do_uboot_mkimage                run.sstate_task_postfunc.10988

log.do_package                      run.do_compile_kernelmodules.29051  run.do_uboot_mkimage.2325           run.sstate_task_postfunc.16364

log.do_package.16364                run.do_configure                    run.do_unpack                       run.sstate_task_postfunc.17692

log.do_packagedata                  run.do_configure.3048               run.do_unpack.1155                  run.sstate_task_postfunc.2724

log.do_packagedata.2724             run.do_deploy                       run.emit_pkgdata.16364              run.sstate_task_postfunc.28992

log.do_package_write_rpm            run.do_deploy.617                   run.fixup_perms.16364               run.sstate_task_postfunc.617

log.do_package_write_rpm.28992      run.do_fetch                        run.package_depchains.16364         run.sstate_task_prefunc.10988

log.do_patch                        run.do_fetch.28859                  run.package_do_filedeps.16364       run.sstate_task_prefunc.16364

log.do_patch.2556                   run.do_install                      run.package_do_pkgconfig.16364      run.sstate_task_prefunc.17692

log.do_populate_lic                 run.do_install.2327                 run.package_do_shlibs.16364         run.sstate_task_prefunc.2724

log.do_populate_lic.10988           run.do_package                      run.package_do_split_locales.16364  run.sstate_task_prefunc.28992

log.do_populate_sysroot             run.do_package.16364                run.package_fixsymlinks.16364       run.sstate_task_prefunc.617

log.do_populate_sysroot.17692       run.do_packagedata                  run.package_get_auto_pr.16364       run.sysroot_cleansstate.3048

log.do_sizecheck                    run.do_packagedata.2724             run.package_get_auto_pr.2327        run.sysroot_stage_all.17692

log.do_sizecheck.2323               run.do_package_qa.16364             run.package_get_auto_pr.617         run.write_specfile.28992

log.do_strip                        run.do_package_rpm.28992            run.package_name_hook.16364

log.do_strip.2321                   run.do_package_write_rpm            run.patch_do_patch.2556

For each package, you will be able to see the log for the latest task, and what was done on the latest task. For example:

log.do_compile - shows the log output from latest do_compile made for kernel

run.do_compile - shows the compile command line

log.do_compile.111111 - shows the log output from 1111111 time of do_compile

In order to know the tasks and the task sequence, take a look to log.taskorder file

For the images generated, you will find something like that:

.../build_mx6$ ls -la tmp/deploy/images/imx6qsabresd/

total 146260

drwxr-xr-x 2 user user     4096 Mar  6 21:21 .

drwxrwxr-x 3 user user     4096 Mar  6 21:12 ..

-rw-r--r-- 1 user user 67108864 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.ext3

-rw-r--r-- 1 user user 83886080 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.sdcard

-rw-r--r-- 1 user user 18782361 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.tar.bz2

lrwxrwxrwx 1 user user       55 Mar  6 21:21 core-image-base-imx6qsabresd.ext3 -> core-image-base-imx6qsabresd-20140306173758.rootfs.ext3

lrwxrwxrwx 1 user user       57 Mar  6 21:21 core-image-base-imx6qsabresd.sdcard -> core-image-base-imx6qsabresd-20140306173758.rootfs.sdcard

lrwxrwxrwx 1 user user       58 Mar  6 21:21 core-image-base-imx6qsabresd.tar.bz2 -> core-image-base-imx6qsabresd-20140306173758.rootfs.tar.bz2

-rw-rw-r-- 2 user user   439697 Mar  6 21:12 modules--3.0.35-r37.14-imx6qsabresd-20140306173758.tgz

lrwxrwxrwx 2 user user       54 Mar  6 21:12 modules-imx6qsabresd.tgz -> modules--3.0.35-r37.14-imx6qsabresd-20140306173758.tgz

-rw-rw-r-- 2 user user      294 Mar  6 21:20 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt

lrwxrwxrwx 2 user user       35 Mar  6 21:16 u-boot.imx -> u-boot-imx6qsabresd-v2013.10-r0.imx

lrwxrwxrwx 2 user user       35 Mar  6 21:16 u-boot-imx6qsabresd.imx -> u-boot-imx6qsabresd-v2013.10-r0.imx

-rwxr-xr-x 2 user user   297984 Mar  6 21:16 u-boot-imx6qsabresd-v2013.10-r0.imx

lrwxrwxrwx 2 user user       53 Mar  6 21:12 uImage -> uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin

-rw-r--r-- 2 user user  4042496 Mar  6 21:12 uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin

lrwxrwxrwx 2 user user       53 Mar  6 21:12 uImage-imx6qsabresd.bin -> uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin

You can access any generated image, the image name ending with the yearmothdaypid (long number) is the real image, and every time your bitbake complete, it generate a new image.

The symbolic link points to the latest created image.

The .ext3 file is the EXT3 image for the rootfs. (you can copy it directly to SD card using dd: $sudo dd if=core-image-base.ext3 of=/dev/sdb2 )

The .sdcard file is the complete image to be copied to sdcard. It´s u-boot+uImage+rootfs

The .tar.bz2 file is the tarball for the rootfs, you can extract it on your PC.

uImage is the latest kernel image

u-boot is the latest u-boot image.

and so on.

Play around with generated files. A lot of them I don´t know. And a lot of them I don´t use. For a standard image generation you only need to know where the final images is placed.

Any question, comment, issue, please let me know.

Before you go, let your bitbake creates the biggest image ever:

$ bitbake fsl-image-gui

Note (24Feb2014): Required disk space for build image is ~44GB

Start it and let it finish while you do something else.

Go HOME

Go to Task #2

Go to Task#4

Labels (1)
Comments

I have some questions:

How do you know what is part of the image ? (what packages are included in a specifc image)

Also, how do you specify the Linux kernel version to use ? Does it always use the latest kernel ?

ssinfod

From meta-fsl-arm there are 2 kernel PROVIDERs: linux-fslc and linux-imx.

linux-fslc is one copy of kernel mainline from kernel.org (sometimes it has some backport or configuration patches)

linux-imx is taken from git.freescale.

There are several VERSIONs of linux-imx. for linux-fslc it point for the latest stable released kernel from kernel.org (sometimes, it points to -rc7)

The versions for linux-imx is based on MACHINE and Freescale BSP releases. meta-fsl-arm really try to keep track of latest released kernel, but, for example, latest released kernel for imx53 boards is 2.6.35. And kernel 3.0.35 does not support imx53.

So, the default kernel PROVIDER for machines is linux-imx. (http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/conf/machine/include/fsl-default-provide...)

The default kernel VERSION for machines is latest that are COMPATIBLE with that machine (for imx5 it's 2.6.35 for imx6 it's 3.0.35)

If you want to change the default value, you can override it from your local.conf:

PREFERRED_PROVIDER_virtual/kernel = "linux-fslc"

PREFERRED_VERSION_virtual/kernel = "3.11"

keep in mind that, if you set a PREFERRED_VERSION that points to a inexistent version, you will face a error.

I'm a newbie to linux stuff and I'm stuck at the "$ bitbake fsl-image-gui". I've completed the core-image-base and when i type "btbake fsl-image-gui", it says that bitbake isn't installed, but it should be cause i "bitbaked" core-image-base. Do you have any tip?

I'm using a ubuntu 12.04 x64 on virtual machine.

Before using bitbake, you need to run the setup-environment script. Make sure you are running it.

Version history
Revision #:
1 of 1
Last update:
‎06-10-2013 08:43 AM
Updated by: