[PATCH] runqemu: Add palmetto target
Andrew Jeffery
andrew at aj.id.au
Fri Mar 18 09:59:24 AEDT 2016
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
-------------- 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/0d3ac416/attachment-0001.sig>
More information about the openbmc
mailing list