The latest release of Das U-Boot for the Blackfin processor can be found on the Blackfin Linux website in the U-boot project Files. There you can find tested precompiled images as well as the source archive.
Once you've download the source code for the latest version, you can unpack the source archive by doing (replace
u-boot-2013.07-2013R1.tar.bz2 with whatever filename you downloaded if it is not the same):
$ tar jxf u-boot-2013.07-2013R1.tar.bz2
Now simply change directory to the U-Boot directory that was just created (replace
u-boot-2013.07-2013R1 as applicable):
$ cd u-boot-2013.07-2013R1
Then run the following commands:
$ make <board>
<board> with the specific board you are using. See the boards list for board configs that may be available depending on the release.
Once U-Boot has compiled successfully the following files will be created in the U-Boot directory:
|u-boot||Compiled ELF image|
These files are also available if you tell the build system to make them (simply run
Which file format you need depends on how you're booting the processor and what tool you're using to do the programming. The
u-boot ELF file is never used to boot, only for reference/debugging with the standard toolchain.
If you're booting the processor in “Bypass” mode, then you will need the
u-boot.bin file (or one of its derivatives). For every other boot mode, you need the
u-boot.ldr file (or one of its derivatives). The
u-boot.bin file is also used regardless of boot mode for a quick runtime test (executing via the
If you're using U-Boot to do the programming, then you want the
u-boot.ldr file. You do not want the hex or srec formats.
If you're using VDSP to do the programming, then you probably want the
u-boot.ldr.hex file. VDSP can program the raw binary file as well, but many people feel more comfortable with the hex file. Other JTAG programming tools may also require the hex format.
If you want the srec format, you probably don't know what you're doing. Please rethink what you're attempting, read some documentation, or ask for help. If you're 100% sure you need the srec files, they are provided in the rare off-chance.
If you just have a U-Boot binary file and need to convert it by hand for whatever reason, he's the appropriate voodoo incantations. Remember that the U-Boot build system has targets for you to use already (e.g.
// Convert ELF to Binary $ bfin-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin // Convert ELF to Hex $ bfin-uclinux-objcopy --gap-fill=0xff -O ihex u-boot u-boot.hex // Convert Binary to Hex $ bfin-uclinux-objcopy --gap-fill=0xff -I binary -O ihex u-boot.bin u-boot.hex // Convert LDR to Hex $ bfin-uclinux-objcopy --gap-fill=0xff -I binary -O ihex u-boot.ldr u-boot.ldr.hex
Rather than blindly flashing the newly built U-Boot and resetting the board only to find out something is wrong and you're left with a bricked board, you can dynamically test the new U-Boot first.
Simply load the
u-boot.bin file (always use this file and no other) into external memory and use the
go command. U-Boot will automagically relocate itself from the load address to its normal runtime address and allow you to test it. This way your changes are only tested in memory while the known good U-Boot is still written in flash.
Keep in mind that if you do want to flash the new version, you will have to reload the file into external memory (and load the correct file for your boot mode).
For help on how to transfer the
u-boot.bin file as well as actual examples (with board output), see the loading files page.
Actually upgrading U-Boot is covered in the upgrading document.