On Thu, 2 Nov 2023 at 10:02, Alexander Kanavin via lists.yoctoproject.org <alex.kanavin=gmail....@lists.yoctoproject.org> wrote: > So here's what I'd like to try: > > - write a new populate_build_replica task that writes a few things > under ${WORKDIR}/replica > -- setup-layers json and script > (another option is to copy the layer trees themselves like esdk does, > which is left for maybe later. Completely offline replication is not > an initial goal, and it's good to get to a minimally viable > implementation asap.) > -- meta-build-config layer with the local.conf/bblayer.conf template. > -- sstate cache needed to fulfil the bitbake target that the task is > for (this would reuse code from esdk that does the same as much as > possible) > > All of this is then packaged into a self-extracting shell archive that: > - unpacks itself > - fetches layers using the json/script from the unpacked tree > - sets up a build directory using the template from meta-build-config > in the unpacked tree > - tweaks site.conf to point to the prepackaged sstate > > And voila! (in theory) This should be the same build as the one that > was produced elsewhere.
I started writing this as a bitbake task, but then quickly hit an obstacle: bitbake-layers deadlocks when executed in a bitbake task. At which point it dawned on me: all of the required functions are available in command-line utility form, and so this should be a script as well, with as many options as people find useful (as opposed to bitbake tasks which are more difficult to parametrize). So: - bitbake -S lockedsigs to get the list of sstate objects - gen-lockedsig-cache to populate a newly made sstate cache directory with them (optional) - bitbake-layers to save the layer configuration and build configuration Then either leave all that in an unpacked form, or package it up in a self-extracting shell archive or plain tarball. It would also contain a script that would set up a plain bitbake build from what is in the archive. This could be poky/scripts/oe-replicate-build ? Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61576): https://lists.yoctoproject.org/g/yocto/message/61576 Mute This Topic: https://lists.yoctoproject.org/mt/101356418/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-