Patchwork runqemu: Extend to support genericx86* machine types

login
register
mail settings
Submitter Saul Wold
Date Nov. 22, 2013, 10:33 p.m.
Message ID <1385159590-27427-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/62251/
State New
Headers show

Comments

Saul Wold - Nov. 22, 2013, 10:33 p.m.
I have done some very basic testing to boot to graphics and run some graphics 
programs.  The genericx86* currently do not have Sound or NFSD support enabled
which qemux86* kernel do.  There might be some other bits needed, I am working
to figure that out.

[YOCTO #5105]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 scripts/runqemu          | 21 +++++++++++++++------
 scripts/runqemu-internal | 10 ++++++----
 2 files changed, 21 insertions(+), 10 deletions(-)
Bruce Ashfield - Nov. 23, 2013, 2 a.m.
On Fri, Nov 22, 2013 at 5:33 PM, Saul Wold <sgw@linux.intel.com> wrote:
> I have done some very basic testing to boot to graphics and run some graphics
> programs.  The genericx86* currently do not have Sound or NFSD support enabled
> which qemux86* kernel do.  There might be some other bits needed, I am working
> to figure that out.

I've had many debates over what you are doing with this commit over the years,
so I'll ask here.

What exactly do we gain by enabling this directly that qemux86* doesn't already
give us ? Maintaining machines that boot on hardware AND on simulation leads
to compromise and sometimes partial insanity (trust me on this, I've
lived it) ..
so again, what does booting genericx86 vs qemux86 gain.

I'd go as far as to suggest that qemux86 be dropped in favour of genericx86 if
this goes in. Or runqemu be made extensible so the genericx86 enablement
could stay in a layer where it belongs.

Cheers,

Bruce

>
> [YOCTO #5105]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  scripts/runqemu          | 21 +++++++++++++++------
>  scripts/runqemu-internal | 10 ++++++----
>  2 files changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 619ffb6..1f8199c 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -108,6 +108,7 @@ while true; do
>      arg=${1}
>      case "$arg" in
>          "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
> +        "genericx86" | "genericx86-64" | \
>          "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
>              [ -z "$MACHINE" ] && MACHINE=$arg || \
>                  error "conflicting MACHINE types [$MACHINE] and [$arg]"
> @@ -163,7 +164,8 @@ while true; do
>              SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
>              ;;
>          "audio")
> -            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
> +            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" -o \
> +                 "x$MACHINE" = "xgenericx86" -o "x$MACHINE" = "xgenericx86-64" ]; then
>                  echo "Enabling audio in qemu."
>                  echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
>                  QEMU_AUDIO_DRV="alsa"
> @@ -224,13 +226,13 @@ fi
>
>  if [ -z "$MACHINE" ]; then
>      if [ "x$FSTYPE" = "xvmdk" ]; then
> -        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
> +        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>          if [ -z "$MACHINE" ]; then
>              error "Unable to set MACHINE from vmdk filename [$VM]"
>          fi
>          echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
>      else
> -        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
> +        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>          if [ -z "$MACHINE" ]; then
>              error "Unable to set MACHINE from kernel filename [$KERNEL]"
>          fi
> @@ -248,7 +250,8 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>          echo "$YOCTO_KVM_WIKI";
>          exit 1;
>      fi
> -    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ]; then
> +    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" -o \
> +         "x$MACHINE" != "xgenericx86" -a "x$MACHINE" != "xgenericx86-64" ]; then
>          echo "KVM only support x86 & x86-64. Remove kvm from the command-line";
>          exit 1;
>      fi
> @@ -265,9 +268,9 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>          exit 1;
>      fi
>      if [ -w /dev/kvm -a -r /dev/kvm ]; then
> -        if [ "x$MACHINE" = "xqemux86" ]; then
> +        if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xgeneric86" ]; then
>              SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
> -        elif [ "x$MACHINE" = "xqemux86-64" ]; then
> +        elif [ "x$MACHINE" = "xqemux86-64" -o "x$MACHINE" = "xgeneric86-64" ]; then
>              SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
>          fi
>          KVM_ACTIVE="yes"
> @@ -292,9 +295,15 @@ machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
>  QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
>  QEMUX86_DEFAULT_FSTYPE=ext3
>
> +GENERICX86_DEFAULT_KERNEL=bzImage-genericx86.bin
> +GENERICX86_DEFAULT_FSTYPE=ext3
> +
>  QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
>  QEMUX86_64_DEFAULT_FSTYPE=ext3
>
> +GENERICX86_64_DEFAULT_KERNEL=bzImage-genericx86-64.bin
> +GENERICX86_64_DEFAULT_FSTYPE=ext3
> +
>  QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
>  QEMUARM_DEFAULT_FSTYPE=ext3
>
> diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
> index 74b0c35..e7b8a82 100755
> --- a/scripts/runqemu-internal
> +++ b/scripts/runqemu-internal
> @@ -41,10 +41,10 @@ if [ ! -z "$mem_set" ] ; then
>    mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
>  else
>      case "$MACHINE" in
> -        "qemux86")
> +        "qemux86"|"genericx86")
>              mem_size=256
>              ;;
> -        "qemux86-64")
> +        "qemux86-64"|"genericx86-64")
>              mem_size=256
>              ;;
>          "qemuarm")
> @@ -280,6 +280,8 @@ case "$MACHINE" in
>      "qemuarmv7") ;;
>      "qemux86") ;;
>      "qemux86-64") ;;
> +    "genericx86") ;;
> +    "genericx86-64") ;;
>      "qemuzynq") ;;
>      "akita") ;;
>      "spitz") ;;
> @@ -355,7 +357,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
>      fi
>  fi
>
> -if [ "$MACHINE" = "qemux86" ]; then
> +if [ "$MACHINE" = "qemux86" -o "$MACHINE" = "genericx86" ]; then
>      QEMU=qemu-system-i386
>      QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>      if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
> @@ -379,7 +381,7 @@ if [ "$MACHINE" = "qemux86" ]; then
>      KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
>  fi
>
> -if [ "$MACHINE" = "qemux86-64" ]; then
> +if [ "$MACHINE" = "qemux86-64" -o "$MACHINE" = "genericx86-64" ]; then
>      QEMU=qemu-system-x86_64
>      QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>      if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
> --
> 1.8.3.1
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Saul Wold - Dec. 2, 2013, 6:28 p.m.
On 11/22/2013 06:00 PM, Bruce Ashfield wrote:
> On Fri, Nov 22, 2013 at 5:33 PM, Saul Wold <sgw@linux.intel.com> wrote:
>> I have done some very basic testing to boot to graphics and run some graphics
>> programs.  The genericx86* currently do not have Sound or NFSD support enabled
>> which qemux86* kernel do.  There might be some other bits needed, I am working
>> to figure that out.
>
> I've had many debates over what you are doing with this commit over the years,
> so I'll ask here.
>
> What exactly do we gain by enabling this directly that qemux86* doesn't already
> give us ? Maintaining machines that boot on hardware AND on simulation leads
> to compromise and sometimes partial insanity (trust me on this, I've
> lived it) ..
> so again, what does booting genericx86 vs qemux86 gain.
>
I believe that this is fairly doable in the x86 space since the compiler 
setup and kernel configurations are almost identical, sound and nfs are 
missing from the generic configuration.

This will also help our CI on the autobuilder since it will drop 2 machines.

> I'd go as far as to suggest that qemux86 be dropped in favour of genericx86 if
> this goes in. Or runqemu be made extensible so the genericx86 enablement
> could stay in a layer where it belongs.
>
I will be sending an RFC to drop qemux86 and qemux86-64 in favor of the 
generic equivalents.

There is also a bug filed to make runqemu more extensible, should be 
coming in later in 1.6.

Sau!

> Cheers,
>
> Bruce
>
>>
>> [YOCTO #5105]
>>
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>>   scripts/runqemu          | 21 +++++++++++++++------
>>   scripts/runqemu-internal | 10 ++++++----
>>   2 files changed, 21 insertions(+), 10 deletions(-)
>>
>> diff --git a/scripts/runqemu b/scripts/runqemu
>> index 619ffb6..1f8199c 100755
>> --- a/scripts/runqemu
>> +++ b/scripts/runqemu
>> @@ -108,6 +108,7 @@ while true; do
>>       arg=${1}
>>       case "$arg" in
>>           "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
>> +        "genericx86" | "genericx86-64" | \
>>           "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
>>               [ -z "$MACHINE" ] && MACHINE=$arg || \
>>                   error "conflicting MACHINE types [$MACHINE] and [$arg]"
>> @@ -163,7 +164,8 @@ while true; do
>>               SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
>>               ;;
>>           "audio")
>> -            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
>> +            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" -o \
>> +                 "x$MACHINE" = "xgenericx86" -o "x$MACHINE" = "xgenericx86-64" ]; then
>>                   echo "Enabling audio in qemu."
>>                   echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
>>                   QEMU_AUDIO_DRV="alsa"
>> @@ -224,13 +226,13 @@ fi
>>
>>   if [ -z "$MACHINE" ]; then
>>       if [ "x$FSTYPE" = "xvmdk" ]; then
>> -        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>> +        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>           if [ -z "$MACHINE" ]; then
>>               error "Unable to set MACHINE from vmdk filename [$VM]"
>>           fi
>>           echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
>>       else
>> -        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>> +        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>           if [ -z "$MACHINE" ]; then
>>               error "Unable to set MACHINE from kernel filename [$KERNEL]"
>>           fi
>> @@ -248,7 +250,8 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>>           echo "$YOCTO_KVM_WIKI";
>>           exit 1;
>>       fi
>> -    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ]; then
>> +    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" -o \
>> +         "x$MACHINE" != "xgenericx86" -a "x$MACHINE" != "xgenericx86-64" ]; then
>>           echo "KVM only support x86 & x86-64. Remove kvm from the command-line";
>>           exit 1;
>>       fi
>> @@ -265,9 +268,9 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>>           exit 1;
>>       fi
>>       if [ -w /dev/kvm -a -r /dev/kvm ]; then
>> -        if [ "x$MACHINE" = "xqemux86" ]; then
>> +        if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xgeneric86" ]; then
>>               SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
>> -        elif [ "x$MACHINE" = "xqemux86-64" ]; then
>> +        elif [ "x$MACHINE" = "xqemux86-64" -o "x$MACHINE" = "xgeneric86-64" ]; then
>>               SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
>>           fi
>>           KVM_ACTIVE="yes"
>> @@ -292,9 +295,15 @@ machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
>>   QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
>>   QEMUX86_DEFAULT_FSTYPE=ext3
>>
>> +GENERICX86_DEFAULT_KERNEL=bzImage-genericx86.bin
>> +GENERICX86_DEFAULT_FSTYPE=ext3
>> +
>>   QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
>>   QEMUX86_64_DEFAULT_FSTYPE=ext3
>>
>> +GENERICX86_64_DEFAULT_KERNEL=bzImage-genericx86-64.bin
>> +GENERICX86_64_DEFAULT_FSTYPE=ext3
>> +
>>   QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
>>   QEMUARM_DEFAULT_FSTYPE=ext3
>>
>> diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
>> index 74b0c35..e7b8a82 100755
>> --- a/scripts/runqemu-internal
>> +++ b/scripts/runqemu-internal
>> @@ -41,10 +41,10 @@ if [ ! -z "$mem_set" ] ; then
>>     mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
>>   else
>>       case "$MACHINE" in
>> -        "qemux86")
>> +        "qemux86"|"genericx86")
>>               mem_size=256
>>               ;;
>> -        "qemux86-64")
>> +        "qemux86-64"|"genericx86-64")
>>               mem_size=256
>>               ;;
>>           "qemuarm")
>> @@ -280,6 +280,8 @@ case "$MACHINE" in
>>       "qemuarmv7") ;;
>>       "qemux86") ;;
>>       "qemux86-64") ;;
>> +    "genericx86") ;;
>> +    "genericx86-64") ;;
>>       "qemuzynq") ;;
>>       "akita") ;;
>>       "spitz") ;;
>> @@ -355,7 +357,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
>>       fi
>>   fi
>>
>> -if [ "$MACHINE" = "qemux86" ]; then
>> +if [ "$MACHINE" = "qemux86" -o "$MACHINE" = "genericx86" ]; then
>>       QEMU=qemu-system-i386
>>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>>       if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
>> @@ -379,7 +381,7 @@ if [ "$MACHINE" = "qemux86" ]; then
>>       KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
>>   fi
>>
>> -if [ "$MACHINE" = "qemux86-64" ]; then
>> +if [ "$MACHINE" = "qemux86-64" -o "$MACHINE" = "genericx86-64" ]; then
>>       QEMU=qemu-system-x86_64
>>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>>       if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
>> --
>> 1.8.3.1
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
Bruce Ashfield - Dec. 2, 2013, 6:35 p.m.
On Mon, Dec 2, 2013 at 1:28 PM, Saul Wold <sgw@linux.intel.com> wrote:
> On 11/22/2013 06:00 PM, Bruce Ashfield wrote:
>>
>> On Fri, Nov 22, 2013 at 5:33 PM, Saul Wold <sgw@linux.intel.com> wrote:
>>>
>>> I have done some very basic testing to boot to graphics and run some
>>> graphics
>>> programs.  The genericx86* currently do not have Sound or NFSD support
>>> enabled
>>> which qemux86* kernel do.  There might be some other bits needed, I am
>>> working
>>> to figure that out.
>>
>>
>> I've had many debates over what you are doing with this commit over the
>> years,
>> so I'll ask here.
>>
>> What exactly do we gain by enabling this directly that qemux86* doesn't
>> already
>> give us ? Maintaining machines that boot on hardware AND on simulation
>> leads
>> to compromise and sometimes partial insanity (trust me on this, I've
>> lived it) ..
>> so again, what does booting genericx86 vs qemux86 gain.
>>
> I believe that this is fairly doable in the x86 space since the compiler
> setup and kernel configurations are almost identical, sound and nfs are
> missing from the generic configuration.
>
> This will also help our CI on the autobuilder since it will drop 2 machines.
>
>
>> I'd go as far as to suggest that qemux86 be dropped in favour of
>> genericx86 if
>> this goes in. Or runqemu be made extensible so the genericx86 enablement
>> could stay in a layer where it belongs.
>>
> I will be sending an RFC to drop qemux86 and qemux86-64 in favor of the
> generic equivalents.
>
> There is also a bug filed to make runqemu more extensible, should be coming
> in later in 1.6.

