Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bitbake SRC_URI file://

If I have a tarball, helloworld.tar.gz in a local directory, say /home/user/tarballs/, how can I make my bitbake recipe fetch from that directory?

my helloworld.bb is

SECTION = "examples"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING; md5=1b1b8016e15e07a2fec59623ebf12345"

SRC_URI = "file://helloworld.tar.gz"

but when I bitbake, I get the below warning message:

WARNING: Unable to get checksum for helloworld SRC_URI entry helloworld.tar.gz: file could not be found

I read something about FILES and FILESEXTRAPATHS can influence the download path but not sure where/how to set them.

I did a bitbake -c show FILESEXTRAPATHS but get an error message:

ERROR: Nothing PROVIDES 'FILESEXTRAPATHS'
like image 919
xyz Avatar asked Jan 07 '15 09:01

xyz


People also ask

What is BitBake file?

BitBake is a make-like build tool with the special focus of distributions and packages for embedded Linux cross compilation, although it is not limited to that. It is inspired by Portage, which is the package management system used by the Gentoo Linux distribution.

What is Src_uri?

All recipies need to contain a definition of SRC_URI. It determines what files and source code is needed and where that source code should be obtained from. This includes patches to be applied and basic files that are shipped as part of the meta-data for the package.

What is .BB file in yocto?

bb , are the most basic metadata files. These recipe files provide BitBake with the following: Descriptive information about the package. The version of the recipe. Existing Dependencies.


2 Answers

Well, if you want to fetch from a local directory, use e.g.:

SRC_URI = "file:///home/user/tarballs/helloworld.tar.gz"

The FILES and FILESEXTRAPATHS variables tells bitbake where to find files which are referenced as:

SRC_URI = "file://helloworld.tar.gz"

These files are searched for in the locations specified by those two variables. (Or rather, FILESEXTRAPATHS is searched and then some possible subdirectories of the directories specified in FILESEXTRAPATHS, amongst those the expanded values of DISTRO, MACHINE, ARCH, etc).

FILES (and FILESEXTRAPATHS) are used to find files stored together with the meta-data, i.e. under the paths meta-/recipes-/name/XXX.

See http://www.yoctoproject.org/docs/1.7/mega-manual/mega-manual.html#var-FILES and http://www.yoctoproject.org/docs/1.7/mega-manual/mega-manual.html#var-FILESEXTRAPATHS

like image 158
Anders Avatar answered Oct 11 '22 13:10

Anders


Better you can keep your files in present(where the .bb file present) directory and give the below lines in your .bb file.

FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI = "file://helloworld.tar.gz"

FILESEXTRAPATHS_prepend : tells to bitbake the files are present in where the .bb file is present.

like image 38
yoctotutor.com Avatar answered Oct 11 '22 14:10

yoctotutor.com