I am using imx8mnevk and I was trying to rebuild an image and removed the tmp directory.
I ran bitbake core-image-minimal but now the tmp directory doesn't seem to have a work-shared folder that is supposed to have all the source files.
I want to modify device tree but cant seem to find where they are located.
Is there a way to get the sources again or do I need to redo everything?
Try to avoid making any modifications within the
tmpdirectory (it's namedtmpbecause it's internal & temporary). Specifically, avoid making source code changes there because they may get overwritten during future builds, and in some cases Yocto will fail to detect modified code undertmpand won't actually do what you expect.Instead, use devtool to extract and modify the source code for a package. For example:
This will extract the kernel source into a
workspacedirectory, and override the kernel recipe to use that source.You can modify that source, build, and once you're happy with your changes,
devtoolhas some commands that automatically capture your changes as a patch file and generate a.bbappendfile in your chosen layer.Check out Using
devtoolto Patch the Kernel in Yocto's kernel development guide for tips.In your case, I suspect the
work-shareddirectory didn't reappear because Yocto was able to use thesstate-cache(which is outsidetmp) to deliver thecore-image-minimalrecipe from cache, without needing to rebuild the kernel.