1config BR2_PACKAGE_KVMTOOL
2	bool "kvmtool"
3	depends on BR2_USE_MMU # guest simple init fork()
4	# No MADV_HUGEPAGE define in uClibc(-ng)
5	depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
6	# Only mips big-endian seems to be supported (build breaks)
7	# Should work on powerpc64 but the build breaks with missing types
8	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
9		BR2_mips || BR2_x86_64 || BR2_riscv
10	# libfdt is only required for DT architectures...
11	# ...but it's not able to build for static targets
12	depends on !(BR2_STATIC_LIBS && (BR2_aarch64 || BR2_arm || \
13		BR2_armeb || BR2_riscv))
14	select BR2_PACKAGE_DTC if BR2_aarch64 || BR2_arm || BR2_armeb || BR2_riscv
15	help
16	  kvmtool is a lightweight tool for hosting KVM guests.
17	  As a pure virtualization tool it only supports guests using
18	  the same architecture, though it supports running 32-bit
19	  guests on those 64-bit architectures that allow this.
20
21	  https://git.kernel.org/cgit/linux/kernel/git/will/kvmtool.git/tree/README
22
23comment "kvmtool needs a glibc or musl toolchain"
24	depends on BR2_USE_MMU
25	depends on BR2_i386 || BR2_mips || BR2_x86_64
26	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
27
28comment "kvmtool needs a glibc or musl toolchain w/ dynamic library"
29	depends on BR2_USE_MMU
30	depends on BR2_aarch64 || BR2_arm || BR2_armeb
31	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || \
32		BR2_STATIC_LIBS
33