mirror of
https://git.yoctoproject.org/poky-contrib
synced 2025-05-08 15:42:17 +08:00

Move the functions in qemu.bbclass to meta/lib/oe/qemu.py as they are generally useful. The qemu.bbclass is still kept, and recipes can continue to use functions from it, though they have become wrapper functions on qemu.py functions. Note that the QEMU_OPTIONS settings are still kept in qemu.bbclass. This sets a clear barrier for people to use qemu user mode. (From OE-Core rev: 7b3563b3b3901c96c3e498799a83ab8cabcf84b4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
#
|
|
# This class contains functions for recipes that need QEMU or test for its
|
|
# existence.
|
|
#
|
|
|
|
def qemu_target_binary(data):
|
|
return oe.qemu.qemu_target_binary(data)
|
|
|
|
def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
|
|
return oe.qemu.qemu_wrapper_cmdline(data, rootfs_path, library_paths)
|
|
|
|
def qemu_run_binary(data, rootfs_path, binary):
|
|
return oe.qemu.qemu_run_binary(data, rootfs_path, binary)
|
|
|
|
# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are
|
|
# PACKAGE_ARCH, *NOT* overrides.
|
|
# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
|
|
# enough and a PACKAGE_ARCH specific -cpu option is needed (hence we have to do
|
|
# this dance). For others (e.g. arm) a -cpu option is not necessary, since the
|
|
# qemu-arm default CPU supports all required architecture levels.
|
|
QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS:tune-%s" % d.getVar('TUNE_PKGARCH')) or ""}"
|
|
QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS:tune-${TUNE_PKGARCH}"
|