On 05.12.2010, at 09:15, Avi Kivity wrote:

> Recent qemus no longer load 64-bit elf kernels.  Fix by converting
> to 32-bit elf.
> 
> Signed-off-by: Avi Kivity <[email protected]>
> ---
> config-x86-common.mak |   39 +++++++++++++++++++++------------------
> 1 files changed, 21 insertions(+), 18 deletions(-)
> 
> diff --git a/config-x86-common.mak b/config-x86-common.mak
> index b541c1c..c5508b3 100644
> --- a/config-x86-common.mak
> +++ b/config-x86-common.mak
> @@ -20,9 +20,12 @@ CFLAGS += -m$(bits)
> libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name)
> 
> FLATLIBS = lib/libcflat.a $(libgcc)
> -%.flat: %.o $(FLATLIBS) flat.lds
> +%.elf: %.o $(FLATLIBS) flat.lds
>       $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $(filter %.o, $^) 
> $(FLATLIBS)
> 
> +%.flat: %.elf
> +     objcopy -O elf32-i386 $^ $@

Not sure it's that great to call 32bit elf binaries ".flat". I'd rather expect 
a flat file when reading that file extension ;). Mind to just call it ".elf32"?

Alternatively, you could also use real flat files and shove a multiboot header 
into the binary.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to