[PATCH] improve caching of kernel overlays

21 views
Skip to first unread message

Felix Moessbauer

unread,
Aug 2, 2022, 3:21:57 AM8/2/22
to isar-...@googlegroups.com, jan.k...@siemens.com, Felix Moessbauer
The kernel build supports KERNEL_OVERLAYS to overlay the official kernel
sources with custom ones.
These overlays are referenced using absolute paths, which leads to
absolute include directories on the compiler cmdline.

As the sbuilder injects some randomness into the build path,
this breaks ccache caching.
To fix this, we set the CCACHE_BASEDIR to the CURDIR
for the kernel build.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
meta/recipes-kernel/linux/files/debian/rules.tmpl | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta/recipes-kernel/linux/files/debian/rules.tmpl b/meta/recipes-kernel/linux/files/debian/rules.tmpl
index 8063c495..70a78547 100755
--- a/meta/recipes-kernel/linux/files/debian/rules.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/rules.tmpl
@@ -15,6 +15,7 @@ isar_env=$(strip \
export O='${O}' && \
export S='${S}' && \
export CURDIR='$(CURDIR)' \
+ export CCACHE_BASEDIR='$(CURDIR)' \
)

%:
--
2.30.2

Jan Kiszka

unread,
Aug 2, 2022, 4:47:25 AM8/2/22
to Felix Moessbauer, isar-...@googlegroups.com
On 02.08.22 09:21, Felix Moessbauer wrote:
> The kernel build supports KERNEL_OVERLAYS to overlay the official kernel
> sources with custom ones.

KERNEL_OVERLAYS is not an official kernel feature, it's an NVIDIA
downstream anti-feature, and it is scheduled to be removed. We should
not account for that mess in Isar unless it has positive side-effect on
other things.

Jan

--
Siemens AG, Technology
Competence Center Embedded Linux
Reply all
Reply to author
Forward
0 new messages