...
Setting up a Source File Mirror
One way to speed up a clean build is to keep a mirror of source files on the local build host and use those for building instead of fetching them from the upstream repository. This usually applicable to clean builds which haven’t done an initial fetch. This mirror can be made available to other users on the build host.
- Setup a workspace based on the branch to mirror (e.g. kirkstone, rdkb-2024q1-kirkstone, rdkb-2024q2-kirkstone).
- Add this to conf/local.conf to generate tarballs of git repos downloaded during the fetch process.
- BB_GENERATE_MIRROR_TARBALLS = "1"
- Run the fetch task for the image
- bitbake target --runonly=fetch
- When bitbake completes, the download directory will contain tarballs of source files used during the build. Copy the files to the download mirror directory. Use --dry-run to see if everything looks sane. Example command to copy the files.
- rsync --exclude=*.done --dirs -v --info=nonreg0 downloads/ /srv/rdkmirrors/downloads
- Developers can add these to conf/local.conf to use the source mirror:
- SOURCE_MIRROR_URL ?= "file:///srv/rdkmirrors/downloads"
- INHERIT += "own-mirrors"
...