Task #2 - First build

cancel
Showing results for 
Search instead for 
Did you mean: 

Task #2 - First build

Task #2 - First build

Synchronize your source code

Source code you have is one week old now. So, first step is synchronize it.

$ repo sync‍‍

Create your local branch

$ repo start <new branch name> --all‍‍

Why should I create a local branch?

If you change *any* source code (for choosing another preferred kernel, for example) and want to sync again, or use master instead of dylan, you may be able to rebase or sync your source code, even with changes.

Or you found a bug, fixed that, and want to send a patch to community.

Example of a system with 2 branches: zeus and new_feature (the asterisk shows the current branch)   

$ repo branches
* new_feature | in all projects
 zeus | in all projects

Choose your board

The following command display the usage, with a list of all supported machines, all supported community distros and examples of Poky's distro:

$ source setup-environment build‍

Usage: MACHINE=<machine> DISTRO=<distro> source setup-environment <build-dir>
Usage: source setup-environment <build-dir>
 <machine> machine name
 <distro> distro name
 <build-dir> build directory

The first usage is for creating a new build directory. In this case, the
script creates the build directory <build-dir>, configures it for the
specified <machine> and <distro>, and prepares the calling shell for running
bitbake on the build directory.

The second usage is for using an existing build directory. In this case,
the script prepares the calling shell for running bitbake on the build
directory <build-dir>. The build directory configuration is unchanged.


Supported machines:
 apalis-imx6
 ccimx6ulsbcexpress
 ccimx6ulsbcpro
 cgtqmx6
 cm-fx6
 colibri-imx6
 colibri-imx6ull
 colibri-imx7
 colibri-vf
 cubox-i
 imx233-olinuxino-maxi
 imx233-olinuxino-micro
 imx233-olinuxino-mini
 imx233-olinuxino-nano
 imx6dl-riotboard
 imx6qdl-variscite-som
 imx6q-dms-ba16
 imx6qsabrelite
 imx6sl-warp
 imx6ul-pico
 imx7d-pico
 imx7s-warp
 m28evk
 m53evk
 nitrogen6sx
 nitrogen6x
 nitrogen6x-lite
 nitrogen7
 nitrogen8m
 pcm052
 tx6q-10x0
 tx6q-11x0
 tx6s-8034
 tx6s-8035
 tx6u-8033
 tx6u-80x0
 tx6u-81x0
 ventana
 wandboard
 imx23evk
 imx25pdk
 imx28evk
 imx51evk
 imx53ard
 imx53qsb
 imx6qdlsabreauto
 imx6qdlsabresd
 imx6slevk
 imx6sllevk
 imx6sxsabreauto
 imx6sxsabresd
 imx6ulevk
 imx6ullevk
 imx7dsabresd
 imx7ulpevk
 imx8mmevk
 imx8mqevk
 imx8qmmek
 imx8qxpmek
 ls1012afrwy
 ls1012ardb
 ls1021atwr
 ls1043ardb
 ls1046ardb
 ls1088ardb
 ls1088ardb-pb
 ls2080ardb
 ls2088ardb
 lx2160ardb
 mpc8548cds
 p1020rdb
 p2020rdb
 p2041rdb
 p3041ds
 p4080ds
 p5040ds-64b
 p5040ds
 t1024rdb-64b
 t1024rdb
 t1042d4rdb-64b
 t1042d4rdb
 t2080rdb-64b
 t2080rdb
 t4240rdb-64b
 t4240rdb

Supported Freescale's distros:
 fslc-framebuffer
 fslc-wayland
 fslc-x11
 fslc-xwayland

Available Poky's distros:
 poky-altcfg
 poky-bleeding
 poky
 poky-tiny


Examples:

- To create a new Yocto build directory:
 $ MACHINE=imx6qdlsabresd DISTRO=fslc-framebuffer source setup-environment build

- To use an existing Yocto build directory:
 $ source setup-environment build

ERROR: You must set MACHINE when creating a new build directory.
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

An example of command line to setup the build environment is (read and answer if you accept EULA or not):

MACHINE=imx8mmevk DISTRO=fslc-wayland source setup-environment build‍

(...)

Do you accept the EULA you just read? (y/n) y
EULA has been accepted.

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
 http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
 http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
 core-image-minimal
 meta-toolchain
 meta-toolchain-sdk
 adt-installer
 meta-ide-support

Your build environment has been configured with:

 MACHINE=imx8mmevk
 SDKMACHINE=i686
 DISTRO=fslc-wayland
 EULA=
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Now, you are in new created build directory.

