Text Export ODT Export
 

Developing with Blackfin Live Sources

You should check out the SVN Primer and the BuildScript documents first. This document will assume you have.

Trunk or live sources for Bootloaders, the uClinux-dist and the Linux kernel sometimes require a trunk Toolchain, If you want to know why - check the faq

Setting up the development tree

We will be doing all our development in one directory in our home folder, blackfin-sources. This location is arbitrary, so you may of course locate/name this wherever you wish.

First create the proper directory structure.

$ mkdir ~/blackfin-sources
$ cd ~/blackfin-sources

Obtaining the source

Check out the source trees.

There are two places to get the source from:

  1. branches (stable tested releases)
  2. trunk (currently under development, new features, and new bugs)

To determine what you need, (branch or trunk), either ask on the forums, or check out the development/release processes. Normally - unless you need a new feature - everyone should be using a branch for product development/deployment.

To understand the branches that exist, look at the various projects:

Or, use the svn ls command.

rgetz@pinky:~> svn ls svn://blackfin.uclinux.org/toolchain/branches
GCC_DIST/
GDB/
GNU_DIST/
RRAP_DIST/
jiez-jtag-gdb-merge-branch/
jul05-branch/
mini-test-branch/
toolchain-04r1-branch/
toolchain-04r1-branch2/
toolchain_06r1_branch/
toolchain_06r2_branch/
toolchain_07r1_branch/
toolchain_08r1_branch/
toolchain_09r1_branch/

To determine what you should do, check out the svn firewall info.

While these examples are taking from trunk, you can replace the word trunk with branches/2008R1, or whatever the branch name you are trying to check out is. To find a list of branches, either look in the links provided above.

  • For direct connection, where port 3690 is not blocked:
    $ cd ~/blackfin-sources
    $ svn checkout svn://blackfin.uclinux.org/toolchain/trunk toolchain
    $ svn checkout svn://blackfin.uclinux.org/u-boot/trunk u-boot
    $ svn checkout svn://blackfin.uclinux.org/uclinux-dist/trunk uclinux-dist
    
  • If you are checking things out behind a firewall, or where port 3690 is blocked:
    $ cd ~/blackfin-sources
    $ svn checkout svn://firewall-sources.blackfin.uclinux.org:80/toolchain/trunk toolchain
    $ svn checkout svn://firewall-sources.blackfin.uclinux.org:80/svn/u-boot/trunk u-boot
    $ svn checkout --ignore-externals svn://firewall-sources.blackfin.uclinux.org:80/uclinux-dist/trunk uclinux-dist
    $ svn checkout svn://firewall-sources.blackfin.uclinux.org:80/linux-kernel/trunk uclinux-dist/linux-2.6.x
    

Note that this initial checkout will probably take quite some time.

Build the toolchain

Before building toolchain, check the host for necessary tools. Please install if missing.

$ ~/blackfin-sources/toolchain/buildscript/BuildToolChain -p

Compile the toolchain using the sources.

$ mkdir ~/blackfin-sources/build
$ ~/blackfin-sources/toolchain/buildscript/BuildToolChain \
     -b ~/blackfin-sources/build \
     -k ~/blackfin-sources/uclinux-dist/linux-2.6.x \
     -s ~/blackfin-sources/toolchain \
     -u ~/blackfin-sources/u-boot

Setting your PATH

Now that you have this new toolchain, you need to make sure it's in your path.

$ export PATH=~/blackfin-sources/build/bfin-elf/bin:~/blackfin-sources/build/bfin-uclinux/bin:~/blackfin-sources/build/bfin-linux-uclibc/bin:${PATH}

$ bfin-elf-gcc --version
bfin-elf-gcc (GCC) 4.1.2 (ADI svn)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ bfin-uclinux-gcc --version
bfin-uclinux-gcc (GCC) 4.1.2 (ADI svn)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ bfin-linux-uclibc-gcc --version
bfin-linux-uclibc-gcc (GCC) 4.1.2 (ADI svn)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Build U-Boot

Working in the u-boot source is the same as any release. Just use the directory ~/blackfin-sources/u-boot/u-boot-VER/ (where the exact VER changes over time) and follow the directions in the compiling page.

Build the uClinux distribution and kernel

Working in the kernel source is the same as any release. Just use the directory ~/blackfin-sources/uclinux-dist/ and follow the directions in the compiling the kernel page.

Updating to latest versions

Since your source tree will slowly become out of date as developers check in changes, you will need to update your local checkouts at some point. It is much faster to simply update your existing source tree rather than trying to pull a fresh checkout.

$ cd ~/blackfin-sources/toolchain
$ svn up
$ cd ~/blackfin-sources/u-boot
$ svn up
$ cd ~/blackfin-sources/uclinux-dist
$ svn up
 
developing_with_blackfin_live_sources.txt · Last modified: 2009/10/14 21:30 by vapier