How can I rebuild the image after making some modifications to driver source code?
I have tried bitbake -f -c compile and bitbake but I coudn't find the modified settings in the driver. Can someone tell me how can i rebuild the image with the modified code.
I guess that you want to re-generate the whole image, don't you? If so, you can try the following commands to ensure that bitbake won't use the sstate cache:
bitbake image-name -c cleansstate && bitbake image-name
In the case you just want to rebuild the kernel, substitute image-name by virtual/kernel (or the name of whatever recipe you want to rebuild).
Note that the do_cleansstate task is going to remove the recipe ${WORKDIR}!
For further information: https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-tasks-cleansstate
In the case you're doing such modifications directly in the ${WORKDIR}, which you shouldn't unless you're testing, the execution of the following command would be enough:
bitbake virtual/kernel -f -c compile
or
bitbake virtual/kernel -C compile (to invalidate the stamps and force all tasks starting from do_compile)
Since changes in ${WORKDIR} will be rewritten after cleaning, you can put your code to external workspace by command devtool modify <recipe-name>
By default your recipe code will be put into tmp/workspace/source/ directory
Now you can freely modify your code and simply build using bitbake <recipe-name> as usual.
When your modification are OK you can easily save your changes as patches to original recipe code (as far as it is likely open-source and downloaded):
devtool recipe-update -a <layer-path> <recipe-name>If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With