[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] locate the qemu binary in the grub-shell test

From: Anthony Liguori
Subject: Re: [PATCH] locate the qemu binary in the grub-shell test
Date: Thu, 25 Feb 2010 16:43:22 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 02/25/2010 01:41 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
Dustin Kirkland wrote:
The grub-shell test assumes that qemu-system-i386 will be the binary
used, and that it's available on the system.  Actually, on amd64/x86_64
systems, the appropriate binary is qemu-system-x86_64.
Currently grub-shell supports only i386-pc target and the right qemu
architecture to test it with is system-i386. qemu-system-x86_64 is
appropriate only for amd64-specific tests (you can have a look at my
bootchecks branch). Architecture of build has nothing to do with
architecture of target: you can very well cross-compile for i386-pc from
mips. It's not any different than cross-compiling to i386-pc from x86_64
(the only difference is that you use biarch compiler)

Actually, there is no qemu-system-i386 (it's just qemu). But 'qemu-system-x86_64 -cpu qemu32' is absolutely identical to 'qemu' as far as the guest is concerned.

The proper thing to do would be to try 'qemu qemu-system-i386 qemu-system-x86_64' and for the last one, append a -cpu qemu32.


Anthony Liguori

Furthermore, an
appropriate error should be thrown if neither executable is found.

2010-02-20  Dustin Kirkland<address@hidden>

         * tests/util/ locate the appropriate qemu system
           binary, and exit non-zero, with an error message, if none are

diff -Nur -x '*.orig' -x '*~' lucid/tests/util/
--- lucid/tests/util/      2010-02-20 07:58:35.062756000 -0600
+++  2010-02-20 08:22:07.797858157 -0600
@@ -92,6 +92,18 @@

+for i in qemu-system-i386 qemu-system-x86_64; do
+    if which ${i}>/dev/null; then
+       qemu=${i}
+       break
+    fi
+if [ "x${qemu}" = x ]; then
+    echo "qemu is not installed" 1>&2
+    exit 1
  if [ "x${source}" = x ] ; then
      while read; do
@@ -135,8 +147,7 @@
  cp ${isofile} ${fdafile}

-qemu-system-i386 ${qemuopts} -nographic -serial stdio -hda ${hdafile} -fda ${fdafile} 
-cdrom ${isofile} -boot ${bootdev} | tr -d "\r">${outfile}
+${qemu} ${qemuopts} -nographic -serial stdio -hda ${hdafile} -fda ${fdafile} -cdrom 
${isofile} -boot ${bootdev} | tr -d "\r">${outfile}
  cat $outfile

  rm -f ${tmpfile} ${outfile} ${cfgfile} ${isofile} ${hdafile} ${fdafile}


Grub-devel mailing list

Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]