Hello, n order to make some changes to a device driver, I sourced the kernel via an lndir:// URL. The kernel compilation itself succeeds, but the kernel.compile stage subsequently fails with the following error: make: Leaving directory '/home/ruggero/phytec/i.MX6Linux/i.MX6Linux.newKernel/platform-phyFLEX-i.MX6/build-target/linux-6.12.96' sed: can't read /home/ruggero/phytec/i.MX6Linux/i.MX6Linux/platform-phyFLEX-i.MX6/build-target/linux-6.12.96/compile_commands.json: No such file or directory make: ***[/home/ruggero/phytec/i.MX6Linux/i.MX6Linux/rules/kernel.make:276: /home/ruggero/phytec/i.MX6Linux/i.MX6Linux/platform-phyFLEX-i.MX6/state/kernel.compile] Error 2 I traced the issue to ptxd_make_world_compile_commands_filter() in ptxd_make_world_compile_commands.sh: In this function the file compile_commands.json is modified using sed, and the source is handled properly (variable ${src_cmds}). If sed succeeds, ptxd_make_world_compile_commands_cleanup() is called. However, ptxd_make_world_compile_commands_cleanup() runs sed on "${pkg_dir}/compile_commands.json". While that path is valid for regular builds, it points to the wrong location when using an lndir:// URL. As a workaround, I passed the resolved path as a parameter to ptxd_make_world_compile_commands_cleanup() and updated its second call site in ptxd_make_world_compile.sh accordingly. I have attached a patch with my changes for reference. Best regards Ruggero