Developing with Blackfin Live Sources You should check out the SVN Primer, GIT Primer and the BuildScript documents first. This document will assume you have. Trunk or live sources for Bootloaders, the Linux distrubiton and the Linux kernel sometimes require a trunk Toolchain, If you want to know why - check thefaq 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: branches (stable tested releases) trunk (currently under development, new features, and new bugs) To determine what you need, (branch or trunk), eitheraskon the forums, or check out thedevelopment/releaseprocesses. 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: Toolchain U-Boot Linux kernel uClinux distribution Buildroot distribution Or, use the svn ls command.rgetz@pinky:~>svn ls svn://blackfin.uclinux.org/toolchain/branchesGCC_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 wordtrunkwithbranches/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$git clone git://git.code.sf.net/p/adi-toolchain/blackfin toolchain$git clone git://git.code.sf.net/p/adi-u-boot/code u-boot* the uclinux sources are no longer available $svn checkout svn://blackfin.uclinux.org/uclinux-dist/trunk uclinux-dist$git clone git://git.code.sf.net/p/adi-linux/code uclinux-dist/linux-2.6.x$git clone git://git.code.sf.net/p/adi-buildroot/code buildroot$git clone git://git.code.sf.net/p/adi-linux/code buildroot/linux/linux-kernel If you are checking things out behind a firewall, or where port 3690 is blocked:$cd ~/blackfin-sources$git clone http://git.code.sf.net/p/adi-toolchain/blackfin toolchain$git clone http://git.code.sf.net/p/adi-u-boot/code u-boot* the uclinux sources are no longer available $svn checkout --ignore-externals svn://firewall-sources.blackfin.uclinux.org:80/uclinux-dist/trunk uclinux-dist$git clone http://git.code.sf.net/p/adi-linux/code uclinux-dist/linux-2.6.x$git clone http://git.code.sf.net/p/adi-buildroot/code buildroot$git clone http://git.code.sf.net/p/adi-linux/code buildroot/linux/linux-kernel 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/buildroot/linux/linux-kernel \ -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 To configure uClinux distribution. Run “make menuconfig” in your uClinux-dist root folder. You can customize board type, binary format, libraries and applications before doing “make”. 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. Build the Buildroot distribution and kernel To configure Buildroot distribution. Run “make board_config” and “make menuconfig” in your Buildroot root folder. You can customize board type, binary format, libraries and applications before doing “make”. You can also customize busybox by run “make busybox-menuconfig”. Then, to configure the kernel source run “make linux-menuconfig” 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 $ git pull origin $ cd ~/blackfin-sources/uclinux-dist $ svn up $ cd ~/blackfin-sources/uclinux-dist/linux-2.6.x $ git pull origin $ cd ~/blackfin-sources/buildroot $ git pull origin $ cd ~/blackfin-sources/buildroot/linux/linux-kernel/ $ git stash save $ git pull origin $ git stash pop