2010-11-22 21:39:46     Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2010-11-22 21:39:46     Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

HappyBlackfin Blackfin (CHINA)

Message: 96101   

 

U-boot Version:

 

u-boot-2008.10-2009R1.1-rc1.tar.bz2

 

Blackfin Chip: BF561 SSBZ600 0.5

 

I want to boot the bf561 via SPI Flash (M25P64). I used an old u-boot version modify the bf561-ezkit.h file:

 

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

 

and add spi driver to the u-boot, It's work.

 

Now do the same at u-boot.2008.10-2009R1.1-rc1.tar.bz2, the make information:

 

make clean;make bf561-ezkit_config

 

.......

 

UNDEF_SYM=`bfin-uclinux-objdump -x board/bf561-ezkit/libbf561-ezkit.a lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/blackfin/libblackfin.a lib_blackfin/libblackfin.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a | sed  -n -e 's/.*\(___u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /funspace/source/blackfin/uboot_release/bf561_uboot && bfin-uclinux-ld --gc-sections -Bstatic -T board/bf561-ezkit/u-boot.lds  $UNDEF_SYM cpu/blackfin/start.o --start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/blackfin/libblackfin.a lib_blackfin/libblackfin.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/bf561-ezkit/libbf561-ezkit.a --end-group -L /opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2 -lgcc -Map u-boot.map -o u-boot

 

bfin-uclinux-nm u-boot | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort \

 

                        | awk '$2 ~ /[tTwW]/ {print $1 $3}' \

 

                        | sed -e 's:^\(.*\):.asciz "\1":' > .syms.u-boot.S

 

bfin-uclinux-gcc  -D__ASSEMBLY__ -g  -Os   -ffixed-P5 -fomit-frame-pointer -mno-fdpic -ffunction-sections -fdata-sections -mcpu=bf561-0.5 -D__KERNEL__ -I/funspace/source/blackfin/uboot_release/bf561_uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include -pipe  -DCONFIG_BLACKFIN -I. -DSYM_FILE='".syms.u-boot.S"' -c cpu/blackfin/system_map.S -o cpu/blackfin/system_map.o

 

UNDEF_SYM=`bfin-uclinux-objdump -x board/bf561-ezkit/libbf561-ezkit.a lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/blackfin/libblackfin.a lib_blackfin/libblackfin.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a | sed  -n -e 's/.*\(___u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /funspace/source/blackfin/uboot_release/bf561_uboot && bfin-uclinux-ld --gc-sections -Bstatic -T board/bf561-ezkit/u-boot.lds  $UNDEF_SYM cpu/blackfin/start.o --start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a cpu/blackfin/libblackfin.a lib_blackfin/libblackfin.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/bf561-ezkit/libbf561-ezkit.a --end-group -L /opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2 -lgcc -Map u-boot.map -o u-boot cpu/blackfin/system_map.o

 

bfin-uclinux-objcopy -O srec u-boot u-boot.srec

 

bfin-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

 

tools/envcrc common/env_common.o --binary > env-ldr.o

 

bfin-uclinux-ldr -T bf561-0.5 -c u-boot.ldr u-boot --bmode SPI_MASTER --use-vmas --initcode cpu/blackfin/initcode.o --punchit $(((CONFIG_ENV_ADDR - CFG_FLASH_BASE))):$((0x2000)):env-ldr.o

 

Creating LDR u-boot.ldr ...

 

Adding DXE 'u-boot' ... [initcode 404] [jump block to 0x03FC0000] [ELF block: 121120 @ 0x03FC0000] [ELF block: 40 @ 0xFFA0000C] [ELF block: 27640 @ 0x03FDD948] OK!

 

Done!

 

 

 

But boot failed!

 

Why & how to do ? Thanks!

QuoteReplyEditDelete

 

 

2010-11-22 21:47:44     Re: Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

HappyBlackfin Blackfin (CHINA)

Message: 96102   

 

some times it's display:

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5) (spi flash boot)

 

Board: ADI BF561 EZ-Kit Lite board

 

       Support: http://blackfin.uclinux.org/

 

Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz

 

RAM:   64 MB

 

Flash: ## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB

 

0 kB

 

*** Warning - bad CRC, using default environment

 

In:    serial

 

Out:   serial

 

Err:   serial

 

Net:   Hit any key to stop autoboot:  0

 

bfin> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x

 

> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x>

 

x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x>

 

x> x> x> x> x> x 0

 

then system stop.

 

Cold reset only printf:

 

bfin> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x

 

> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x>

 

x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x> x>

 

x> x> x> x> x> x 0

 

 

 

QuoteReplyEditDelete

 

 

2010-11-22 22:20:03     Re: Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

Mike Frysinger (UNITED STATES)

Message: 96103   

 

are you actually using a BF561-EZKIT ?  or are you using some other board ?

 

the bf561-ezkit does not have the SPI pins pulled out so that it can be booted from a SPI flash.  you'd have to make your own addon card to hook up to the U-connector on the bottom.

QuoteReplyEditDelete

 

 

2010-11-22 22:36:28     Re: Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

HappyBlackfin Blackfin (CHINA)

Message: 96105   

 

Thanks!

 

I made an own board, SDRAM same to  BF561 EZKIT.

 

The DSP BMODE1 & BMODE0 pins pull up to vcc(3.3V), then the bf561 can boot from the spi flash.

 

the bf561-ezkit.h :

 

#define  CONFIG_SPI

 

#define CONFIG_BFIN_CPU             bf561-0.5

 

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

 

#define CFG_AUTOLOAD                    "yes"    /*rarpb, bootp or dhcp commands will perform only a */

 

#define CONFIG_CLKIN_HZ 25000000

 

#define CONFIG_CLKIN_HALF 0

 

#define CONFIG_PLL_BYPASS 0

 

#define CONFIG_VCO_MULT 20

 

#define CONFIG_CCLK_DIV 1

 

#define CONFIG_SCLK_DIV 5

 

#define CONFIG_SPI_BAUD 8

 

#define CONFIG_BAUDRATE 115200

 

System.map

u-boot.map

bf561-ezkit.h

QuoteReplyEditDelete

 

 

2010-11-22 22:56:47     Re: Help:u-boot-2008.10-2009R1.1-rc1for BF561 via SPI Flash Boot?

Mike Frysinger (UNITED STATES)

Message: 96107   

 

you should be creating your own board port and not just modifying the existing bf561-ezkit code

Attachments

Outcomes