Hi, On Wed, Aug 16, 2023 at 03:54:38AM -0700, Nicolas Wirth via lists.yoctoproject.org wrote: > Hello everyone, I hope you're all doing well. > > I began learning how to use Yocto three months ago. I believe I now have a > general understanding of how Yocto operates and how to integrate it into my > project. However, I've encountered a question for which I'm struggling to > find a straightforward answer. > > Imagine a scenario where, due to certain constraints, you've opted for a > specific version of Yocto and have commenced work with it. As development > progresses, you realize the necessity for a particular version of a library > (such as boost). After searching for the recipe, you locate it within the > meta layer and include it in your image. Subsequently, you realize that the > version you've incorporated isn't the precise one you intended; rather, the > version of the library you require is present within an older branch of Yocto. > > My question is as follows: Without altering your existing Yocto version, how > can you utilize this "older" version of the desired library?
First, I would seriously question and fight back on requirements which dictate using old, possibly unmaintained SW versions with a lot of known CVE security vulnerabilities. Updating to a new boost version is straight forward work and almost all of the compile etc issues can be resolved using Internet search engines since most open source projects have also done the same. Second, downgrading a SW component has the same solutions as updating. Find a maintained layer with the SW component and version that you need. If that is not available, check if you can change the branch of an existing meta layer to provide what you need. Note that mixing layer branch names is frequently possible with minor changes, e.g. using meta-security master branch with kirkstone LTS poky. Then if you can't find an existing layer or branch which works, you can also fork the SW component recipe into your own layer by copying the recipe files over. You may need to apply some other patches as well to be compatible with your poky version, but those are possibly already available in the git repo of the source. In any case, you need to understand how layer priorities and version and provider configurations play together in your distro, machine, layer etc configuration. I do this by looking at "bitbake -e image" and buildhistory data. Just as an example, I updated my custom distro which inherits poky distro config and slightly modies it, from kernel 6.1.y to 6.4.x by resetting the PREFERRED_VERSION_linux-yocto to an empty string in my distro config. This picks up the newest linux-yocto recipe available from all of the layers in my configuration and that happens to be the linux-yocto_6.4.bb from poky currently. Hope this helps, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#60806): https://lists.yoctoproject.org/g/yocto/message/60806 Mute This Topic: https://lists.yoctoproject.org/mt/100776894/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