This should be fine, as long as we are only supporting one machine that does
a single job. But my warning still stands that eventually you'll end
with a driver
that behaves differently between the h/w and emulator and we'll have to make
tradeoffs/compromises at that point. Targeted machines avoid that problem.

If we drop qemux86* as machine definitions in oe-core, I'll do the same in
the kernel tree, since I won't have an easy way to boot test them .. which is
fine, I just don't want them to bitrot.

Cheers,

Bruce

>
> Sau!
>
>
>> Cheers,
>>
>> Bruce
>>
>>>
>>> [YOCTO #5105]
>>>
>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>> ---
>>>   scripts/runqemu          | 21 +++++++++++++++------
>>>   scripts/runqemu-internal | 10 ++++++----
>>>   2 files changed, 21 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/scripts/runqemu b/scripts/runqemu
>>> index 619ffb6..1f8199c 100755
>>> --- a/scripts/runqemu
>>> +++ b/scripts/runqemu
>>> @@ -108,6 +108,7 @@ while true; do
>>>       arg=${1}
>>>       case "$arg" in
>>>           "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" |
>>> "qemumipsel" | \
>>> +        "genericx86" | "genericx86-64" | \
>>>           "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" |
>>> "qemuzynq")
>>>               [ -z "$MACHINE" ] && MACHINE=$arg || \
>>>                   error "conflicting MACHINE types [$MACHINE] and [$arg]"
>>> @@ -163,7 +164,8 @@ while true; do
>>>               SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
>>>               ;;
>>>           "audio")
>>> -            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64"
>>> ]; then
>>> +            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64"
>>> -o \
>>> +                 "x$MACHINE" = "xgenericx86" -o "x$MACHINE" =
>>> "xgenericx86-64" ]; then
>>>                   echo "Enabling audio in qemu."
>>>                   echo "Please install snd_intel8x0 or snd_ens1370 driver
>>> in linux guest."
>>>                   QEMU_AUDIO_DRV="alsa"
>>> @@ -224,13 +226,13 @@ fi
>>>
>>>   if [ -z "$MACHINE" ]; then
>>>       if [ "x$FSTYPE" = "xvmdk" ]; then
>>> -        MACHINE=`basename $VM | sed -n
>>> 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>> +        MACHINE=`basename $VM | sed -n
>>> 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>>           if [ -z "$MACHINE" ]; then
>>>               error "Unable to set MACHINE from vmdk filename [$VM]"
>>>           fi
>>>           echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
>>>       else
>>> -        MACHINE=`basename $KERNEL | sed -n
>>> 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>> +        MACHINE=`basename $KERNEL | sed -n
>>> 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
>>>           if [ -z "$MACHINE" ]; then
>>>               error "Unable to set MACHINE from kernel filename
>>> [$KERNEL]"
>>>           fi
>>> @@ -248,7 +250,8 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>>>           echo "$YOCTO_KVM_WIKI";
>>>           exit 1;
>>>       fi
>>> -    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ];
>>> then
>>> +    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" -o \
>>> +         "x$MACHINE" != "xgenericx86" -a "x$MACHINE" != "xgenericx86-64"
>>> ]; then
>>>           echo "KVM only support x86 & x86-64. Remove kvm from the
>>> command-line";
>>>           exit 1;
>>>       fi
>>> @@ -265,9 +268,9 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
>>>           exit 1;
>>>       fi
>>>       if [ -w /dev/kvm -a -r /dev/kvm ]; then
>>> -        if [ "x$MACHINE" = "xqemux86" ]; then
>>> +        if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xgeneric86" ];
>>> then
>>>               SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
>>> -        elif [ "x$MACHINE" = "xqemux86-64" ]; then
>>> +        elif [ "x$MACHINE" = "xqemux86-64" -o "x$MACHINE" =
>>> "xgeneric86-64" ]; then
>>>               SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
>>>           fi
>>>           KVM_ACTIVE="yes"
>>> @@ -292,9 +295,15 @@ machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed
>>> 's/-/_/'`
>>>   QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
>>>   QEMUX86_DEFAULT_FSTYPE=ext3
>>>
>>> +GENERICX86_DEFAULT_KERNEL=bzImage-genericx86.bin
>>> +GENERICX86_DEFAULT_FSTYPE=ext3
>>> +
>>>   QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
>>>   QEMUX86_64_DEFAULT_FSTYPE=ext3
>>>
>>> +GENERICX86_64_DEFAULT_KERNEL=bzImage-genericx86-64.bin
>>> +GENERICX86_64_DEFAULT_FSTYPE=ext3
>>> +
>>>   QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
>>>   QEMUARM_DEFAULT_FSTYPE=ext3
>>>
>>> diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
>>> index 74b0c35..e7b8a82 100755
>>> --- a/scripts/runqemu-internal
>>> +++ b/scripts/runqemu-internal
>>> @@ -41,10 +41,10 @@ if [ ! -z "$mem_set" ] ; then
>>>     mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
>>>   else
>>>       case "$MACHINE" in
>>> -        "qemux86")
>>> +        "qemux86"|"genericx86")
>>>               mem_size=256
>>>               ;;
>>> -        "qemux86-64")
>>> +        "qemux86-64"|"genericx86-64")
>>>               mem_size=256
>>>               ;;
>>>           "qemuarm")
>>> @@ -280,6 +280,8 @@ case "$MACHINE" in
>>>       "qemuarmv7") ;;
>>>       "qemux86") ;;
>>>       "qemux86-64") ;;
>>> +    "genericx86") ;;
>>> +    "genericx86-64") ;;
>>>       "qemuzynq") ;;
>>>       "akita") ;;
>>>       "spitz") ;;
>>> @@ -355,7 +357,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" =
>>> "qemuarmv6" -o "$MACHINE" = "qemuarm
>>>       fi
>>>   fi
>>>
>>> -if [ "$MACHINE" = "qemux86" ]; then
>>> +if [ "$MACHINE" = "qemux86" -o "$MACHINE" = "genericx86" ]; then
>>>       QEMU=qemu-system-i386
>>>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>>>       if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
>>> @@ -379,7 +381,7 @@ if [ "$MACHINE" = "qemux86" ]; then
>>>       KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
>>>   fi
>>>
>>> -if [ "$MACHINE" = "qemux86-64" ]; then
>>> +if [ "$MACHINE" = "qemux86-64" -o "$MACHINE" = "genericx86-64" ]; then
>>>       QEMU=qemu-system-x86_64
>>>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
>>>       if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
>>> --
>>> 1.8.3.1
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>>
>
Ross Burton - Dec. 2, 2013, 7:57 p.m.
On 2 December 2013 18:28, Saul Wold <sgw@linux.intel.com> wrote:
> I believe that this is fairly doable in the x86 space since the compiler
> setup and kernel configurations are almost identical, sound and nfs are
> missing from the generic configuration.
>
> This will also help our CI on the autobuilder since it will drop 2 machines.

This does break the neat layering and symmetry we have, in that
oe-core just supports qemu machines of every architecture we support.
Remember that genericx86 is part of meta-yocto not oe-core.

Ross

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 619ffb6..1f8199c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -108,6 +108,7 @@  while true; do
     arg=${1}
     case "$arg" in
         "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
+        "genericx86" | "genericx86-64" | \
         "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
             [ -z "$MACHINE" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -163,7 +164,8 @@  while true; do
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
             ;;
         "audio")
-            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
+            if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" -o \
+                 "x$MACHINE" = "xgenericx86" -o "x$MACHINE" = "xgenericx86-64" ]; then
                 echo "Enabling audio in qemu."
                 echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
                 QEMU_AUDIO_DRV="alsa"
@@ -224,13 +226,13 @@  fi
 
 if [ -z "$MACHINE" ]; then
     if [ "x$FSTYPE" = "xvmdk" ]; then
-        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
+        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
         if [ -z "$MACHINE" ]; then
             error "Unable to set MACHINE from vmdk filename [$VM]"
         fi
         echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
     else
-        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
+        MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|genericx86-64\|genericx86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
         if [ -z "$MACHINE" ]; then
             error "Unable to set MACHINE from kernel filename [$KERNEL]"
         fi
@@ -248,7 +250,8 @@  if [ "x$KVM_ENABLED" = "xyes" ]; then
         echo "$YOCTO_KVM_WIKI";
         exit 1;
     fi
-    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ]; then
+    if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" -o \
+         "x$MACHINE" != "xgenericx86" -a "x$MACHINE" != "xgenericx86-64" ]; then
         echo "KVM only support x86 & x86-64. Remove kvm from the command-line";
         exit 1;
     fi
@@ -265,9 +268,9 @@  if [ "x$KVM_ENABLED" = "xyes" ]; then
         exit 1;
     fi
     if [ -w /dev/kvm -a -r /dev/kvm ]; then
-        if [ "x$MACHINE" = "xqemux86" ]; then
+        if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xgeneric86" ]; then
             SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
-        elif [ "x$MACHINE" = "xqemux86-64" ]; then
+        elif [ "x$MACHINE" = "xqemux86-64" -o "x$MACHINE" = "xgeneric86-64" ]; then
             SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
         fi
         KVM_ACTIVE="yes"
@@ -292,9 +295,15 @@  machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
 QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
 QEMUX86_DEFAULT_FSTYPE=ext3
 
+GENERICX86_DEFAULT_KERNEL=bzImage-genericx86.bin
+GENERICX86_DEFAULT_FSTYPE=ext3
+
 QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
 QEMUX86_64_DEFAULT_FSTYPE=ext3
 
+GENERICX86_64_DEFAULT_KERNEL=bzImage-genericx86-64.bin
+GENERICX86_64_DEFAULT_FSTYPE=ext3
+
 QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
 QEMUARM_DEFAULT_FSTYPE=ext3
 
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 74b0c35..e7b8a82 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -41,10 +41,10 @@  if [ ! -z "$mem_set" ] ; then
   mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
 else
     case "$MACHINE" in
-        "qemux86")
+        "qemux86"|"genericx86")
             mem_size=256
             ;;
-        "qemux86-64")
+        "qemux86-64"|"genericx86-64")
             mem_size=256
             ;;
         "qemuarm")
@@ -280,6 +280,8 @@  case "$MACHINE" in
     "qemuarmv7") ;;
     "qemux86") ;;
     "qemux86-64") ;;
+    "genericx86") ;;
+    "genericx86-64") ;;
     "qemuzynq") ;;
     "akita") ;;
     "spitz") ;;
@@ -355,7 +357,7 @@  if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
     fi
 fi
 
-if [ "$MACHINE" = "qemux86" ]; then
+if [ "$MACHINE" = "qemux86" -o "$MACHINE" = "genericx86" ]; then
     QEMU=qemu-system-i386
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
     if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
@@ -379,7 +381,7 @@  if [ "$MACHINE" = "qemux86" ]; then
     KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
 fi
 
-if [ "$MACHINE" = "qemux86-64" ]; then
+if [ "$MACHINE" = "qemux86-64" -o "$MACHINE" = "genericx86-64" ]; then
     QEMU=qemu-system-x86_64
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
     if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then