Skip to content
Commit f7add51c authored by Thomas Petazzoni's avatar Thomas Petazzoni
Browse files

qemu: add host/target Linux version check



Raise an error if the host is using an older kernel than the target.
Since qemu-user passes emulated system calls to the host kernel,
this prevents usage of qemu-user in situations where those system
calls will fail.

This is based on an original patch from Frank Hunleth
<fhunleth@troodon-software.com>, but completely rewritten in a
different way:

 * Instead of using shell based testing, we use pure make tests, which
   allows to detect the problem not when host-qemu starts to build,
   but at the very beginning of the entire Buildroot build.

 * Instead of looking at $(STAGING_DIR)/usr/include/linux/version.h
   (which requires having a dependency on the 'toolchain' package,
   which is a bit unusual for a host package), we use the
   BR2_TOOLCHAIN_HEADERS_AT_LEAST Config.in option which tells us the
   version of the kernel headers used in the toolchain.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: default avatarFrank Hunleth <fhunleth@troodon-software.com>
parent b268df55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment