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

2005R3 u-boot_1.1.3 Release

August 25th 2005

Development Environment

  • Tool chain: 3.x Blackfin Toolchain (2005R3 Release (August 4th 2005))
  • Host platform: Suse 9.2
  • Target board:
    • ADDS-BF533 STAMP REV 1.2
    • ADDS-BF537 STAMP REV 1.3

Deliverables

  1. u-boot_1.1.3.tar.bz2
    • source files
  2. u-boot_stamp.bin
    • u-boot binary for bf533 stamp board that can be programmed into flash
  3. u-boot_bf537.bin
    • u-boot binary for bf537 stamp board that can be programmed into flash
  4. u-boot_stamp_1.1.3.hex.gz
    • u-boot_1.1.3 hex file to be used to program bf533 stamp board
  5. u-boot_bf537_1.1.3.hex.gz
    • u-boot_1.1.3 hex file to be used to program bf537 stamp board
  6. BF533-Stamp.dxe
    • VDSP flash driver for stamp board (unsupported)
  7. BF533_Stamp.zip
    • Source code for VDSP stamp flash driver (unsupported)
  8. M25P64.dxe
    • VDSP flash driver for SPI flash M25P64 on the STAMP board (unsupported)
  9. M25P64.zip
    • Source code for VDSP M25P64 flash driver. (unsupported)
  10. test-uboot-2005R3.tar.gz
    • Test log file for this u-boot release

[note]: If you are using bf533 ezkit board, please build u-boot to get binary file. If you are using bf537 ezkit board, you can use u-boot_bf537.bin.

Improvements

  1. BF533 STAMP board:
    • Enable cache by default
    • Add splash screen support
  2. Add board configuration for BF537 STAMP/EZKIT board
    • build uboot for bf537 board
      make bf537_config
      make
    • The ethernet driver is written for the on-chip EMAC.
    • Re-write the flash driver instead of the common CFI driver.
  3. Add board configuration for BF534
    • build uboot for bf534 board
      make bf534_config
      make
    • No ethernet driver is in the uboot for bf534, it is using serial connection.
  4. Add serial BF533 STAMP board configuration
    • build Uboot for BF533 STAMP board booting from SPI flash
      make serial_stamp_config
      make
    • please read u-boot_1.1.3/tools/bin2ldr/README if you want to get u-boot LDR format file.
    • Now the SPI flash driver is written for M25P64

Build Procedure

Take the BF537 STAMP board as example:

  1. Download uboot_1.1.3.tar.bz2
  2. Uncompress source
    $ bunzip2 uboot_1.1.3.tar.bz2
    $ tar xvf uboot_1.1.3.tar
  3. Execute following commands:
    $ make distclean
    $ make clean
    $ make bf537_config
    $ make
  4. uboot.bin will be used to flash on to the target board.

If you are building Uboot for the BF533 stamp board and you want to boot from SPI flash, we strong recommend implementing the script ./tools/bin2ldr/runme.sh to get LDR format file.

Boot Uboot from SPI flash

Uboot supports booting from SPI flash in this release. The SPI flash driver is written for the chip: M25P64. And a new board configuration is added to support this new feature.

  1. build Uboot package first
    make serial_stamp_config
    make
  2. Enter the bin2ldr tools directory
    cd u-boot_1.1.3/tools/bin2ldr
  3. a macro “APP_ENTRY” in the “bin2ldr.h” defines where the uboot will be loaded. Modify this macro to fit for your target board.
  4. Implement the script “runme.sh” to get the LDR format file.
  5. file description:
    • app.bin: the original file u-boot.bin
    • app.ldr: the binary LDR format file
    • app.hex: the HEX LDR format file.
  6. The first time booting Uboot from SPI flash, please program the file “app.hex” to the SPI flash(M25P64). And if you want to update the Uboot in the SPI flash after the first time, you also can put the file “app.ldr” into your host TFTP root directory and implement the command “run update” on the uboot prompt.

Flashing the bootloader

Ensure following settings in the host system using either Minicom or Kermit With Kermit make sure the following is set: Ensure ckermit is setup on the host with the following configuration of .kermrc

$ set line /dev/ttyS0
$ set speed 57600
$ set carrierwatch off
$ set handshake none
$ set flowcontrol none
$ robust
$ set file type bin
$ set file name lit
$ set rec pack 1000
$ set send pack 1000
$ set window 5

Flashing mechanism varies depending on whether the board already contains the UBoot bootloader or not. Two flashing approaches are described in the following sections, for the two types of boards, board with bootloader and board without bootloader.

Upgrading boot loader

Following approach shall be used if the board is already having the bootloader and needs to upgrade to a new version of the bootloader. Caution: After erasing the flash, make sure to copy new bootloader to the flash. If board is reset without “copy to flash operation”, bootloader in flash will be lost permanently and could render hardware inoperable till `the bootloader is restored through other methods.

  1. Start Kermit or minicom
  2. Boot the uboot present in the board and wait for the prompt to appear.
  3. Once the uboot prompt appears execute following commands:
    STAMP> set ipaddr x.y.z.m
    **Note: Assign an ipaddress for the target board**
    STAMP> set serverip x.y.z.n
    **Note: Set the ipaddress of the host machine that contains updated file**
  4. Now new bootloader can be flashed either in “network” or in “serial mode”.
Network Mode:
  1. Copy uboot.bin to /tftpboot
    cp uboot.bin /tftboot
  2. rom uboot load uboot.bin into memory
    STAMP> tftp 0x1000000 uboot.bin
  3. Unprotect flash sectors where uboot resides
    STAMP> protect off 0x20000000 0x2003ffff
  4. Erase flash sectors
    STAMP> erase 0x20000000 0x2003ffff
  5. Copy uboot image from memory to flash
    STAMP> cp.b 0x1000000 0x20000000 $(filesize)
  6. Verify that image was copied correctly
    STAMP> cmp.b 0x1000000 0x20000000 $(filesize)
  7. Reset Board
    STAMP> reset
Serial mode
  1. Start Kermit in the same directory as your uboot image
    STAMP> loadb
    STAMP> <CTRL+\C>
    Note: Type cntl \C to go to ckermit prompt
  2. Send uboot file
    ckermit> send uboot.bin
    ckermit> connect
    Note: 'connect' takes control back to the bootloader prompt
  3. Unprotect flash sectors where uboot resides
    STAMP> protect off 0x20000000 0x2003ffff
  4. Erase flash sectors
    STAMP> erase 0x20000000 0x2003ffff
  5. Copy uboot image from memory to flash
    STAMP> cp.b 0x1000000 0x20000000 $(filesize)
  6. Verify that image was copied correctly
    STAMP> cmp.b 0x1000000 0x20000000 $(filesize)
  7. Reset Board
    STAMP> reset

Flashing into the Board without bootloader

Note: This approach is used while flashing the uboot first time which is normally done by board manufacturer.

see the loading page.

Creating hex file
  • After uboot is built run the following command:
    $ bfin-elf-objcopy -I binary -O ihex u-boot.bin u-boot.hex
Network boot:
  1. Ensure dhcpd server and tftp server are running on the host. dhcpd.conf on the HOST should look something similar to the given below:
        ddns-update-style ad-hoc;
        allow bootp;
        subnet 10.100.4.0 netmask 255.255.255.0 {
            default-lease-time 122209600;
            max-lease-time 31557600;
            group {
                host bf533 {
                    hardware ethernet 02:80:ad:20:31:b8;
                    fixed-address 10.100.4.50;
                    filename "linux";
                        }
                  }
        }
  2. Ensure to have the image for download in the /tftpboot of the HOST.
  3. Configure IP addresses of Host and Target board by giving following commands
    STAMP> setenv serverip x.y.z.m
    STAMP> setenv ipaddress x.y.z.n
    Where x.y.z.m is Host IP address and x.y.z.n is Target board IP address.
  4. Download Linux image
    STAMP> tftp 0x1000000 linux
  5. Booting Linux image
    STAMP> bootelf

Different VCO frequency support:

  • Edit the files “include/configs/ezkit533.h” or “include/configs/stamp.h
    1. Change the line CONFIG_VCO to any value between 1-64.
    2. Compile and the new uboot.bin
    3. This uboot.bin would run at the VCO specified in “include/configs/ezkit533.h” or “include/configs/stamp.h”.

HOWTO (Help on testing selected commands)

  1. bootm
    STAMP> tftp 0x1000000 uImage
    STAMP> bootm 0x1000000
    Kernel prompt can be seen.
  2. iminfo
    STAMP> tftp 0x1000000 uImage
    STAMP> iminfo 0x1000000
    Details of the image downloaded can be Seen.
  3. go
    1) Create linux binary file
    $ bfin-elf-objcopy -O binary linux linux.bin
    2) Give following command at BOOT prompt
    STAMP> tftp 0x1000 linux.bin
    STAMP> go 0x1000
    Note: Entry point address of kernel should only be used as the load address in case of using go command for kernel image boot. 
    Kernel prompt can be seen
  4. autoboot (OR) How to make a standalone system (Flash Boot)
    Execute following commands at BOOT prompt
    STAMP> tftp 0x1000000 uImage
    STAMP> protect off 0x20040000 0x200fffff
    STAMP> erase 0x20040000 0x200fffff
    STAMP> cp.b 0x1000000 0x20040000 $(filesize)
    STAMP> setenv bootcmd bootm 0x20040000
    STAMP> save
    STAMP> reset
    Kernel prompt can be seen.
  5. autoscr
    a) Execute following commands on the host,
        i) Write the commands (for eg, "echo hi" etc) to a file, say test.script
        ii) build uncompressed image
    b) To test on STAMP board use following command
    $ mkimage -A blackfin -O linux -T script -C none -a 0x5000000 -e 0x5000000 -n "autoscr example script" -d test.script test.img
    c) Execute following commands on the target
    STAMP> tftp 0x1000000 test.img
    STAMP> autoscr 0x1000000
    d) In case of this example the message "hi" can be seen on the screen.
  6. Several environments variables are added to Uboot, they make things handy.
    • run ramboot, pass boot arguments(including both “root=” and “ip=” parameter) to kernel, if acceptable.
    • run nfsboot, be sure that “rootpath” and other “ip” environment variables are correct, and this command can pass the necessary arguments to kernel needed by nfs boot.
    • run flashboot, boot from flash, just be equal to “bootm $(flashaddr)” command
    • run update, place “u-boot.bin” under the TFTF root directory on your host, and implement “run update” will update the bootload of the target board

Known Issues

  • 817 – memory operation problem under 20Mhz SCLK and CCLK with ICACHE on and DCACHE off
  • 814 – date sometimes fails at 20Mhz SCLK and CCLK with ICACHE on and DCACHE off
  • 793 – fsload uImage problem in 20Mhz SCLK and CCLK with both ICACHE and DCACHE on
  • 792 – uboot can't tftp download at 20Mhz SCLK and CCLK with only ICACHE on
  • 784 – uImage bootm issue in low SCLK and CCLK and with caches on

Test Results

  • Test for u-boot 2005R3 is done. See the test results file uboot_test_results_2005R3.tar.gz.

Report Bugs

  1. Go to the following blackfin uclinux bug tracker page,http://blackfin.uclinux.org/tracker/?atid=153&group_id=20&func=browse
  2. If the bug is not already reported click on “Submit New” button to report new Bug.