mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-30 00:33:19 +00:00
vboxguestdrivers: Provide target kernel version
The Makefile uses `KERN_MAJ = $(shell uname -r | cut -d . -f1)` to determine if the kernel version is <7, which enables building vboxvideo. Therefore, with a host kernel >=7 and a target kernel <7, vboxvideo is not built and we get this error in vboxsf: ``` | In file included from ../vboxsf/include/iprt/stdarg.h:59, | from ../vboxsf/include/iprt/types.h:44, | from ../vboxsf/include/iprt/string.h:43, | from mount.vboxsf.c:62: | ../vboxsf/include/linux/stdarg.h:6:9: warning: 'va_start' redefined | 6 | #define va_start(v, l) __builtin_va_start(v, l) | | ^~~~~~~~ | In file included from mount.vboxsf.c:44: | /work/oe-upstream/bitbake-builds/poky-master/build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/7.2.14/recipe-sysroot-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/16.1.0/include/stdarg.h:49:9: note: this is the location of the previous definition | 49 | #define va_start(...) __builtin_c23_va_start(__VA_ARGS__) | | ^~~~~~~~ | ../vboxsf/include/linux/stdarg.h:8:9: warning: 'va_arg' redefined | 8 | #define va_arg(v, T) __builtin_va_arg(v, T) | | ^~~~~~ | /work/oe-upstream/bitbake-builds/poky-master/build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/7.2.14/recipe-sysroot-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/16.1.0/include/stdarg.h:54:9: note: this is the location of the previous definition | 54 | #define va_arg(v,l) __builtin_va_arg(v,l) | | ^~~~~~ | ../vboxsf/include/linux/stdarg.h:9:9: warning: 'va_copy' redefined | 9 | #define va_copy(d, s) __builtin_va_copy(d, s) | | ^~~~~~~ | /work/oe-upstream/bitbake-builds/poky-master/build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/7.2.14/recipe-sysroot-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/16.1.0/include/stdarg.h:57:9: note: this is the location of the previous definition | 57 | #define va_copy(d,s) __builtin_va_copy(d,s) | | ^~~~~~~ ``` If the missmatch is reversed, there is probably a different error. To fix this we provide the actual target kernel version via the KERN_MAJ Makefile variable Note: The kernel version might be empty during parsing (e.g. when using linux-dummy), therefore `or ''` is needed. CC: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
committed by
Khem Raj
parent
376d0ae068
commit
cd774fc8b6
@@ -32,7 +32,7 @@ S:task-patch = "${UNPACKDIR}/${BP}"
|
||||
export VBOX_KBUILD_TARGET_ARCH = "${ARCH}"
|
||||
export VBOX_KBUILD_TARGET_ARCH:x86-64 = "amd64"
|
||||
|
||||
EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'"
|
||||
EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KERN_MAJ='${@(oe.kernel.get_version_file('${STAGING_KERNEL_BUILDDIR}') or '').split('.')[0]}' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'"
|
||||
|
||||
# otherwise 5.2.22 builds just vboxguest
|
||||
MAKE_TARGETS = "all"
|
||||
|
||||
Reference in New Issue
Block a user