From 37241b561c3e6c4f5ac048f9f176c582d69159da Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Wed, 26 Feb 2025 11:28:32 +0100 Subject: [PATCH 1/2] README: recommended way to build in a separate dir To make things clearer for users wondering how to do so. Signed-off-by: Matthieu Baerts (NGI0) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index cc695d8..e2ca36a 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,13 @@ Examples $ vng --build --arch arm64 --root /opt/chroot/arm64/ ``` + - Build the kernel using a separate build directory, and run it, in verbose: +``` + $ mkdir -p .virtme/build + $ vng O=.virtme/build --build --verbose + $ vng O=.virtme/build --verbose +``` + - Execute `uname -r` inside a kernel recompiled in the current directory and send the output to cowsay on the host: ``` From 53eb5f651695fe8b8948f6838fc06675ca50cd4e Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Wed, 26 Feb 2025 11:34:35 +0100 Subject: [PATCH 2/2] README: example with CCache CCache is often used to accelerate the kernel rebuilds. It is not difficult to use it, but people might not think about it, and setting KBUILD_BUILD_TIMESTAMP=0 to increase the cache hits might not be well known. Signed-off-by: Matthieu Baerts (NGI0) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e2ca36a..383aead 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,14 @@ Examples $ vng O=.virtme/build --verbose ``` + - Accelerate the kernel rebuilds using CCache (if installed): +``` + $ PATH="/usr/lib/ccache:${PATH}" \ + KBUILD_BUILD_TIMESTAMP=0 \ + vng --build + # or export the two variables before, see 'man ccache' for more details +``` + - Execute `uname -r` inside a kernel recompiled in the current directory and send the output to cowsay on the host: ```