Your default build/conf/local.conf file can looks like:

MACHINE ??= 'imx8mmevk'
DISTRO ?= 'fslc-wayland'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
 STOPTASKS,${TMPDIR},1G,100K \
 STOPTASKS,${DL_DIR},1G,100K \
 STOPTASKS,${SSTATE_DIR},1G,100K \
 STOPTASKS,/tmp,100M,100K \
 ABORT,${TMPDIR},100M,1K \
 ABORT,${DL_DIR},100M,1K \
 ABORT,${SSTATE_DIR},100M,1K \
 ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

For the current list of supported board, take a look on FSL Community BSP Release Notes 2.4 (Draft document) documentation

Or, see the FSL Community BSP  Release Notes

Start to build

There are a huge list of images available. Some images includes more packages than others, you can see a list of FSL Community BSP images with description here.

The list of supported images from Yocto Project (with description) is here.

When an image has more packages included, it takes longer to build.

Another way to list all the images you have installed in your metadata is:

$ find ../sources -name *image*‍

 

For the goal of this training, any image is good, but a suggestion is presented in next command line:

(make sure you are still in build directory)

$ cd build
$ bitbake core-image-base‍‍‍‍

Note (Sept2019): Required disk space for build image is ~31GB

Go to Yocto Training - HOME

Go to Task #1 - Download the source code

Go to Task #3 - The build result

Labels (1)
Comments

My 2 cents:

1. It would be nice to point to the other non-freescale machines Yocto supports.

2. The biggest image is (I believe) fsl-image-gui-sdk, but from user's perspective the fsl-image-gui is the fattest (perhaps adding a footnote to indicate this)

3. The link to Task # 1 is missing at the end of the document

Daiane, let me know if you want me to include the above changes (if you first approve them :smileyhappy: )

Leo

I pointed to meta-fsl-arm release notes, but I can include the non-freescale board supported.

For fsl-image-gui/-sdk, I think it´s not the right task to point how both images diverges.  I prefer to start with core-image-base and then include another task at the end showing a more complete "how to" for images, maybe how to create one image from scratch. What do you think?

Thanks a lot Leo :smileygrin:

hello,

the conf file for "imx6qsabrelite.conf" is not in this folder anymore.

I dont see it in the git folder or in my computer after the download.

github.com/Freescale/meta-fsl-arm

or

/fsl-community-bsp/build/conf


Where did it go ?

Thanks

ssinfo

I think I find it, the conf file for the sabrelite is now in "meta-fsl-arm-extra".

What should be the value for the BB_NUMBER_THREAD and PARALLEL_MAKE for the sabrelite in the conf/local.conf file?

By default, the value are:

BB_NUMBER_THREADS = '1'

PARALLEL_MAKE = '-j 1'

Should I set the value to 4 or 8 ?

Thanks

I think I find the answer.  It seems these two fields are related to bitbake settings for the host computers.

So it is not related to the target..

Source:

Yocto Project Reference Manual

Please correct me if I am wrong.

thanks

Hi

if you ran the setup-enviroment script, it automatically sets these for your. Both values should be equal to the number of cores on your HOST machine. You can also try doubling this value for the MAKE related variable, but I do not think you gain much.

Leo

The instructions above are very simple, but I seem to be getting a few problems, I'm afraid. I changed conf/local.conf to use "imx6qsabrelite" and ran bitbake.

I get a few warnings, which I'm guessing are OK since they seem to use mirror sites instead, but I'm also getting some errors which appear to be fatal, regarding the Boundary Devices git repository.

I tried accessing the Boundary Devices git repository without bitbake (just typing "git clone git://github.com/boundarydevices/linux-imx6.git") and that seems to work without any errors, so is it possible that there's a problem with bitbake somewhere?

All comments / suggestions welcome!

Full output is shown below:

dchirgwin@dc-ubuntu2:~/fsl-community-bsp/build$ bitbake core-image-base

Pseudo is not present but is required, building this first before the main build

Parsing recipes: 100% |#########################################| Time: 00:02:15

Parsing of 1277 .bb files complete (0 cached, 1277 parsed). 1645 targets, 68 skipped, 0 masked, 0 errors.

Build Configuration:

BB_VERSION        = "1.18.0"

BUILD_SYS         = "i686-linux"

NATIVELSBSTRING   = "Ubuntu-12.10"

TARGET_SYS        = "arm-poky-linux-gnueabi"

MACHINE           = "imx6qsabrelite"

