From 407299a9a2bada76edb4d97e2398a2305f015a61 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 7 May 2018 14:36:59 +0200 Subject: [dnbd3-rootfs] add support for configurable kernel ... version to compile dnbd3 against different kernel then the one running. Note, this uses the dracut's internal variable storing the kernel version (specifically '--kver'). This value will be passed to buid_compile_dnbd3 per environment and injected when calling cmake. --- builder/modules.d/dnbd3-rootfs/scripts/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'builder/modules.d/dnbd3-rootfs/scripts') diff --git a/builder/modules.d/dnbd3-rootfs/scripts/build.sh b/builder/modules.d/dnbd3-rootfs/scripts/build.sh index 47e5dcc7..4df163df 100644 --- a/builder/modules.d/dnbd3-rootfs/scripts/build.sh +++ b/builder/modules.d/dnbd3-rootfs/scripts/build.sh @@ -81,13 +81,19 @@ build_compile_dnbd3() { Examples: `build_compile_dnbd3 path/to/dnbd3/source/` + + Passing the kernel version to cmake: + `CMAKE_FLAGS="-DKERNEL_VERSION=4.14.6-openslx+" \ + build_compile_dnbd3 path/to/dnbd3/source/` ' pushd "$1" # NOTE: The generic way would be: "./build.sh" but this tries to build # more than we really need and takes more time. mkdir --parents build pushd build - cmake ../ + # Inject CMAKE_FLAGS as a way to control how cmake is called, + # e.g. to pass the kernel version + cmake ${CMAKE_FLAGS} ../ make -j4 dnbd3 dnbd3-client popd return $? -- cgit v1.2.3-55-g7522