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/
}
-
1Answering 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.Johan L– Johan L2025年11月18日 19:52:08 +00:00Commented Nov 18, 2025 at 19:52
-
1Good you found the solution, please feel free to post it as an actual answer :)Mo_– Mo_2025年11月19日 07:07:29 +00:00Commented Nov 19, 2025 at 7:07