[PATCH] runqemu: Add palmetto target

Andrew Jeffery andrew at aj.id.au
Fri Mar 18 09:32:51 AEDT 2016


On Thu, 2016-03-17 at 15:49 +1030, Joel Stanley wrote:
> On Thu, Mar 17, 2016 at 3:22 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> > The patch does a few things, but is more for inciting feedback than for
> > merging:
> > 
> > * Adds qemu_git.bb in favour of qemu_2.4.0.bb
> > * Configured to build from master, at the commit merging the AST2400 support
> > * Adds a runqemu target 'palmetto'
> 
> This is a good idea. Fix up the commit message so we can merge it :)
> 
> > 
> > diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
> > index f6c0ae3..80ba2ca 100644
> > --- a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
> > +++ b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
> 
> yocto-poky is supposed to be the upstream repository, and shouldn't be
> patched by us.

Yep, I understand that :) My process here was "hack things 'til it
builds and boots - oh look it works, I'll post the patch and get
feedback".

> 
> I don't know how poky lets us override built in recipies with those
> from other meta- packages. Can we carry your qemu-git.bb in
> meta-whatever instead?

I wasn't immediately sure about the answer to this, so I used the most
practical approach I thought would work :)

> 
> Patrick, do you have any suggestions here?

I'll have a dig through the yocto/bitbake documentation, Patrick
suggests there's plenty of override capability in a separate email.

> 
> 
> > 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
> 
> The changes to this script look like a good start.
> 
> > @@ -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")
> 
> Perhaps call it qemupalmetto? qemupalmbmc? to match the existing ones.

Right, I considered that. However, I went with 'palmetto' as the script
searches for image names based on the machine name:

    findimage() {
        ...
        filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1`
        if [ "x$filename" != "x" ]; then
            ROOTFS=$filename
            return
        fi
        ...
    }

I guess we could strip off the qemu prefix in the qemupalmetto case, or
we could change the image name to match *
-image*qemupalmetto.$extension. Conditional stripping is certainly more
sensible than changing the image name, but IMO going with 'palmetto' is
easier and less redundant than doing either of the two. But less
consistent.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160318/e4bddebf/attachment-0001.sig>


More information about the openbmc mailing list