DISTRO            = "poky"

DISTRO_VERSION    = "1.4.2"

TUNE_FEATURES     = "armv7a vfp neon"

TARGET_FPU        = "vfp-neon"

meta            

meta-yocto        = "bct:d734ab491a30078d43dee5440c03acce2d251425"

meta-oe           = "bct:81bf02c1ed858b8a7ae9297b8eab7d9355d0a48c"

meta-fsl-arm      = "bct:afe2162644544a92a517f1d51211fdcb76bb1a29"

meta-fsl-arm-extra = "bct:5f5a9cfcad223f5a1c623346780510ffcdc012ab"

meta-fsl-demos    = "bct:724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

NOTE: Tasks Summary: Attempted 63 tasks of which 0 didn't need to be rerun and all succeeded.

Loading cache: 100% |###########################################| ETA:  00:00:00

Loaded 1646 entries from dependency cache.

Build Configuration:

BB_VERSION        = "1.18.0"

BUILD_SYS         = "i686-linux"

NATIVELSBSTRING   = "Ubuntu-12.10"

TARGET_SYS        = "arm-poky-linux-gnueabi"

MACHINE           = "imx6qsabrelite"

DISTRO            = "poky"

DISTRO_VERSION    = "1.4.2"

TUNE_FEATURES     = "armv7a vfp neon"

TARGET_FPU        = "vfp-neon"

meta            

meta-yocto        = "bct:d734ab491a30078d43dee5440c03acce2d251425"

meta-oe           = "bct:81bf02c1ed858b8a7ae9297b8eab7d9355d0a48c"

meta-fsl-arm      = "bct:afe2162644544a92a517f1d51211fdcb76bb1a29"

meta-fsl-arm-extra = "bct:5f5a9cfcad223f5a1c623346780510ffcdc012ab"

meta-fsl-demos    = "bct:724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

WARNING: Failed to fetch URL http://www.zlib.net/zlib-1.2.7.tar.bz2, attempting MIRRORS if available

WARNING: Failed to fetch URL ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz, attempting MIRRORS if available

WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-util-1.5.1.tar.gz, attempting MIRRORS if available

WARNING: Failed to fetch URL http://www.apache.org/dist/subversion/subversion-1.7.8.tar.bz2, attempting MIRRORS if available

WARNING: Failed to fetch URL git://github.com/boundarydevices/linux-imx6.git, attempting MIRRORS if available

ERROR: Fetcher failure: Fetch command failed with exit code 128, output:

Cloning into bare repository '/home/dchirgwin/fsl-community-bsp/downloads//git2/github.com.boundarydevices.linux-imx6.git'...

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

ERROR: Function failed: Fetcher failure for URL: 'git://github.com/boundarydevices/linux-imx6.git'. Unable to fetch URL from any source.

ERROR: Logfile of failure stored in: /home/dchirgwin/fsl-community-bsp/build/tmp/work/imx6qsabrelite-poky-linux-gnueabi/linux-boundary/3.0.35-r0/temp/log.do_fetch.7065

ERROR: Task 281 (/home/dchirgwin/fsl-community-bsp/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-boundary_3.0.35.bb, do_fetch) failed with exit code '1'

NOTE: Tasks Summary: Attempted 983 tasks of which 148 didn't need to be rerun and 1 failed.

Waiting for 0 running tasks to finish:

Summary: 1 task failed:

  /home/dchirgwin/fsl-community-bsp/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-boundary_3.0.35.bb, do_fetch

Summary: There were 5 WARNING messages shown.

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

dchirgwin@dc-ubuntu2:~/fsl-community-b

are you able to download those packages if you use wget?

$ wget ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz


for example?

I can use wget for the FTP link, but all three HTTP links fail with 404 using wget.

Taking the subversion link as an example, if I go to the parent directory http://www.apache.org/dist/subversion I can see that the required file (version 1.7.8) is not actually there - the oldest version seems to be 1.7.11.

Well,

When I face the downloads issues I wait for sometime and try again.

You can try to get the same package from other source.

Hi Daiane,

Thanks for the response. I just modified my post a few minutes ago with new information, which you may not have seen:

Taking the subversion link as an example, if I go to the parent directory http://www.apache.org/dist/subversion I can see that the required file (version 1.7.8) is not actually there - the oldest version seems to be 1.7.11.

Does that make a difference?

Regards,

Dave C

I'm getting a bit further with this now. The packages I can't load are not actually present on the relevant web sites, because they have been superseded.

http://www.zlib.net/zlib-1.2.7.tar.bz2 has been replaced with 1.2.8

http://www.apache.org/dist/apr/apr-util-1.5.1.tar.gz has been replaced with 1.5.2

http://www.apache.org/dist/subversion/subversion-1.7.8.tar.bz2 has been replaced with 1.7.11


The "master" branch in yocto poky has already made the necessary changes to use the new packages instead, but the "dylan" branch has not. I tried changing the repo manifest to use the "master" branch instead, but that causes other problems. I guess the answer is to push the necessary changes to yocto and then everyone can get them.


Any comments?

From yocto point of view, yes, it makes all difference. Yocto only "see" the right version package, because it only "looks for" the right version package.

But, if you think you can use another version, you can change the recipe in order to "add a new package".

I don´t think it worth. Be sure your Internet connection is OK. Be sure all mirrors are up. And try again. Yesterday I was able to go from download source code from a complete image downloading everything again. So I think it was only a period of instability.

Thanks for the material!

It works fine on my 64-bit Ubuntu 12.04 with i5 processor but fails on my 32-bit Ubuntu 12.04 with qual-core processor.

But something strange happens while giving 'bitbake core-image-base'.

It automatically shuts down my system everytime. I have not copied anything betwenn my two machines.


I need to work only on my 32-bit system. Can you please help??

muthuswamydikshit, without more context (as build log or something) it is hard to guess.

My rough guess is not enough memory for the build and/or disk space. Yocto is voracious for computational resources so this might be the cause of problem.

I have a Intel dual-core 1.93Ghz(I guess) processor.

More than 200GB hard disk space and 3GB RAM.

OS: Ubuntu 12.04 LTS (32-bit)

I dint have application running while building.

Is this not sufficient ?

Moreover, I was compiling only for a base image not gui.

It automatically shuts down every time.

Under build/tmp/work, I can find only 3 files.

Any hints to overcome this problem?

From your description it seems to be a hardware issue; I'd bet a fan issue.

Hi all,

in dylan branch I think there is a bug in file:

/build/tmp/work/i686-linux/elfutils-native/0.148-r11/line2addr.c

at line 135 there is: switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))

instead of: switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))

This bug causes a compilation error when I try:

bitbake fsl-image-test

In master branch I don't found the same issue, but in this branch there isn't the memtool!

Please verify!

LeonardoSandovalGonzalez

DaianeAngolini

Bye.

P.S.: the compilation error is:

| /media/francesco/DATI/yocto-bsp/build/tmp/work/i686-linux/elfutils-native/0.148-r11/elfutils-0.148/tests/line2addr.c:135:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]

|        switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))

|        ^

Hi francpalm (there are three francesco Palmisanos on the community, is that you multiple times?!!) Tthanks for sharing the fix. This patch does not belong to meta-fsl-* layers (I think), so it must be send to another list.

Before you send the patch, can you rebuilt your image with an new build folder? if case you have already done this, ignore this step and send the patch.

OtavioSalvador FYI.

Leo

Thanks for letting us know!

You really need to be on dylan, now that dora was released? In this case we can work together to get it fixed on your local files. I would need to double check if dylan is still supported for bugfixes..... :smileysad:

Dylan is still being maintained; it just needs to be send as a fix for oe-core mailing list.

Please put:

[for-dylan][PATCH] ...

in subject for the patch. So people handle it accordingly.

Hi all,

for LeonardoSandovalGonzalez : I don't know the other two my omonymous! I changed my avatar in a car (I work on automotive projects :-D )!

I've already deleted all my files and repeated the Daiane guide with dylan and with master branch. Master branch don't have the issue.

for DaianeAngolini : if you suggest to use dora I'll be happy to follow your advice. The image fsl-image-test has the memtool already installed?

for OtavioSalvador : I'm a beginner in this world but I'll be happy to learn how create and send a patch. I don't want to mess!

If you have some time to help me I thanks in advance.

Bye.

I can help, for sure.

Please try to reproduce your issue with dora branches and if you do, please get a patch applied in Poky to fix it.

Once you does it, I can help with the upstreaming process for it :-)

My memory is not trustable at all. I remember memtool was already installed on fsl-image-test at some point of time. When? I don´t know.

But add on your local.conf:

CORE_IMAGE_EXTRA_INSTALL += "memtool"

and you will have it installed on *any* image (much better than rely on my memory :D)

Version history
Revision #:
2 of 2
Last update:
2 weeks ago
Updated by:
 
Contributors