qemu-discuss
[Top][All Lists]
Advanced

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

Re: cross-building with qemu-i386/aarch64 - SOLVED


From: Philippe Mathieu-Daudé
Subject: Re: cross-building with qemu-i386/aarch64 - SOLVED
Date: Thu, 12 Aug 2021 09:49:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/11/21 8:41 PM, Frans de Boer wrote:
> On 8/11/21 6:26 PM, Philippe Mathieu-Daudé wrote:
>> On 8/11/21 1:15 PM, Frans de Boer wrote:

>>> I have build a cross-compiler for - say - the i586 architecture,
>>> including glibc and some others. The next step would be to transfer this
>>> together with other sources to the target machine and finish the
>>> building of a bootable system.
>>> Now, suppose I have no bootable target system (yet) and want to build
>>> everything using qemu-i386 to be transferred later.
>>>
>>> However when I start:
>>>    qemu-i386 /path to i386
>>      qemu-i386 -L /path/to/i386
>>
>> You might want to also add '-cpu pentium'

> By the way, qemu-i386/aarch64 already assumes - I guess - that the
> binaries are properly coded.
> Is there a real need to add "-cpu pentium", or just a precautionary
> addition?

QEMU tries to use the best CPU possible for the binary. But since you
precised a quite old CPU ("the i586 architecture") if you want faithful
emulation of "not newer than i586" then you can restrict using this
"-cpu pentium" flag.

It would be useful if your final hardware is a i586 and you want to be
sure your compiler doesn't emit i686 opcodes that would work on QEMU
but trap on your real hardware.

Anyhow apparently you don't need to worry about it.

Regards,

Phil.



reply via email to

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