2

I don't understand how to use devtool properly for my Yocto project. I started using it in order to patch the kernel as suggested by the Yocto Project. I just don't understand why it behaves differently if I first built the recipe (kernel) and then set up a devtool (modify) workspace, as opposed to just running devtool modify directly.

If I first build the kernel and then run devtool, it all works as I think (?) it should: the correct branch is checked out, patches are applied and my copying of a custom file from ${WORKDIR} works as expected.

If I instead just run devtool modify, I get a devtool branch that is based on something other than what I get in bitbake. The patches then fail to apply and the files I copy in do_configure:append() are not found in ${WORKDIR} (another fail).

Reading the Yocto devtool documentation on how to "patch the kernel", I can't find anything that says I should do it differently. What is happening here? What am I doing wrong, if any?


My bbappend for the kernel looks something like this:

Files:

./linux-xlnx_2024.1.bbappend
./linux-xlnx/defconfig
./linux-xlnx/0001-MyPatch.patch
./linux-xlnx/my_debug.c

linux-xlnx_2024.1.bbappend:

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "\
file://defconfig \
file://0001-MyPatch.patch \
file://my_debug.c \
"
unset KBUILD_DEFCONFIG
do_configure:append() {
 cp ${WORKDIR}/my_debug.c ${S}/drivers/net/ethernet/xilinx/
}
ninadepina
1,32913 silver badges20 bronze badges
asked Nov 18, 2025 at 13:37
2
  • 1
    Answering my own question i think, as stated here: docs.yoctoproject.org/kernel-dev/… under "2.1.1 Getting Ready to Develop Using devtool" "5. Build the Clean Image: The final step in preparing to work on the kernel is to build an initial image using bitbake". So I guess an already built image which would include the kernel is a prerequisite. Commented Nov 18, 2025 at 19:52
  • 1
    Good you found the solution, please feel free to post it as an actual answer :) Commented Nov 19, 2025 at 7:07

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.