From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXnK7-0005pd-R5 for qemu-devel@nongnu.org; Sun, 02 Aug 2009 22:30:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXnK2-0005oI-Bd for qemu-devel@nongnu.org; Sun, 02 Aug 2009 22:30:50 -0400 Received: from [199.232.76.173] (port=55688 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXnK2-0005oD-62 for qemu-devel@nongnu.org; Sun, 02 Aug 2009 22:30:46 -0400 Received: from qw-out-1920.google.com ([74.125.92.150]:52178) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXnK1-0006sj-Sj for qemu-devel@nongnu.org; Sun, 02 Aug 2009 22:30:46 -0400 Received: by qw-out-1920.google.com with SMTP id 5so1458689qwc.4 for ; Sun, 02 Aug 2009 19:30:45 -0700 (PDT) Message-ID: <4A764BD3.1070003@codemonkey.ws> Date: Sun, 02 Aug 2009 21:30:43 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix checksum writing in signboot.sh References: <1249120111-31757-1-git-send-email-agraf@suse.de> <4A756491.6020004@redhat.com> <5b31733c0908020325k3e035b91n3b0089a2f865de3@mail.gmail.com> <4A757569.9010309@redhat.com> <60A4FD72-56B3-4670-BB82-1CE1878467CA@suse.de> In-Reply-To: <60A4FD72-56B3-4670-BB82-1CE1878467CA@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Paolo Bonzini , Glauber Costa , "qemu-devel@nongnu.org" , Filip Navara , Jan Ondrej , Avi Kivity Alexander Graf wrote: > > On 02.08.2009, at 13:15, Avi Kivity wrote: > >> On 08/02/2009 01:25 PM, Filip Navara wrote: >>>> While the patch is good, the code is unreadable. Can we mandate >>>> python for >>>> such tricks? >>>> >>> >>> No, please, no! Throwing additional tools at the problem is only going >>> to make it worse for Windows users. I'm not happy with using sh script >>> as it already added dependency on coreutils, but at least that's easy >>> to install. Python is a nightmare compared to that. >>> >> >> Is Python really so difficult to install under Windows? How many >> times do you have to click 'Next'? >> >> Note that Windows users can usually use prebuilt binaries, so the >> 'Next' nightmare only affects a small number of Windows developers. >> >>> BTW, for years in ReactOS we had a way to build host tools with host >>> CC and these tools were written in plain ordinary C. This worked great >>> for both Windows and Linux builds and also for cross-compiling. >>> >> >> But then you have to write those tools in C, which is annoying. > > Right. In fact we just switched from C to sh for portability reasons. The problem is with cross compilers. Our build system is based around a single tool chain and we only do feature probing, sanity checking, cflags modifications, etc. on the target tool chain. If we build and run a C program using the host compiler (which is needed in order to be able to run the program), things get complicated quickly. sh is preferred because it's a minimal dependency. I would be concerned about perl or python for the main build because those tools aren't available by default for windows. For something like a rom where we ship a default binary, as long as we detected the appropriate tools and disabled the build, I think it would be more reasonable. > I really think we should just make the current code work as is and be > done. The script is pretty small and really readable IMHO. We're going to have to revisit this for pc-bios since it depends on perl and it has a similar rom signing tool (biossums). It's far more sophisticated though and it's currently implemented in C. It may make sense to rewrite that tool in python/perl and have a single tool used for all of our roms. We don't need to do this now though. Regards, Anthony Liguori