SDK Yocto: Forced usage of local sources

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK Yocto: Forced usage of local sources

Jump to solution
8,083 Views
keestrommel
Contributor IV

The QorIQ SDK (v1.7) uses Yocto to configure and build the required images. However the bitbake recipe (bb) files seem not to fetch the sources from the SOURCE ISO (QorIQ-SDK-V1.7-2041218-yocto/poky/sources but from GIT, FTP or HTTP repositories. This seems so because the SRC_URI definitions in the bb use git://, ftp:// or ftp:// prefixes, e.g.:

   poky/meta/recipes-extended/lsof/lsof_4.87.bb: SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"

   meta-fsl-ppc/recipes-kernel/linux/linux-qoriq_3.12.bb: SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 "

Our project requires that we can build everything from a local version controlled repository. So I like to know if it is possible to force the SDK Yocto environment to use the sources included at the SOURCE ISO.

Tags (3)
0 Kudos
1 Solution
3,321 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Thanks for pointing this out.

From SDK 1.7, source iso uses new layout:

meta-cloud-services

meta-fsl-arm

meta-fsl-networking

meta-fsl-ppc

meta-fsl-toolchain

meta-java

meta-linaro

meta-oe

meta-virtualization

poky

sources

sstate-cache

that is, poky layer is separated.

So the right cmd to create build project is: 'source ./poky/fsl-setup-poky -m <board>'.

If run 'cd poky; source . /fsl-setup-poky -m <board>', then the pre-fetched sources cannot be found. You need to modify the DL_DIR in conf/local.conf manually).

BR

View solution in original post

0 Kudos
4 Replies
3,321 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Tarballs are all stored in the directory defined by DL_DIR and the build system looks there first to find source tarballs. Yocto Project Reference Manual

The variable DL_DIR is defined in <yocto_install_path>/build_target_release.conf/local.conf

# Source download dir

DL_DIR = "/home/freescale/SDK/QorIQ-SDK-V1.6-20140619-yocto/build_p2020rdb_release/../sources"

See FAQ in Yocto Project Reference Manual:

14.22.

How does the OpenEmbedded build system obtain source code and will it work behind my firewall or proxy server?

The way the build system obtains source code is highly configurable. You can setup the build system to get source code in most environments if HTTP transport is available.

When the build system searches for source code, it first tries the local download directory. If that location fails, Poky tries PREMIRRORS, the upstream source, and then MIRRORS in that order.

BR

0 Kudos
3,321 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Yocto finds the source tarball in local <sdk-install-dir>/sources/ folder firstly, if the source tarball is not in the sources folder, Yocto will fetch the source via internet.

The two packages mentioned by you are available in the sources folder, so normally Yocto should find them in local folder instead of downloading from Internet. Can you please provide more details on how to reproduce the issue?

E.g. Linux distro, the detailed reproduce steps

BR

3,321 Views
keestrommel
Contributor IV

Liang Lunming,

The first time I tried the Yocto project it was getting sources of the internet. When reinstalling the SDK no sources were downloaded from  the internet.

Looking back I found that the first time the build_<machine>_release directory was in the directory <install_path>/poky rather then in <install_path>. The first time I followed the online SDK info and used the command "source ./fsl-setup-poky -m t1042rdb-64b" but because fsl-setup-poky does not exists in <install_path> I changed the current working directory to <install_path>/poky. The second time I followed the instructions displayed at the screen after the installation and used the command "source ./poky/fsl-setup-poky -m t1042rdb-64b" without changing the current working directory..

So the root cause of my problem was a mistake in the online SDK info (/poky is missing).

Regards,

Kees Trommel

0 Kudos
3,322 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Thanks for pointing this out.

From SDK 1.7, source iso uses new layout:

meta-cloud-services

meta-fsl-arm

meta-fsl-networking

meta-fsl-ppc

meta-fsl-toolchain

meta-java

meta-linaro

meta-oe

meta-virtualization

poky

sources

sstate-cache

that is, poky layer is separated.

So the right cmd to create build project is: 'source ./poky/fsl-setup-poky -m <board>'.

If run 'cd poky; source . /fsl-setup-poky -m <board>', then the pre-fetched sources cannot be found. You need to modify the DL_DIR in conf/local.conf manually).

BR

0 Kudos