Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>,
	oe-core <openembedded-core@lists.openembedded.org>
Subject: Re: Make runqemu knows nothing about machine
Date: Fri, 29 Apr 2016 10:45:08 +0100	[thread overview]
Message-ID: <1461923108.5465.87.camel@linuxfoundation.org> (raw)
In-Reply-To: <571EE388.7040107@windriver.com>

On Tue, 2016-04-26 at 11:42 +0800, Robert Yang wrote:
> Hello,
> 
> The qemu-native can boot a lot of machines, but oe-core's runqemu can
> only
> boot a few of them which are hardcoded into runqemu. I'd like to
> change
> it little to make it drop the hardcode and can boot more machines.
> Here
> are some basic thoughts, please feel free to give your comments.
> 
> runqemu is a helpful script which can help us boot images easily, but
> it
> has a lot of hard code for machine + args. I'd like to remove these
> from
> runqemu, and make it as a frame. The logical is that, who knows
> clearly
> about whether qemu can boot the machine and how to boot it (args),
> the
> answer is the machine/bsp developer, so we can:
> 
> * Add a var like QEMU_SUPPORTED = "yes/no" in the bsp conf file
> (default to no)
> * Add a var like QEMU_BOOT_ARGS = "foo" if there are special args.
> * Let do_rootfs or do_image_foo write data such as QEMU_BOOT_ARGS to
>    DEPLOY_DIR_IMAGE/runqemu/ or tmp/deploy/images/runqemu/, we can
> treat
>    the "runqemu/" dir as a database, and anything we need there, for
> example,
>    efi/pcbios, root args, and so on. We won't miss anything since all
> the
>    images which can be boot by runqemu are built by oe-core.
> * Then we can easily add supported machine to runqemu from the bsp
> itself
>    without change runqemu.
> 
> I will start working on it if there is no objections, and make sure
> it won't
> break any current supported machines.

I guess we have some decisions to make. Firstly, is that script better
in shell or python at this point? Originally, shell made sense but I'm
starting to wonder if it would be clearer in python.

If we left it as shell, I'd envisaged it going through something like
BBPATH and sourcing files from each of the layers to build up its own
list of supported machines. The trouble is we can't easily get BBPATH
in the shell environment since we can't assume bitbake and we ideally
want it to work outside of our build environment.

With the development of devtool, I'm wondering if runqemu should become
another such "command", written in python and working in any of the
environments we'd expect devtool to work (eSDK, main build). If we did
that, we'd have the layers and could easily access BBPATH and search
for additional modules to add support for additional machines.

Thoughts?

Cheers,

Richard




  reply	other threads:[~2016-04-29  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  3:42 Make runqemu knows nothing about machine Robert Yang
2016-04-29  9:45 ` Richard Purdie [this message]
2016-04-29 10:09   ` Robert Yang
2016-05-02 17:51     ` Randy Witt
2016-05-03  8:18       ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461923108.5465.87.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox