Use devtool for kernel modification

Hi all,

I need to do some modifications in the 5.4 kernel provided by the 5.0 BSP. Usually (for other SOM) I use devtool modify <kernel-img> and modify/commit my changes in the yocto kernel recipe.

Here I got :

ERROR: Execution of '/home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430' failed with exit code 2:
/home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: 119: /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: cannot open /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/workdir/defconfig: No such file
WARNING: exit code 2 from a shell command.

ERROR: Logfile of failure stored in: /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/log.do_preconfigure.546430
Log data follows:
| DEBUG: Executing shell function do_preconfigure
| /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: 119: /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: cannot open /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/workdir/defconfig: No such file
| WARNING: exit code 2 from a shell command.
| ERROR: Execution of '/home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430' failed with exit code 2:
| /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: 119: /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/temp/run.do_preconfigure.546430: cannot open /home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/linux-toradex/5.4.47+gitAUTOINC+9e7307657f+gitAUTOINC+9e7307657f-r1/devtooltmp-fwwugw2f/workdir/defconfig: No such file

So, my defconfig is not found by devtool but I can build without error the 5.4 kernel and any yocto image provided by toradex, using bitbake.

After looking carefully in my workdir folder when I use the devtool modify linux-toradex command, I saw a defconfig file added and quickly removed…

Is this nominal in your BSPs ?
are you using this devtool functionnality ?

Thank you for your time,
Arthur

HI @Rapsody

Thanks for writing to the Toradex Community!

Sorry for the delayed answer but we never used devtool in our Build Environment.
What is your Application?
What are you trying to do?

Best regards,
Jaski

Hello Jaski,

I ran into the same problem. I use devtool to quickly apply and test some patches to kernel, before properly integrating them into a recipe.

I tried digging into it, but I quickly failed to determine which task creates the ${WORKDIR}/defconfig file.

Best regards, Adam

Although not a proper solution, I found a workaround.

In our enviroment we are used to in-tree defconfigs. After I moved the defconfig from meta-toradex-nxp to our mirror of kernel sources, devtool modify linux-toradex started to work.

Perfect that you found a solution.
Thanks for the feedback.

Best regards,
Jaski