Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [RFC PATCH 0/8] [WIP] runqemu/runqemu-internal: refactor it
Date: Thu, 23 Jun 2016 09:56:58 +0100	[thread overview]
Message-ID: <1466672218.3319.216.camel@linuxfoundation.org> (raw)
In-Reply-To: <576BA114.9020804@windriver.com>

On Thu, 2016-06-23 at 16:43 +0800, Robert Yang wrote:
> On 06/23/2016 04:17 PM, Richard Purdie wrote:
> > On Tue, 2016-05-10 at 01:13 -0700, Robert Yang wrote:
> > Sorry about not responding to this before now. My concerns:
> > 
> > a) The commandline structure is changing and I'm not sure I like
> > the
> > new one or believe its an improvement. This is particularly
> > problematic
> > from a documentation perspective. Is there a way to preserve the
> > existing syntax?
> 
> I did like to preserve the existing command, but the main problem is
> that then we had to hardcode the MACHINE knowledge into the code,
> for example, when we run:
> runqemu qemux86-64 core-image-sato
> 
> The qemux86-64 should be hardcoded into the code, otherwise it
> doesn't know this is a machine arg or typo.

If we use python code, we can ask bitbake if "qemux86-64" is a valid
MACHINE or not?

We could assume that images are in DEPLOY_DIR/MACHINE and at least try
looking to see if such a qemu-boot file exists? We could then error and
simply inform them that there didn't appear to be any data for "qemu86
-64" available. DEPLOY_DIR could come from bitbake -e. 

We could add in functionality to make it take an argument of a path to
the qemu-boot directory so that if the first option looks like a
relative/absolute PATH, try to see if a qemu-boot file exists there. If
it doesn't, it can then fall back to slower ops?

> > c) I don't think qemu-boot should be added be hardcoded into
> > image.bbclass, we need to find a better way to do this.
> 
> Sorry, I don't quite understand this, the code inside image.bbclass
> is:
> 
> +QEMU_BOOT_CLASS = "${@base_conditional('QEMU_BOOT_SUPPORTED', '1',
> 'qemu-boot', 
> '', d)}"
> +inherit ${QEMU_BOOT_CLASS}
> 
> It doesn't look like a hardcode ?

Imagine that qemu.inc does:

IMAGE_CLASSES += "qemu-boot"

You then shouldn't need to change image.bbclass at all, its much
cleaner. I don't like much of the way image.bbclass deals with all its
subclasses at the moment and don't want to make it worse.

Cheers,

Richard


  reply	other threads:[~2016-06-23  8:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10  8:13 [RFC PATCH 0/8] [WIP] runqemu/runqemu-internal: refactor it Robert Yang
2016-05-10  8:13 ` [RFC PATCH 1/8] qemu-boot.bbclass: add it for runqemu Robert Yang
2016-05-10 10:22   ` Andreas Oberritter
2016-05-10 12:45     ` Robert Yang
2016-05-10  8:14 ` [RFC PATCH 2/8] qemu.inc: set QEMU_BOOT_SUPPORTED to 1 Robert Yang
2016-05-10  8:14 ` [RFC PATCH 3/8] qemuarm.conf: set vars for runqemu Robert Yang
2016-05-10  8:14 ` [RFC PATCH 4/8] arch-arm64.inc: " Robert Yang
2016-05-10  8:14 ` [RFC PATCH 5/8] arch-x86.inc: " Robert Yang
2016-05-10  8:14 ` [RFC PATCH 6/8] arch-mips.inc: " Robert Yang
2016-05-10  8:14 ` [RFC PATCH 7/8] arch-powerpc.inc: " Robert Yang
2016-05-10  8:14 ` [RFC PATCH 8/8] runqemu/runqemu-internal: refactor it Robert Yang
2016-05-19 14:57 ` [RFC PATCH 0/8] [WIP] " Nathan Rossi
2016-05-20  2:31   ` Robert Yang
2016-05-20  2:43     ` Robert Yang
2016-05-25  7:00       ` Andrew Jeffery
2016-06-23  8:17 ` Richard Purdie
2016-06-23  8:43   ` Robert Yang
2016-06-23  8:56     ` Richard Purdie [this message]
2016-06-23  9:20       ` 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=1466672218.3319.216.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