Use local mirror to build yocto file system 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 = "your_yocto_dir/sources"
 
# The sstate-cache dir
SSTATE_DIR = "your_yocto_dir/sstate-cache"
 
# Packages source mirrors
SOURCE_MIRROR_URL = "http://your_IP/yocto-mirrors/mirrored-sources/"
INHERIT += "own-mirrors"
BB_GENERATE_MIRROR_TARBALLS = "1"
 
# The sstate-cache mirrors
SSTATE_MIRRORS = "http://your_IP/yocto-mirrors/sstate-cache/"

Reference – https://www.yoctoproject.org/docs/1.5.1/ref-manual/ref-manual.html#var-BB_GENERATE_MIRROR_TARBALLS

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"
SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"

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.

BB_GENERATE_MIRROR_TARBALLS = "1"
Google Cloud Hosting Bitnami WordPr... x
Google Cloud Hosting Bitnami WordPress - GCP Increase Disk Size on Go Fix 524/ 522 Error Cloudflare

1 thought on “Use local mirror to build yocto file system from internal server”

Leave a Comment

Sign up to our newsletter!

ADB Commands Android Android Applications Android Build system Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia NDK / Middleware / HAL Operating System Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto Embedded Linux