world leader in high performance signal processing
Trace: » 2005r3

Release Notes for uClinux for Blackfin Version 2005R3

Version: 2005R3

Date: Sep 30, 2005

Development Environments

Tool Chain: Toolchain Release 2005R3

u-boot: uboot_1.1.3 Release 2005R3

Host platform: Suse Linux 9.2

Target board: STAMP Board

Note: However other similar host platforms are also supported. But currently they are not tested


Source files


Linux ELF file


Compressed Linux image


This document


Compressed archive of test results


Summary of test results


Fixes in release 2005R3


  1. Fix the wrong definition of NR_IRQS in the case IRQCHIP_DEMUX_GPIO used.
  2. Add Blackfin 537 specific boot code and default configurations into bf537 architecture dependant folders. Enable kernel to boot to console on bf537.
  3. Correct code to dynamically generated CPLB tables.
    • don't encode page size in the page descriptor definitions;
    • removed meaningless caching for SRAM pages;
    • L1_IMEMORY CPLB added to ipdt;
    • DCACHE mode is printed out at the startup and proc/cpuinfo.
  4. readX resp. inX and insX are used to access memory mapped devices. On the Blackfin architecture, ongoing reads form external memory can be interrupted anywhere during execution, and reissued later again. This can cause trouble in case the read is destructive. Therefore all reads must be made non-interruptible.
  5. Cleans up the interrupt path for the Core Timer and Non Maskable Interrupt. For these dedicated interrupt vectors it is not necessary to call do_irq. We can call asm_do_IRQ directly.
  6. Two subsequent calls to gettimeofday() may show time going backward. Core timer warp is now handled more properly. Calculate more accurate getttimeoffset - free of integer division rounding errors.
  7. Remove the core timer interrupt from the irqchip framework. The interrupt service routine is now called directly from Interrupt.S. Downside BFIN Timer Ticks are not longer counted in /proc/interrupts.
  8. Port simple DMA driver to BF537/6/4 - split DMA include files into arch dependent and independent sections.
  9. Enable kernel to boot from a JFFS2 root file system by returning correct metadata in the flash driver.
  10. Add a rule in Makefile to make JFFS2 image. Use the mkfs.jffs2 tool in user application folder.
  11. Rewrite the blackfin DMA based UART dirver to support more than one ports.
    • The default UART port is ttyS0. User can change it in the kernel boot parameter line.
    • More than one UART ports can be opened concurrently, this dirver can deal with each port individually.
    • Fix a bug which cause system hang if you enter Ctrl+C when output a bunch of data on the console.
    • Merge xmit timer and recv timer into one dma timer.
    • Enable DMA channel for UART1 for blackfin 537 in simple DMA driver.
  12. Update the uClibc code in the root distribution folder to version 0.9.27. Update all user application to the latest testing version in uClinux distribution.
  13. Update kernel from 2.6.8 to 2.6.12.
  14. Replace all kinds of Xsync functions in kernel with gcc builtin Xsync functions, which walk around a hardware bug in blackfin53x chip.
  15. Inplement testandset operation by kernel exception handler. The semantics of the TESTSET instruction cannot be guaranteed. We cannot easily move all locks used by linux kernel to non-cacheable memory. EXCPT 0x4 is used to trap into kernel to do the atomic testandset.
  16. Enable kernel module support. Add gcc flag -mlong-call into kernel Makefile to build kernel modules. With this flag, kernel modules can be inserted into kernel and run correctly on blackfin.
  17. Remove hard-coded Data Cache initialization (Enable both A and B data caches). Cleanup BF537 proc/cpuinfo and startup messages. Fix BF537/6/4 Memory Layout.
  18. Enable the adi1836 audio device to record and play individual streams concurrently.
    • Descriptor based DMA is used in this solution.
    • Always enable DMA and SPORT in the audio driver in order to avoid breaks in one audio stream while the other is opened or closed.
    • Allocate the dummy buffer in L1 data sram instead of in the external sdram to reduce the utility rate to the system bus.
    • Move some DMA operating code from adi1836.c to file bf53x_sport.c
  19. Enable user to control the audio device by mixer.
    • The correspondence between ALSA and ad1836 audio input channels should be changed when application asks to use microphone as the input stream. A new channel mask in_chan_mask is added to structure ad1836_t.
    • The name of mixer funtion snd_ad1836_mux is changed into “Capture Source” to enableapplication change the SOUND_MIXER_WRITE_RECSRC through ioctl().
    • Adjust entry in sound common code mixer_oss.c is revised to invoke the correct volume control routine in adi1836 driver.
  20. Enable adi1836 audio driver on kernel 2.6.12 and bf537 STAMP board.
  21. Update the kgdb patch against kernel 2.6.12 and enable it over both Ethernet and UART. Lock the CPLB entry of the asynchronous memory region, which smc91x registers are in.
  22. Add a driver to support for various CMOS Camera Modules connected to Blackfin PPI port. (Tested with Micron Modules) Doing a character driver is unconventional, but it is sufficient to capture still images. Also add a CGI based Client Server test application for the PPI CMOS camera frame capture driver.
  23. Add GPIO I2C driver for Blackfin.
  24. Add TWI I2C driver into kernel for bf534/6/7.
  25. Add CPUFreq support in kernel for bf533 and bf537.
  26. Add SPI Flash MTD driver into kernel. Optimize the reading and writing performance.
  27. Add support to set available memory size for kernel from boot parameters.
  28. Add Blackfin Ethernet driver for bf536/7.
  29. Port an internet phone Linphone to uClinux for Blackfin. It is put to the user application folder in the source tree.
  30. Move system call to interrupt 15 and move deferred_ret_from_exception to interrupt 14.
  31. Update LTP test suite to the latest version for uClinux
  32. Enable CPLB for system with less than 32 M SDRAM

Known Issues

A full list of known issues can be found at:

No Issue Title
663The kernel will crash if you aquire date through the networked scope (NDSO) while the audio driver is enabled
738fail to mount a NFS partition on target board.
843Dropbear now fails to work with 2.6.12 kernel
851Badness in __put_task_struct at kernel/fork.c:110 while running Linphone
854Linphone dies after a long call
860dpmc test can't change voltage and do deepsleep test
877Kernel panic - not syncing: No CPLB Address Match
883Lumpy UDP packet transmission
891tcp stress testing echo service
895top and vmstat reports error user/sys/idle cpu load percentage
908LTP auto test hang randomly on bf537 if enable data cache

There are also some issues in the LTP test cases. They are recorded as bug 264, 532, 561, 562, 563, 567, 732, 733, 734, 735, 736, 737, 742, 743, 744, 745, 890 and 893.

Build Procedure

1. Install Toolchain Release 2005R3

Go to for more information

2. Download the source code of project uClinux for Blackfin release 2005R3

Go to

3. Uncompress to working directory

cp /(WORK_DIR)
cd /(WORK_DIR)
tar -xvf uClinux-dist_2005R3.tar

4. Compile the source using following commands

cd uClinux-dist
make clean 
make menuconfig (save and exit without making any changes)

5. Find the compiled blackfin executable linux in the following location


6. Above file shall be used to download to the target board.

Load Kernel to Target Board

1. Use below serial cables to connect board to host computer.

Male-Female 1-1 serial cable

2. Use minicom or some other serial communications utility to configure the serial port with the following parameters. If run minicom for the first time, run “minicom -s” to setup the port.

Serial Device = /dev/ttyS0
Baud Rate = Baud that have been selected in kernel menuconfig (Default value is 57600)
Number of bits = 8
Parity = None
Stop bits = 1

3. Make sure the BMODE pins on the target board are set to 00. If u-boot loads automatically on reset, the pins are already set correctly.

4. Make sure tftp server is installed in the host machine. Copy linux from uClinux-dist/images/ that is built in above steps to the /tftpboot of the host PC.

