|
From: | KONRAD Frédéric |
Subject: | Re: [Qemu-devel] Cross-compiling QEMU for ARM |
Date: | Mon, 11 Mar 2013 09:54:42 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 10/03/2013 17:28, Leonid Bloch wrote:
On Sun, Mar 10, 2013 at 4:59 PM, Peter Maydell <address@hidden> wrote:On 10 March 2013 14:36, Leonid Bloch <address@hidden> wrote:I want to cross compile QEMU itself to run on ARM, but all my searches lead me to tutorials for cross compiling other programs for ARM and testing them with QEMU, which is not what I need. The only relevant link I found was this: http://lists.gnu.org/archive/html/qemu-devel/2011-05/msg00099.html But this doesn't work for me as well. I am using Buildroot as my toolchain, and the farthest I got was: $ ./configure --cpu=armv7hl --static --cc=arm-linux-ccDon't specify --cpu : this is almost always going to break things, and you should just let configure work it out based on your compiler. Don't just specify --cc, because we want to run other cross tools too. Instead, use --cross-prefix=arm-linux-gnueabi- (or whatever the correct prefix is for your toolchain).Tried that at first, but then getting an error: Error: pkg-config binary 'arm-linux-pkg-config' not found
I compiled qemu for ARM with buildroot: - You have to install pkg-config for your buildroot toolchain. - fdt, glib, zlib... Some of them are really tricky to cross-compile, if I remember right. Which buildroot version are you using? Fred
You'll also need to have a cross-build environment with the minimal set of libraries/includes that QEMU needs to build, including but not limited to zlib and glib. How to set this up depends on what your cross compilation setup is; in this case you'll need to ask the buildroot folks. Question for the qemu-devel folks: does anybody have a situation where they genuinely need to pass --cpu to configure (ie the autodetection is wrong or insufficient)? [configure does mention one case, which is when cross-compiling to x86 Darwin and SunOS, but the latter at least is busted anyway because later on we do things based on SunOS uname results which there is no way to override for the cross-compile case.] I'm tempted to suggest we should drop --cpu entirely... -- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |