From 3583e40b8f85182dfef947e94a908591970b72b8 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Fri, 9 Aug 2024 10:19:56 +0200 Subject: [PATCH] kconfig: get debug from Torvalds' tree if not avail locally Easier like that if we want to test older kernels. Signed-off-by: Matthieu Baerts (NGI0) --- entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index fb74cab..29597a5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -392,7 +392,15 @@ gen_kconfig() { local mode kconfig=() vck rc=0 -e BOOTPARAM_HUNG_TASK_PANIC # instead of blocking ) - vck+=(--custom kernel/configs/debug.config) + local debug_config="kernel/configs/debug.config" + + # Introduced in v5.17 + if [ ! -s "${debug_config}" ]; then + debug_config="${VIRTME_CACHE_DIR}/debug.config" + curl "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/kernel/configs/debug.config" > "${debug_config}" + fi + + vck+=(--custom "${debug_config}") else # low-overhead sampling-based memory safety error detector. # Only in non-debug: KASAN is more precise