Use local mirror to build yocto filesystem from internal server

As we have seen in “Configure yocto to download from local mirror to save bandwidth” one way to setup your local server to build yocto is to modify PREMIRRORS and MIRRORS arguments permanantly in conf/distro/my_platform.conf but if we want to change between local mirrors for some reason, instead of changing distro configurations we can override those arguments from local.conf as,

 $ vim build/conf/local.conf 
# Source download dir
DL_DIR = "<em><strong>your_yocto_dir/</strong></em>sources"

# The sstate-cache dir
SSTATE_DIR = "<em><strong>your_yocto_dir/</strong></em>/sstate-cache"

# Packages source mirrors
SOURCE_MIRROR_URL = "http://your_IP/yocto-mirrors/mirrored-sources/"
INHERIT += "own-mirrors"

# The sstate-cache mirrors
SSTATE_MIRRORS = "http://your_IP/yocto-mirrors/sstate-cache/" 

Reference –

SOURCE_MIRROR_URL => Defines your own PREMIRRORS from which to first fetch source before attempting to fetch from the upstream specified in SRC_URI.
To use this variable, you must globally inherit the own-mirrors class and then provide the URL to your mirrors. Here is an example:

INHERIT += “own-mirrors”

BB_GENERATE_MIRROR_TARBALLS => Causes tarballs of the Git repositories to be placed in the DL_DIR directory. For performance reasons, creating and placing tarballs of the Git repositories is not the default action by the OpenEmbedded build system.


Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question