[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct(
From: |
Chen Gang S |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other |
Date: |
Thu, 05 Feb 2015 07:03:35 +0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 1/29/15 09:37, Chen Gang S wrote:
> On 1/29/15 06:36, Peter Maydell wrote:
>> On 28 January 2015 at 22:09, Chen Gang S <address@hidden> wrote:
>>> - Is what I said above really correct (e.g. is linux-user really mainly
>>> for cpu emulation)?.
>>
>> Not really. linux-user is mainly for running single Linux binaries.
>> It has a secondary use for running gcc test binaries which think
>> they are "bare metal" but actually use some kind of semihosting API.
>> (You should check whether tile has one of those.)
>>
>> As well as linux-user mode, QEMU has system emulation mode, where
>> we emulate a complete machine.
>>
>> Both modes need CPU emulation.
>>
>
> OK, thanks.
>
> For coding and test, is linux-user a good starting position for me? (I
> guess it is).
>
At present, I make a static program which will print "Hello world" for
microblaze architecture, and can excute successfully.
address@hidden qemu]# cat test.c
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
address@hidden qemu]# /upstream/release/bin/microblaze-gchen-linux-gcc -Wall
-O2 -static -o test.mb test.c
address@hidden qemu]# file ./test.mb
./test.mb: ELF 32-bit MSB executable, Xilinx MicroBlaze 32-bit RISC, version
1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped
address@hidden qemu]# ls -l ./test.mb
-rwxr-xr-x. 1 root root 3224540 Feb 5 06:39 ./test.mb
address@hidden qemu]# ./microblaze-linux-user/qemu-microblaze ./test.mb
Hello world!
And I also generate tile "Hello world" static program:
address@hidden qemu]# /upstream/release-tile/bin/tilegx-gchen-linux-gcc -Wall
-O2 -static -o test.tgx test.c
address@hidden qemu]# file ./test.tgx
./test.tgx: ELF 64-bit LSB executable, Tilera TILE-Gx, version 1 (SYSV),
statically linked, for GNU/Linux 2.6.32, not stripped
address@hidden qemu]# ls -l ./test.tgx
-rwxr-xr-x. 1 root root 3611376 Feb 5 06:42 ./test.tgx
I shall try to let tile "Hello world" static program run successfully
within this month:
- 1st patch: can run an empty elf64 tile executable in linux-user.
(try to finish within 2015-02-15).
- 2nd patch: can run "Hello world" elf64 tile program in linux-user.
(try to finish within 2015-02-25, it seems hard to finish in time).
- 3rd patch: for completion, or fixing issues, or documentations.
(try to finish within 2015-02-28).
Welcome any ideas, suggestions, and completions.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other,
Chen Gang S <=