Hello,
I’m looking to get clarification on the proper way to make patches for linux-toradex.
As I understand it, devtool modify <recipename> should result in a repository with branch[es] like devtool[-override-*], and any custom patches for that recipe applied on devtool such that HEAD is at the most recent patch, and then you can continue working from there.
However, when I run devtool modify linux-toradex, devtool[-override-*] branches do not have my patches (from SRC_URI += " 0001-desc.patch 0002-desc.patch..." in my customlayer/recipes-kernel/linux/linux-toradex_%.bbappend file). But, the branch toradex_6.6-2.2.x-imx does have those patches.
My workflow/workaround has been to git checkout toradex_6.6-2.2.x-imx then make my commits and devtool finish linux-toradex /path/to/custom/layer. [1]
Unfortunately, that devtool finish results in all previous patch files being generated, then deleted from my custom layer, except for the ones created by commits I made during that devtool session.
If I merge toradex_6.6-2.2.x-imx into devtool (and correspondingly merge or rebase devtool-override-* branches as needed), this does not happen and the custom layer receives the patch files and updated .bbappend file. [1]
My coworker who is much more experienced with Yocto advised me that I should not be switching branches, that if devtool doesn’t have patches or incorrectly generates output patches, something is wrong in my configuration.
I got curious and asked ChatGPT about how to make these patches but I’m suspicious of its response: which was to switch branches to toradex_6.6-2.2.x, make the commit in devtool, manually generate the patch (git format-patch) and then manually copy the patch file into my custom layer and edit the .bbappend to include the new patch file in SRC_URI (thus and avoid using devtool <finish/update-recipe>).
What is the proper way to use devtool to modify linux-toradex?
Thank you much.
Footnotes:
[1] I notice that devtool finish linux-toradex /path/to/custom/layer results in my linux-toradex_%.bbappend file being updated. But if I do devtool update-recipe linux-toradex -a /path/to/custom/layer, a separate file linux-toradex_6.6-2.2.x.bbappend is created. This observation is only tangentially-related to my question but I thought it was interesting.
[2]: I did check the “related topics” that popped up while I was creating this topic, but none of them seemed relevant, topics 1 2 3 – I also searched the community and saw this topic but it didn’t quite seem to be what I was looking for either.