From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NkmX5-0002dx-5Q for mharc-grub-devel@gnu.org; Thu, 25 Feb 2010 17:50:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkmX3-0002ds-DV for grub-devel@gnu.org; Thu, 25 Feb 2010 17:50:09 -0500 Received: from [140.186.70.92] (port=43778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkmX1-0002di-KP for grub-devel@gnu.org; Thu, 25 Feb 2010 17:50:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkmX1-0001g2-6V for grub-devel@gnu.org; Thu, 25 Feb 2010 17:50:07 -0500 Received: from lo.gmane.org ([80.91.229.12]:34190) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkmX0-0001fw-QV for grub-devel@gnu.org; Thu, 25 Feb 2010 17:50:07 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NkmWx-0002ye-FJ for grub-devel@gnu.org; Thu, 25 Feb 2010 23:50:03 +0100 Received: from cpe-70-123-135-151.austin.res.rr.com ([70.123.135.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Feb 2010 23:50:03 +0100 Received: from anthony by cpe-70-123-135-151.austin.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Feb 2010 23:50:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: Anthony Liguori Date: Thu, 25 Feb 2010 16:43:22 -0600 Message-ID: <4B86FD0A.3080903@codemonkey.ws> References: <1266676133.2348.30.camel@x200> <4B86D25B.8040700@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpe-70-123-135-151.austin.res.rr.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 In-Reply-To: <4B86D25B.8040700@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: [PATCH] locate the qemu binary in the grub-shell test X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2010 22:50:09 -0000 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. Regards, Anthony Liguori >> Furthermore, an >> appropriate error should be thrown if neither executable is found. >> >> 2010-02-20 Dustin Kirkland >> >> * tests/util/grub-shell.in: locate the appropriate qemu system >> binary, and exit non-zero, with an error message, if none are >> found >> >> diff -Nur -x '*.orig' -x '*~' lucid/tests/util/grub-shell.in lucid.new/tests/util/grub-shell.in >> --- lucid/tests/util/grub-shell.in 2010-02-20 07:58:35.062756000 -0600 >> +++ lucid.new/tests/util/grub-shell.in 2010-02-20 08:22:07.797858157 -0600 >> @@ -92,6 +92,18 @@ >> esac >> done >> >> +qemu= >> +for i in qemu-system-i386 qemu-system-x86_64; do >> + if which ${i}>/dev/null; then >> + qemu=${i} >> + break >> + fi >> +done >> +if [ "x${qemu}" = x ]; then >> + echo "qemu is not installed" 1>&2 >> + exit 1 >> +fi >> + >> if [ "x${source}" = x ] ; then >> tmpfile=`mktemp` >> while read; do >> @@ -135,8 +147,7 @@ >> cp ${isofile} ${fdafile} >> >> outfile=`mktemp` >> -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@gnu.org >> http://lists.gnu.org/mailman/listinfo/grub-devel >> > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel