August 25th 2005
[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.
make bf537_config make
make bf534_config make
make serial_stamp_config make
Take the BF537 STAMP board as example:
$ bunzip2 uboot_1.1.3.tar.bz2 $ tar xvf uboot_1.1.3.tar
$ make distclean $ make clean $ make bf537_config $ make
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.
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.
make serial_stamp_config make
cd u-boot_1.1.3/tools/bin2ldr
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.
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.
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**
cp uboot.bin /tftboot
STAMP> tftp 0x1000000 uboot.bin
STAMP> protect off 0x20000000 0x2003ffff
STAMP> erase 0x20000000 0x2003ffff
STAMP> cp.b 0x1000000 0x20000000 $(filesize)
STAMP> cmp.b 0x1000000 0x20000000 $(filesize)
STAMP> reset
STAMP> loadb STAMP> <CTRL+\C> Note: Type cntl \C to go to ckermit prompt
ckermit> send uboot.bin ckermit> connect Note: 'connect' takes control back to the bootloader prompt
STAMP> protect off 0x20000000 0x2003ffff
STAMP> erase 0x20000000 0x2003ffff
STAMP> cp.b 0x1000000 0x20000000 $(filesize)
STAMP> cmp.b 0x1000000 0x20000000 $(filesize)
STAMP> reset
Note: This approach is used while flashing the uboot first time which is normally done by board manufacturer.
see the loading page.
$ bfin-elf-objcopy -I binary -O ihex u-boot.bin u-boot.hex
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";
}
}
}
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.
STAMP> tftp 0x1000000 linux
STAMP> bootelf
STAMP> tftp 0x1000000 uImage STAMP> bootm 0x1000000 Kernel prompt can be seen.
STAMP> tftp 0x1000000 uImage STAMP> iminfo 0x1000000 Details of the image downloaded can be Seen.
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
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.
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.