5. Load the linux file with the following bootloader commands. Make sure the ipaddr (target board IP) and serverip (host IP) are correct.

STAMP> setenv ipaddr x.y.z.n
STAMP> setenv serverip x.y.z.m 
STAMP> saveenv
STAMP> tftp 0x1000000 linux
STAMP> bootelf 0x1000000

Where x.y.z.m is the ip address of the host machine, and x.y.z.n is the ip address of the target board.

6. The kernel should then boot

Adding / upgrading kernel in flash

Building Linux image (compressed and uncompressed)

(This Image Will be Used in bootm command)

Linux ELF image has to be changed as per u-boot standards to load Linux using bootm command. Following subsections explain how to build compressed and uncompressed Linux images.

Building Compressed Linux Image

1. Generate the binary file from the ELF file, using following command

$ bfin-uclinux-objcopy -O binary linux linux.bin 

2. Compress the binary file obtained above, using following command

$ gzip -9 linux.bin  

3. Build the final linux image, using following command

(WORK_DIR)/u-boot_1.1.3/tools/mkimage -A blackfin -O linux -T kernel -C gzip -a 0x1000 -e 0x1000 -n "Bfin uClinux Kernel" -d linux.bin.gz uImage

Note: Use the utility mkimage present in the u-boot_1.1.3/tools directory to merge the header information like Image Name, Image Type, Data Size, Load Address, Entry Point into the linux.bin.gz.

Building uncompressed Linux image

Use following commands to build uncompressed Linux image

(WORK_DIR)/u-boot_1.1.3tools/mkimage -A blackfin -O linux -T kernel -C none -a 0x1000 -e 0x1000 -n "Bfin uClinux kernel" -d linux.bin uImage

Note: 0x1000 is used because we have compiled the kernel with that location as the entry point. If anyone wants to chose a different address for entry point (for eg, 0x20000), then please give that address instead of 0x1000. Ensure to change the entry point of the kernel.

Programming Flash

STAMP> tftp 0x1000000 uImage
STAMP> protect off all 
STAMP> erase 0x20100000 0x203FFFFF
STAMP> cp.b 0x1000000 0x20100000 $(filesize) 
STAMP> setenv bootcmd bootm 0x20100000 
STAMP> save
STAMP> reset

Build Customized uClinux

Customize Kernel

1. make menuconfig in uClinux for Blackfin project

2. select option “Kernel/Library/Defaults Selection” → “Customize Kernel Settings” and exit

3. In kernel configuration, processor and board specific options can be changed in “Processor type and features”, such as cache status, CPU, DMA, etc.

4. Driver specific options are in respective menus. Such as Ethernet driver in “Networking supporting”, sound card driver in “Sound”, video driver in “Graphic Support”, etc.

5. Save and exit. Then make the image again as mentioned before. The changes of the kernel take effects after you load and run the new image.

Customize Application and Lib

1. make menuconfig in uClinux for Blackfin project

2. select option “Kernel/Library/Defaults Selection” → “Customize Vender/User Settings” and exit

3. In user configuration, applications can be selected to build and debugging information can be enabled.

4. In order to configure busybox 1.00, you should go into the folder “user/busybox-1.00-rc3/” and do menuconfig.

5. In order to configure uClibc, you should go into the folder “uClibc” and do menuconfig.

6. After the menuconfig is done, make the image again as mentioned before. The new selected application can be found in the romfs after you load and run the new image.

Customize for debugging

1. To debug an application, please refer to the document “gdb_guide_bfin.txt” in subfolder kgdb_patch.

2. To do source level kernel debugging by kgdb, please refer to the README file in subfolder kgdb_patch. After apply the kgdb patch file to the kernel, a simple guide “kgdb_bfin.txt” can be found in subfolder “linux-2.6.x/Documentation/blackfin/”

Reporting Bugs

1. Go to the following blackfin uclinux bug tracker page,

2. If the bug is not already reported click on “Submit New” button to report new bug.