All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: Patrick Williams <patrick@stwcx.xyz>
Cc: OpenBMC <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH] runqemu: Add palmetto target
Date: Fri, 18 Mar 2016 09:29:24 +1030	[thread overview]
Message-ID: <1458255564.27546.34.camel@aj.id.au> (raw)
In-Reply-To: <20160317162845.GB6045@asimov.austin.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]

On Thu, 2016-03-17 at 11:28 -0500, Patrick Williams wrote:
> On Thu, Mar 17, 2016 at 03:22:48PM +1030, Andrew Jeffery wrote:
> > diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu
> > index 23cf5be..f09da50 100755
> > --- a/yocto-poky/scripts/runqemu
> > +++ b/yocto-poky/scripts/runqemu
> > @@ -110,7 +110,7 @@ while true; do
> >      arg=${1}
> >      case "$arg" in
> >          "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \
> > -        "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
> > +        "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto")
> 
> It seems like there should be a way to extend the machines in runqemu
> without modifying the script.  Maybe an environment variable like
> "palmetto_SUPPORTS_QEMU=1" that we can set in one of the bitbake machine
> files for each machine?

Yeah reading the script it did seem odd that there doesn't appear to be
a way to add qemu machine support.

> 
> Might want to bounce this problem off of #yocto on IRC.

Will do.

> 
> > +PALMETTO_DEFAULT_KERNEL=cuImage
> > +PALMETTO_DEFAULT_FSTYPE=cpio.gz
> 
> Also ideally have these come from a bitbake file.

So I was just following the convention here - but I'm taking your
comment was tied to the "it should be easier" issue above? I'll have to
see what my priorities are wrt reorganising the upstream scripts.

> 
> > +        "palmetto")
> > +            mem_size=512
> > +            ;;
> 
> > +if [ "$MACHINE" = "palmetto" ]; then
> > +    QEMU=qemu-system-arm
> > +    MACHINE_SUBTYPE=palmetto-bmc
> > +    export QEMU_AUDIO_DRV="none"
> > +    KERNCMDLINE="console=ttyS4"
> > +    QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic"
> > +fi
> > +
> 
> Would be nice if this stuff was also in a bitbake file of sorts.  Would
> really be nice if we could leverage the machine classes (palmetto is-a
> openpower) to reduce the redundancy.

I'm not enough of a bitbake master to know how easily that can be
achieved, but it sounds nice in theory. The script as it stands just
tests against the relevant 'qemu*' names and goes from there - the code
I've added just follows that same pattern. Eg, from the script:

    ...
    if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
        QEMU=qemu-system-arm
        ...
    fi
    ...
    if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
        case "$MACHINE" in
        ...
    fi
    ...

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-17 22:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  4:52 [RFC PATCH] Add palmetto target to runqemu Andrew Jeffery
2016-03-17  4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery
2016-03-17  5:19   ` Joel Stanley
2016-03-17 22:32     ` Andrew Jeffery
2016-03-17  7:42   ` Chris Austen
2016-03-17 16:33     ` Patrick Williams
2016-03-17 16:28   ` Patrick Williams
2016-03-17 22:59     ` Andrew Jeffery [this message]
     [not found]   ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com>
2016-03-17 22:38     ` Andrew Jeffery
2016-03-22 11:31     ` Andrew Jeffery
2016-03-17 15:53 ` [RFC PATCH] Add palmetto target to runqemu Patrick Williams
2016-03-17 22:40   ` Andrew Jeffery
2016-03-18 15:54     ` Patrick Williams

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=1458255564.27546.34.camel@aj.id.au \
    --to=andrew@aj.id.au \
    --cc=openbmc@lists.ozlabs.org \
    --cc=patrick@stwcx.xyz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.