Question

I want to copile a simple c program ("Hello world") for my Xtreamer prodigy. which runs a basic linux kernel:

/host # uname -a
Linux Prodigy 2.6.34-VENUS #30 PREEMPT Tue Feb 28 13:48:27 CST 2012 mips GNU/Linux

(it using chipset Realtek 1186)

I saw one executable file on the streamer and i "filed" it on linux and i got:

sh-4.1# file DvdPlayer 
DvdPlayer: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, stripped

On my computer I run linux centos. what compiler do I need to use and when can I get it?

Thanks!

Was it helpful?

Solution

What you need is a cross toolchain - gcc has a architecture that enables it to have different code generation backends, mainly to be able to compile for other architectures than the one you're developing on.

Lots of precompiled cross toolchains exist, an overview of ready to use toolchains for MIPS can be found here.

On the other hand, creating your own cross tool chain, finetuned to your needs, isn't that hard either, it's just quite a bit of work. The canonical reference on how to generate a cross toolchain is Dan Kegel's page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top