runqemu: Extend to support genericx86* machine types
PATCH 1/1 runqemu: Extend to support genericx86* machine types
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]
--- scripts/runqemu | 21 +++++++++++++++------ scripts/runqemu-internal | 10 ++++++---- 2 files changed, 21 insertions(+), 10 deletions(-)
scripts/runqemu +15 -6
@@ -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
scripts/runqemu-internal +6 -4
@@ -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
Signature · 1 line
1.8.3.1
Quoted 4 lines · Saul Wold
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
Quoted 136 lines
[YOCTO #5105]
Signed-off-by Saul Wold <[email protected]>--- scripts/runqemu | 21 +++++++++++++++------ scripts/runqemu-internal | 10 ++++++---- 2 files changed, 21 insertions(+), 10 deletions(-)scripts/runqemu +15
-6@@ -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=ext3scripts/runqemu-internal +6
-5@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 6 lines · Bruce Ashfield
Quoted 4 lines · Saul Wold
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.
Quoted 9 lines
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.
Quoted 4 lines
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!
Quoted 143 lines
Cheers,
Bruce
Quoted 136 lines
[YOCTO #5105]
Signed-off-by Saul Wold <[email protected]>--- scripts/runqemu | 21 +++++++++++++++------ scripts/runqemu-internal | 10 ++++++---- 2 files changed, 21 insertions(+), 10 deletions(-)scripts/runqemu +15
-6@@ -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=ext3scripts/runqemu-internal +6
-5@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 37 lines · Saul Wold
Quoted 16 lines · Bruce Ashfield
Quoted 8 lines · Saul Wold
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.Quoted 8 lines
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.
Quoted 5 lines
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.
Quoted 5 lines
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
Quoted 167 lines
Sau!
Quoted 162 lines
Cheers,
Bruce
Quoted 154 lines
[YOCTO #5105]
Signed-off-by Saul Wold <[email protected]>--- scripts/runqemu | 21 +++++++++++++++------ scripts/runqemu-internal | 10 ++++++---- 2 files changed, 21 insertions(+), 10 deletions(-)scripts/runqemu +1
-0@@ -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]"scripts/runqemu +0
-1@@ -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
scripts/runqemu +2
-1+ 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 installsnd_intel8x0orsnd_ens1370driver
in linux guest."
QEMU_AUDIO_DRV="alsa"scripts/runqemu +0
-1@@ -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]"
fiscripts/runqemu +0
-1@@ -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
scripts/runqemu +2
-0+ 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 thecommand-line"; exit 1; fiscripts/runqemu +1
-1@@ -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"scripts/runqemu +1
-1- 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"scripts/runqemu +0
-0@@ -292,9 +295,15 @@ machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed's/-/_/'`
QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
QEMUX86_DEFAULT_FSTYPE=ext3scripts/runqemu +6
-0+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=ext3scripts/runqemu-internal +4
-2@@ -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
fiscripts/runqemu-internal +2
-3-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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 5 lines · Saul Wold
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