|
@@ -241,28 +241,6 @@ ifneq ($(HOST_QEMU_HOST_SYSTEM_TYPE),Linux)
|
|
$(error "qemu-user can only be used on Linux hosts")
|
|
$(error "qemu-user can only be used on Linux hosts")
|
|
endif
|
|
endif
|
|
|
|
|
|
-# kernel version as major*256 + minor
|
|
|
|
-HOST_QEMU_HOST_SYSTEM_VERSION = $(shell uname -r | awk -F. '{ print $$1 * 256 + $$2 }')
|
|
|
|
-HOST_QEMU_TARGET_SYSTEM_VERSION = $(shell echo $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) | awk -F. '{ print $$1 * 256 + $$2 }')
|
|
|
|
-HOST_QEMU_COMPARE_VERSION = $(shell test $(HOST_QEMU_HOST_SYSTEM_VERSION) -ge $(HOST_QEMU_TARGET_SYSTEM_VERSION) && echo OK)
|
|
|
|
-
|
|
|
|
-#
|
|
|
|
-# The principle of qemu-user is that it emulates the instructions of
|
|
|
|
-# the target architecture when running the binary, and then when this
|
|
|
|
-# binary does a system call, it converts this system call into a
|
|
|
|
-# system call on the host machine. This mechanism makes an assumption:
|
|
|
|
-# that the target binary will not do system calls that do not exist on
|
|
|
|
-# the host. This basically requires that the target binary should be
|
|
|
|
-# built with kernel headers that are older or the same as the kernel
|
|
|
|
-# version running on the host machine.
|
|
|
|
-#
|
|
|
|
-
|
|
|
|
-ifeq ($(BR_BUILDING),y)
|
|
|
|
-ifneq ($(HOST_QEMU_COMPARE_VERSION),OK)
|
|
|
|
-$(error "Refusing to build qemu-user: target Linux version newer than host's.")
|
|
|
|
-endif
|
|
|
|
-endif # BR_BUILDING
|
|
|
|
-
|
|
|
|
else # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
|
else # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
|
HOST_QEMU_OPTS += --disable-linux-user
|
|
HOST_QEMU_OPTS += --disable-linux-user
|
|
endif # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
|
endif # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|