[OE-core] [PATCH 7/8] qemuboot.bbclass: add two vars for use by runqemu

Richard Purdie richard.purdie at linuxfoundation.org
Mon Apr 10 16:53:54 UTC 2017


On Fri, 2017-04-07 at 02:47 -0700, Robert Yang wrote:
> From: Chen Qi <Qi.Chen at windriver.com>
> 
> Add STAGING_DIR_TUNCTL_NATIVE and STAGING_DIR_QEMU_BINDIR_NATIVE so
> that
> runqemu could find 'tunctl' and 'qemu-xxx' binaries to run correctly.
> 
> [YOCTO #11266]
> [YOCTO #11193]
> 
> Signed-off-by: Chen Qi <Qi.Chen at windriver.com>

Hi Robert/Qi,

Unfortunately this can't work as we can't use binaries directly from
the sysroot-components directory if they link to any libraries. tunctl
is ok but qemu links against libfdt.so.1 which isn't there. If the
system has its own copy, it may happen to work by luck but if it
doesn't, or the system version is incompatible we'd see failures.

So I'm afraid we need to find a different solution.

Cheers,

Richard

>  meta/classes/qemuboot.bbclass | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/qemuboot.bbclass
> b/meta/classes/qemuboot.bbclass
> index 2870388dfb..ac52ef295e 100644
> --- a/meta/classes/qemuboot.bbclass
> +++ b/meta/classes/qemuboot.bbclass
> @@ -70,12 +70,15 @@ QB_DRIVE_TYPE ?= "/dev/sd"
>  # Create qemuboot.conf
>  addtask do_write_qemuboot_conf after do_rootfs before do_image
>  IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete"
> +STAGING_DIR_TUNCTL_NATIVE = "${STAGING_DIR}-
> components/${BUILD_ARCH}/qemu-helper-native"
> +STAGING_DIR_QEMU_BINDIR_NATIVE = "${STAGING_DIR}-
> components/${BUILD_ARCH}/qemu-native/usr/bin"
>  
>  def qemuboot_vars(d):
>      build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
>                  'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
>                  'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
> -                'STAGING_DIR_HOST']
> +                'STAGING_DIR_HOST', 'STAGING_DIR_TUNCTL_NATIVE',
> +                'STAGING_DIR_QEMU_BINDIR_NATIVE']
>      return build_vars + [k for k in d.keys() if k.startswith('QB_')]
>  
>  do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
> -- 
> 2.11.0.rc2.dirty
> 



More information about the Openembedded-core mailing list