a6afa968fc
Compiling Qemu statically allows to use it to chroot into target/. It is a nice feature, so add an option for it. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> [Thomas: slightly tweak Config.in help text.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
70 lines
2.3 KiB
Plaintext
70 lines
2.3 KiB
Plaintext
config BR2_PACKAGE_HOST_QEMU
|
|
bool "host qemu"
|
|
select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE \
|
|
if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
|
|
depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
|
|
BR2_i386 || BR2_m68k || BR2_microblazeel || \
|
|
BR2_microblazebe || BR2_mips || BR2_mipsel || \
|
|
BR2_mips64 || BR2_mips64el || BR2_powerpc || \
|
|
BR2_powerpc64 || BR2_powerpc64le || BR2_sh || \
|
|
BR2_sparc || BR2_x86_64
|
|
help
|
|
QEMU is a generic and open source machine emulator and virtualizer.
|
|
|
|
This option builds an emulator for your selected architecture.
|
|
|
|
http://www.qemu.org
|
|
|
|
if BR2_PACKAGE_HOST_QEMU
|
|
|
|
config BR2_PACKAGE_HOST_QEMU_STATIC
|
|
bool "Build statically"
|
|
help
|
|
Build qemu as a statically linked executable. Use this
|
|
option if you want to 'chroot' in your target directory. The
|
|
following steps detail how to achieve this with an ARM
|
|
target:
|
|
|
|
1. Copy the qemu binary in your target directory:
|
|
|
|
cp host/usr/bin/qemu-arm target/usr/bin
|
|
|
|
2. Make sure binfmt_misc is mounted on /proc/sys/fs/binfmt_misc:
|
|
|
|
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
|
|
|
|
3. Register /usr/bin/qemu-arm is interpreter for arm
|
|
binaries. See linux/Documentation/binfmt_misc.txt for
|
|
more information:
|
|
|
|
MAGIC='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'
|
|
MASK='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
|
echo ":qemu-arm:M:0:$MAGIC:$MASK:/usr/bin/qemu-arm:OC" > /proc/sys/fs/binfmt_misc/register
|
|
|
|
4. Chroot into your target:
|
|
|
|
chroot target /bin/sh
|
|
|
|
comment "Emulators selection"
|
|
|
|
config BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
|
|
bool "Enable system emulation"
|
|
help
|
|
Enables the build of the system emulator, which allows to
|
|
boot an entire system in Qemu.
|
|
|
|
config BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
|
bool "Enable Linux user-land emulation"
|
|
help
|
|
Enables the build of the user-land emulator, which allows to
|
|
run user-space applications.
|
|
|
|
config BR2_PACKAGE_HOST_QEMU_VDE2
|
|
bool "VDE2 support"
|
|
help
|
|
Enables VDE2 support. VDE2 stands for Virtual Distributed
|
|
Ethernet and can be used to create virtual switches to
|
|
"plug" both physical and virtual machines in them.
|
|
|
|
endif
|