> No dia 11/11/2018, às 20:21, Ciro Santilli <[email protected]> escreveu:
> 
> On Sun, Nov 11, 2018 at 7:54 PM João Miguel Morgado Pereira Vieira
> <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>> 
>> 
>> No dia 11/11/2018, às 19:42, Ciro Santilli <[email protected]> 
>> escreveu:
>> 
>> On Sun, Nov 11, 2018 at 7:32 PM João Miguel Morgado Pereira Vieira
>> <[email protected]> wrote:
>> 
>> 
>> Dear Thawra,
>> 
>> I have been working with gem5 and the ARM ISA for some time. I have to tell 
>> you that setting up a cross compiler for ARM using SE mode is a tremendous 
>> pain, since even when everything compiles correctly, you may still have 
>> problems with system calls (some of them are not implemented in SE mode), or 
>> the common error “Fatal: kernel is too old”.
>> 
>> 
>> Note that this problem has been solved on recent gem5 versions as
>> explained on the Stack Overflow answer I linked to earlier:
>> https://stackoverflow.com/questions/53085048/how-to-compile-and-run-an-executable-in-gem5-syscall-emulation-mode-with-se-py/53085049#53085049
>> 
>> 
>> Solved? I don’t think so. This obligates users either to implement system 
>> calls that are not implemented in SE mode or to transform them into 
>> warnings. Besides, the cross compiler I suggested works perfectly, since it 
>> is conceived to compile applications to run in bare-metal systems. It costs 
>> nothing but the installation of a toolkit. Simpler, don’t you think?
>> 
> 
> Yes as you say, the error was "bypassed", since fully implementing all
> system calls is very hard.
> 
> But if a program needs a system call, I don't see an alternative to
> actually implementing it and merging back.
> 
> Does such baremetal allow doing system calls? Is that compiler fully
> open source and does Vivado document exactly how they've built it?

Well, I don’t think that doing system calls in bare-metal systems makes any 
sense, does it? My guess is that they are not implemented at all.

The cross-compiler that ships with Vivado (arm-linux-gnueabihf-gcc) is based on 
gcc (so it is probably open source). My guess is that it belongs to some legacy 
toolkit, so luckily it works for gem5. In order to use it, you don’t even have 
to activate Vivado. My point is: it works out of the box; it doesn’t give you 
any pain, and so far I compiled fairly complex programs and ran them in gem5 
without any issue. 

> 
>> 
>> The Ubuntu toolchain just works out of thee box now, and likely the
>> Fedora one would likely also work if we were able to use it in the
>> fist place.
>> 
>> 
>> Well, judging by the fact that CentOS’ doesn’t, I doubt it...
>> 
>> 
>> However, I succeeded setting up a cross compiler for running a system 
>> featuring an ARM in SE mode using gem5. You can find the instructions here: 
>> http://web.tecnico.ulisboa.pt/~joaomiguelvieira/thesis/doku.php?id=setup_arm_cross-compiler_for_gem5
>> 
>> I hope this helps!
>> 
>> Kind regards,
>> João Vieira
>> 
>> No dia 11/11/2018, às 14:12, Thawra Kadeed <[email protected]> 
>> escreveu:
>> 
>> Thawra
>> 
>> 
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>> 
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>> 
>> 
>> Kind regards,
>> João Vieira
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> _______________________________________________
> gem5-users mailing list
> [email protected] <mailto:[email protected]>
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users 
> <http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
Kind regards,
João Vieira

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to