Compiling U-Boot
The latest relea 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.
Unpack
Once you've download the source code for the latest version, you can unpack the source archive by doing (replace u-boot-1.1.6.tar.bz2 with whatever filename you downloaded if it is not the same):
$ tar jxf u-boot-1.1.6.tar.bz2
软键盘怎么开Now simply change directory to the U-Boot directory that was just created (replace u-boot-1.1.6 as applicable):
$ cd u-boot-1.1.6
Configure/Build
Then run the following commands:
The Blackfin toolchain must be installed before U-Boot can be compiled. For more information, e Installing the Blackfin Toolchain.
$ make <board>_config
$ make
Replace <board> with the specific board you are using. The following board configs may be available according to the relea you're using.
Configuration | Board Description |
bf527-ezkit_config | The 珠绣教程BF527 EZ-Kit board |
bf533-stamp_config | The BF533 Stamp board |
bf533-ezkit_config 教学测评 | The BF533 EZ-Kit board |
bf537-stamp_config | The BF537 Stamp or BF537 EZ-Kit board |
bf548-ezkit_config | The BF548 EZ-Kit board |
bf561-ezkit_config | The BF561 EZ-Kit board |
| |
The BFIN_BOOT_MODE define in the board configuration file controls the board boot mode (parallel flash / rial flash / uart / etc…). See the customizing document for more information.
Binaries
Once U-Boot has compiled successfully the following files will be created in the U-Boot directory:
File | Description | 深圳退休工资
u-boot 里开头的成语 | Compiled ELF image |
u-boot.bin | u-boot converted to a raw binary |
u-boot.hex | u-boot.bin converted to Intel Hex format |
u-boot.srec | u-boot.bin converted to Motorola S-records format |
u-boot.ldr | u-boot converted to Blackfin Loader format |
u-boot.ldr.hex | u-boot.ldr converted to Intel Hex format |
u-boot.ldr.srec | 嫩豆腐的做法大全 u-boot.ldr converted to Motorola S-records format |
| |
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 ud 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 ud regardless of boot mode for a quick runtime test (executing via the go command).
If you're using U-Boot to do the programming, then you want the u-boot.bin or 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.hex or 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. Plea 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.
Generating By Hand
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 will do the steps for you already!
// 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
Testing
Rather than blindly flashing the newly built U-Boot and retting 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 u this file and no other) into external memory and u the go command. U-Boot will automagically relocate itlf 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), e the loading files page.
Flashing
Actually upgrading U-Boot is covered in the upgrading儿童学习障碍 document.
Initially Loading U-Boot
Flash memory on your development platform should come preloaded with a working UBoot. However, if you are either: