Storing Yocto Downloads on private repository

Yocto, while building images normally downloads the required files from Internet and places it in Internet folder. We cannot directly share this folder for other developers to avoid downloading files again, as this contains symlinks.

To make downloads to store on a private repository, add the following in your local.conf file:

INHERIT += "own‐mirrors
BB_GENERATE_MIRROR_TARBALLS = "1"

Run your "bitbake target" which will fetch the download files and build the target.

Now, let's copy the downloaded files into another directory resolving symlinks with the following command:

rsync ‐vaL <download_folder>  $/home/embedded/src_mirror/

Push this src_mirror on to a private git repository, for others to clone.

Now, when some other developer has cloned this download repo on their machine, they can add the following configuration in their local.conf to use this downloads and avoid fetching any files from the internet.

SOURCE_MIRROR_URL ?= "file:///home/embedded/src_mirror/"
INHERIT += "own-mirrors"
BB_GENERATE_MIRROR_TARBALLS = "1"

BB_NO_NETWORK = "1"

Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto