Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Converting binary file to elf

Altera_Forum
Honored Contributor II
1,252 Views

Hi,  

 

Lets say I wanna covert my grep binary that I have on my linux system to elf format so I can execute it on uclinux, whats the process in doing that? 

 

I tried: 

nios2-elf-objcopy -I binary -O elf32-littlenios2 /path/to/grep /path/to/output 

 

but the resulting elf does not work on uclinux.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
484 Views

By your linux system, I assume you mean your computer's system. 

 

Can't do that mate: the binaries on your computer's system only run on x86 processors, they won't run on NIOS or any other kind of processor. 

 

You need to cross-compile your software targeting uCLinux on NIOS.
0 Kudos
Altera_Forum
Honored Contributor II
484 Views

I am looking in the /uClinux-dist/user dir and I cannot locate gawk, awk, or nawk. Is there a tutorial that shows how to cross compile from source? 

 

Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
484 Views

Bump. Anyone?

0 Kudos
Reply