uClinux Toolchain
To cross compile uClinux for the blackfin board, the Blackfin uClinux toolchain must be installed on the development machine. For detailed instructions, read the blackfin.uclinux wiki on installing the toolchain. The toolchain version in the LCOGT repository matches the uClinux version we build. If you build and different version of uClinux, you may need a different toolchain version. Be sure to add the toolchain bin/ directories to your PATH environment variable.
Your development machine needs the following packages (list from blackfin.uclinux wiki)
-
binutils
-
gcc
-
glibc development files
-
ncurses
-
zlib
-
texinfo
-
QT
-
host side kernel source
After the toolchain is installed, you should be able to build uClinux for the blackfin. The result is a uImage file that is a compressed uClinux image. This is transferred to the blackfin and booted by a bootloader, usually u-boot.
bfloader/flashload
bfloader is the utitlity to transfer u-boot into the flash ROM on the blackfin device. A JTAG adapter is required to connect to the device. We use Section5's ICEbear JTAG Adapter. bfloader requires a board-specific configuration file. For the CM-BF537E, we use the supplied bfloader.dxe found under boards/tinyboards/ in the bfloader directory. The following command is used to flash u-boot onto the board:
sudo ./flashload --backend=./boards/tinyboards/bfloader.dxe --erasesec=0,2 --program=/home/bburleson/Projects/blackfin/u-boot/u-boot.bin
sudo - required to access JTAG hardware via USB
./flashload - the bfloader executable (in current directory)
--backend - board-specific flash configuration
--erasesec - erase two flash sectors starting at sector zero (this must be done when writing flash)
--program - the file to be written to flash
U-boot
Things to Customize for Each Build
- u-boot/include/configs/cm-bf537e.h
- CONIFG_ETHADDR (board MAC address - should be unique)
- u-boot/include/configs/bfin_adi_common.h
- imagename (uImage name to download from TFTP server)
- Network Settings
- CONFIG_IPADDR (IP Address of device)
- CONFIG_NETMASK (Network mask - normally 255.255.255.0, at SBA 255.255.252.0)
- CONFIG_GATEWAYIP (IP Address of network gateway)
- CONFIG_SERVERIP (IP Address of TFTP uImage server)
USB Console
Settings (hyperterm, minicom, etc.)
115200 8N1 No flow control
Subversion Repositories
http://intranet.lco.gtn/viewcvs/blackfin/?root=telsoft
toolchain
bfloader/flashload
u-boot
uClinux