2010-07-04 07:08:12     What does the toolchain contain? Modifying x86 Makefile?

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-07-04 07:08:12     What does the toolchain contain? Modifying x86 Makefile?

Gilles Ganault (FRANCE)

Message: 90876   

 

Hello

 

While learning how to port x86 Linux applications to Blackfin uClinux, I have a couple of questions:

 

1. What does the toolchain really contain? A different GCC, or just libraries that match the OS (uClinux) and hardward (Blackfin CPU)? How does it different from the development packages installed on x86 Linux?

 

2. Based on a simple "Hello, world" Makefile, how does it differ between x86 Linux and Blackinf uClinux? Is there a good document somewhere that explains the differences, the available options, etc.?

 

Thank you.

QuoteReplyEditDelete

 

 

2010-07-04 13:23:39     Re: What does the toolchain contain? Modifying x86 Makefile?

Mike Frysinger (UNITED STATES)

Message: 90879   

 

it contains no 3rd party libraries.  it is only the normal toolchain -- compiler/C library/debugger/linker/assembler and such.

 

use the common gcc optimization options.  otherwise, we have a wiki you should be searching:

http://docs.blackfin.uclinux.org/doku.php?id=making_the_blackfin_perform

http://docs.blackfin.uclinux.org/doku.php?id=optimization

etc...

QuoteReplyEditDelete

 

 

2010-07-05 10:03:05     Re: What does the toolchain contain? Modifying x86 Makefile?

Gilles Ganault (FRANCE)

Message: 90913   

 

Mike > it contains no 3rd party libraries.  it is only the normal toolchain -- compiler/C library/debugger/linker/assembler and such.

 

use the common gcc optimization options.  otherwise, we have a wiki you should be searching:

http://docs.blackfin.uclinux.org/doku.php?id=making_the_blackfin_perform

http://docs.blackfin.uclinux.org/doku.php?id=optimization

etc...

 

---

 

Thanks Mike for the infos.

 

 

I just finished reading "Embedded Linux Primer" (especially Chapter 12: "Embedded Development Environment"), and cross-compiling makes a bit more sense now.

 

Out of curiosity, is there such a thing as a Linux x86 live CD that would contain everything that is required to compile x86 source code into Blackfin uClinux binaries, so that the user can just boot from a CD without having to install anything on their workstation and be confident that there won't be issues mixing tools/libraries between the workstation host and the target host?

 

 

For those interested in the same topic, this is what I learned:

 

1. To compile Linux x86 code for the Blackfin CPU, you need to install a toolchain, ie. the set of tools listed above. There are just different versions of the development tools probably already installed on your Linux workstation, but aimed at creating binaries for the Blackfin + uClinux platform instead of x86 + Linux.

 

The minimum toolchain consists in two tarballs:

 

 

 

- blackfin-toolchain-09r1.1-2.i386.tar.bz2

 

- blackfin-toolchain-uclibc-default-09r1.1-2.i386.tar.bz2

 

Once untarred, the toolchain comes in two versions: /opt/bfin-uclinux/ (to compile sources as FLAT files) and /opt/bfin-linux-uclibc/ (to compile as FDPIC ELF files). To learn how FLAT and FDPIC ELF differ, read UClinux Shared Library.

 

 

 

3. The paths to the directories where each compiler looks for Include files are hard-coded in the binary, and can be displayed by running the "-v" option:

 

bfin-linux-uclibc-cpp -v

bfin-uclinux-cpp -v

 

Thank you.

QuoteReplyEditDelete

 

 

2010-07-05 15:02:48     Re: What does the toolchain contain? Modifying x86 Makefile?

Mike Frysinger (UNITED STATES)

Message: 90926   

 

there is a livecd in development; not sure where it ended up though

QuoteReplyEditDelete

 

 

2010-07-05 15:20:42     Re: What does the toolchain contain? Modifying x86 Makefile?

Robin Getz (UNITED STATES)

Message: 90927   

 

Mike:

 

The LiveCD works well - I was just waiting for Ubuntu 10.x to become a little more stable before I updated the liveDVD.

 

http://docs.blackfin.uclinux.org/doku.php?id=live_cd:intro

 

-Robin

QuoteReplyEditDelete

 

 

2010-07-05 15:27:06     Re: What does the toolchain contain? Modifying x86 Makefile?

Mike Frysinger (UNITED STATES)

Message: 90928   

 

but the scripts to make it havent been checked into the stamp project ?

QuoteReplyEditDelete

 

 

2010-07-06 09:44:45     Re: What does the toolchain contain? Modifying x86 Makefile?

Gilles Ganault (FRANCE)

Message: 90960   

 

Robin > The LiveCD works well - I was just waiting for Ubuntu 10.x to become a little more stable before I updated the liveDVD.

 

---

 

Thanks Robin for the tip. I'll keep an eye on the live CD version of the toolchain.

Attachments

    Outcomes