2010-02-23 11:11:02     u-boot for cm-bf537e is broken

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

2010-02-23 11:11:02     u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86383   

 

U-boot.bin file under u-boot project fails

bfin> flinfo                                                                 

                                                                             

Bank # 1: missing or unknown FLASH type                                      

bfin>   

 

I think Uart boot ldr file didn't work correctly either.

 

Might be reasonable o remove them from the u-boot project files section.

 

(Files found under Bluetechnix project seem to be bad as well... u-boot.bin fails when trying to boot after using "saveenv")

QuoteReplyEditDelete

 

 

2010-02-23 11:14:49     Re: u-boot for cm-bf537e is broken

Mike Frysinger (UNITED STATES)

Message: 86385   

 

you need to actually describe the software you're using as well as the exact hardware settings you're using

 

there is no "u-boot.bin" file in the u-boot 2009R1.1 download list

 

files under the bluetechnix project are not supported here.  ask on their support forums / mailing lists.

QuoteReplyEditDelete

 

 

2010-02-23 13:22:08     Re: u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86392   

 

Ashamed and sorry. Head gets soft after long working days.

 

 

 

Here:

 

Our task is to use sensores over SPI bus with our system.

 

We have cm-bf537e core module on bluetechnix development board. We use latest toolchain.

 

We flashed "u-boot+uImage.bin" that can be found under Bluetechnix project but uClinux didn't show device nodes for I2C and/or SPI in /dev. We understood from devices section from this wiki that we need to compile kernel and configure it to have support for I2C and SPI. So we did that. Does this make any sense or is there helpful info to point to get started with SPI devices?

 

Now testing the compiled linux we loaded elf without rootfs (vmlinux) to memory exactly according to the advice on the page

 

http://docs.blackfin.uclinux.org/doku.php?id=downloading_to_the_target

 

Running bootelf command crashed with some weird characters right in the beginning of boot. (can't copy exact output before Im back at work)

 

To avoid uart-booting for every test we flashed and booted u-boot binary found in u-boot-cm-bf537e-2009R1.1-rc1.tar.bz2. Now with this u-boot there is abovementioned problem with flash memory.

 

We also flashed u-boot.bin found in Bluetechnix project files. That seems to work and boot but using "saveenv" after giving ipaddr and serverip u-boot wont boot any more.

 

What we might be missing or misunderstanding? What could be tested to narrow possible problems?

QuoteReplyEditDelete

 

 

2010-02-23 22:08:08     Re: u-boot for cm-bf537e is broken

Sonic Zhang (CHINA)

Message: 86410   

 

Which uboot, toolchain and uClinux-dist release do you use? In latest 2009R1.1, use bootm to load kernel uImage other than bootelf with vmlinux in uboot.

QuoteReplyEditDelete

 

 

2010-02-24 15:18:53     Re: u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86486   

 

Thanks, Sonic! Booting with bootm functioned, but there isstill a few questions left.

 

Concerning u-boot:

 

Compiling u-boot with toolchain from debian repository (~2009R1-rc10) from u-boot-2008.10-2009R1.1-rc1.tar.bz2, using make cm-bf537e and flashing .bin it to the tinyboard boots ok but gives abovementioned error when using "flinfo". Also uploading with tftp gives out of boundary error.  (Sorry about not exact error message.)

 

Any ideas how to fix that? What I do wrong with compiling?

QuoteReplyEditDelete

 

 

2010-02-24 21:59:13     Re: u-boot for cm-bf537e is broken

Sonic Zhang (CHINA)

Message: 86491   

 

You should always attach the error log of flinfo in uboot.

QuoteReplyEditDelete

 

 

2010-02-25 13:46:38     Re: u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86552   

 

You should always attach the error log of flinfo in uboot.

 

---

 

I don't know what you mean? Above mentioned error occurs... This one:

 

bfin> flinfo                                                                 

                                                                             

Bank # 1: missing or unknown FLASH type                                      

bfin>

QuoteReplyEditDelete

 

 

2010-02-25 22:17:21     Re: u-boot for cm-bf537e is broken

Sonic Zhang (CHINA)

Message: 86563   

 

You should copy the whole uboot start up log from hardware reset as well.

QuoteReplyEditDelete

 

 

2010-03-02 10:23:02     Re: u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86728   

 

bfin> go 0x1000000

## Starting application at 0x01000000 ...

 

 

U-Boot 2008.10 (ADI-2009R1.1-rc1) (Feb 26 2010 - 14:03:46)

 

CPU:   ADSP bf537-0.3 (Detected Rev: 0.3) (bypass boot)

Board: Bluetechnix CM-BF537E board

       Support: http://www.bluetechnix.at/

Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz

RAM:   32 MB

Flash: Device ID of the Flash is ffff

Flash Memory Start 0x20000000

Memory Map for the Flash

0x20000000 - 0x203FFFFF Single Flash Chip (4MB)

Using PF4 as a 2M bank switch

Please type command flinfo for information on Sectors

4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Warning: Generating 'random' MAC address

Blackfin EMAC

MAC:   D6:CC:D7:E1:FF:EF

Hit any key to stop autoboot:  0

Done.

Wrong Image Format for bootm command

ERROR: can't get kernel image!

bfin> flinfo

 

Bank # 1: missing or unknown FLASH type

bfin>

 

So what to do? There might be a problem with memory sectores of environment variables but I can't understand what.

QuoteReplyEditDelete

 

 

2010-03-03 01:23:17     Re: u-boot for cm-bf537e is broken

Sonic Zhang (CHINA)

Message: 86738   

 

Flash: Device ID of the Flash is ffff

 

The divice id of your flash chip is invalid here. Which flash driver do you use in uboot? What did you change to this driver?

 

Please check why uboot probes such a invalid id on your board.

 

 

 

The log on BF533-stamp board.

 

U-Boot 2008.10-svn2158 (ADI-2009R1.1-rc1) (Dec 16 2009 - 17:43:50)

CPU:   ADSP bf533-0.3 (Detected Rev: 0.3) (bypass boot)

Board: ADI BF533 Stamp board

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

Clock: VCO: 497.664 MHz, Core: 497.664 MHz, System: 82.944 MHz

RAM:   128 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   MAC:   00:E0:22:FE:0

QuoteReplyEditDelete

 

 

2010-03-05 07:19:03     Re: u-boot for cm-bf537e is broken

Joonas Reunamo (FINLAND)

Message: 86859   

 

Which flash driver do you use in uboot?

 

Where I might find this information?

 

What did you change to this driver?

 

Nothing.

 

Please check why uboot probes such a invalid id on your board.

 

Any advice how to do that?

 

I asked about this in bluetechnix project section and got answer shown below. Their suggested correction didnt help and there havn't been further answer to my question. Can you help to tell how to fix this?

 

----------

 

Hello,

 

We wanted to support V1.x and V3.x of the CM with the same U-Boot binary. But obviously, there's an U-Boot bug if the sector size of the environment sector is not given correctly which means, on CM V3.x, U-Boot deletes the first 4 sectors, changes the environment, and writes back failes somewhere.

 

Here's how you solve it quickly:

- Edit the U-Boot sources: include/configs/cm-bf537e.h

- Set

    #define CONFIG_ENV_SECT_SIZE     0x8000

  and recompile.

 

If that does not work as expected, change additionally:

    #define CONFIG_ENV_OFFSET        0x8000

    #define CONFIG_ENV_SIZE          0x8000

(Then the full second sector will be used for the environment)

 

Best regards,

Harald

 

---------

 

I tried:

 

/*

* Flash Settings

*/

#define CFG_FLASH_BASE        0x20000000

 

#define CFG_HAS_FLASHSWITCH     1

#define CFG_MAX_FLASH_BANKS    1    /* max number of memory banks */

#define CFG_MAX_FLASH_SECT    35    /* max number of sectors on one chip */

 

#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)

#define CONFIG_ENV_IS_IN_EEPROM    1

#define CONFIG_ENV_OFFSET    0x4000

#else

#define CONFIG_ENV_IS_IN_FLASH    1

#define CONFIG_ENV_ADDR        0x20004000

//#define CONFIG_ENV_OFFSET    0x4000

#endif

//#define CONFIG_ENV_SIZE        0x2000

//#define CONFIG_ENV_SECT_SIZE    0x20000    /* Total Size of Environment Sector */

#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)

#define ENV_IS_EMBEDDED

#else

#define ENV_IS_EMBEDDED_CUSTOM

#endif

 

 

#define CONFIG_ENV_SECT_SIZE     0x8000 //ADDED see: https://blackfin.uclinux.org/gf/project/bluetechnix/forum/?_forum_action=ForumMessageBrowse&thread_id=39468&action=ForumBrowse&forum_id=191

#define CONFIG_ENV_OFFSET        0x8000

#define CONFIG_ENV_SIZE          0x8000

 

 

#define FLASH_TOT_SECT        32

#define CFG_FLASH_SIZE        0x400000

 

but it didn't help.

 

I actually don't understand how to handle env memory and such things and just wish to get u-boot fixed so I could use it with our board. Any help is very welcome.

Attachments

    Outcomes