2008-10-16 00:42:23     Booting Bluetechnix CM-BF527?

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

2008-10-16 00:42:23     Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 63748   

 

I can't seem to reproduce the CM-BF527 uboot images I found in the project files area. When I check out the latest u-boot from SVN and configure for the board, it crashes whether configured&booting from flash or UART. Furthermore, the UART .ldr image on the site cannot seem to unprotect/erase/write flash above 4mb (0x20400000 and on).

Furthermore, when it writes to 0x20000000, subsequent booting doesn't seem to use that write - it seems that when Blacksheep wrote to 0x20000000, the u-boot sees that written file at 0x20400000 (where it can read but not change). Perhaps the u-boot UART loaded image is writing to 0x20400000 when it thinks it's writing to 0x2000000? Summary questions:

 

Anyone know how to build working u-boot for CM-BF527?

Is there a way to get posted CM-BF527 u-boot to access flash correctly?

 

Thanks for any help!

-brad

QuoteReplyEditDelete

 

 

2008-10-17 00:31:28     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 63824   

 

the CM-BF527 requires GPIO-assisted flash like other tinyboards.  the current trunk doesnt support it.  you can either disable the parallel flash support and it should work fine, or you can cheat and disable hardware errors in cpu/blackfin/cpu.c.

QuoteReplyEditDelete

 

 

2008-10-17 13:51:39     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 63859   

 

Thanks Mike - I do need to boot standalone, so am I limited to using the first 2MB of flash? Or if I disable hw errs as you describe, will it 'work' with more but have the downside of not handling hw errors correctly? If not, would it be a relatively easy patch for me to tackle adding basic GPIO-assisted flash support? We're using this board only as an interim before our own hardware, so if it's a decent sized job I'll probably try to make do with the limitations.

 

Thanks again!

QuoteReplyEditDelete

 

 

2008-10-17 19:23:46     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 63874   

 

Ok, tried to do some of my own lifting that someone may find useful. Found your gpio based flash driver for the kernel (and saw you're involved w/Gentoo - coo and appreciatedl! My webserver runs Gentoo). Saw the gpio uboot cmd you added, and experimented with that - realized I could get to the *actual* address that boots when I plug the cm-bf527 into my own little proto board by setting/clearing pg11 and ph9. u-boot's small enough I don't need the driver just to boot, but my uImage is gonna be >2 megs. That's where I'm at so far, so I'm looking at the shortest path to loading that uImage - only need one pin toggling when reading up above 2megs since the uImage should be < 4 megs. If I haven't posted a eureka, suggestions are welcome for an easy first pass route

QuoteReplyEditDelete

 

 

2008-10-17 19:38:44     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 63875   

 

it should pretty much work if you only access the first two megs of flash.  while hw errors will get ignored in u-boot, there usually arent any and once you boot the kernel, it should handle things properly.

 

a gpio flash driver at the moment involves basically writing your own.  i tried to integrate a clean solution for u-boot-1.1.6, but the common cfi code is just to tangled to do it.  with the next major version of u-boot though, i should be able to put something together.

QuoteReplyEditDelete

 

 

2008-10-20 21:14:38     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 63957   

 

Thanks, it did indeed work - spent a lot of time subsequently trying to get the kernel to boot, when I should have heeded the warnings about closely matching toolchain + kernel codebase times - I already had 2008R1.5-RC3 toolchain installed, and tried to use that to build the tip of the kernel repository - spent too long sorting through that (it would boot but not print anything out, and when I'd look at the memory buffer, it was crashing on an invalid memory access). Tried a fresh start with trunk pulls from toolchain, kernel, uclinux, and u-boot, and almost everything is hunky dory.

 

How can I ensure the gpio-addr-flash driver is used for accessing the flash? I am trying another kernel without physmap-flash enabled - that was being (unsuccessfully) used on my first successful boot.

 

Thanks for your help!

 

-brad

QuoteReplyEditDelete

 

 

2008-10-20 21:20:13     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 63958   

 

i havent gotten around to testing gpio-addr-flash for the cm-bf527 so there arent resources in its board file.  i did test it though on the other tiny boards, so look at them to see how to do it (like the cm-bf537e).

 

QuoteReplyEditDelete

 

 

2008-10-24 03:17:15     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 64141   

 

I added the board resource, and everything *seems* to work, but I've been banging my head against this problem - When it boots, it goes and unlocks everything. That works fine until it gets to 0x100000 (1 MB), at which time the status register comes back 0x0170 indicating an error when it does a "get_chip" on that address. That address is halfway through the gpio 0,0 region, so I thought perhaps it was using "word" addressing instead of byte addressing, but when I manually dump out the flash with the same routines, I get "deadbeef" near the beginning of flash as I should. When I skip the "get_chip" status checking, and just read at 0x100000 (after a 0xFF read array cmd), I get all zeros. The datasheet for the flash (P30 strataflash) says it's divided into 8 1MB programming regions, but doesn't indicate you need to do anything special to read them.

 

Any idea why flash at or above 0x100000 isn't working? Again, it didn't even need to change the GPIOs yet at that addr. Oh, and u-boot can access the memory just fine! (seems to use byte commands?)

QuoteReplyEditDelete

 

 

2008-10-24 03:21:14     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 64142   

 

1mb is the size of the window into the flash region ... when you cross that boundary, gpios start to toggle.  i seem to recall the bf527 having weird behavior with the flash in that one of the gpio lines was inverted ?

QuoteReplyEditDelete

 

 

2008-10-24 03:25:09     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 64143   

 

erp, you're right ... the CM-BF527 uses a 2meg window (the first two async banks).  i thought there was a tiny board that had a 1meg window rather than 2meg, but i guess i just remembered wrong.

 

if you want to cheat real quick, write a simple program that hardcodes a pointer to the async bank region and dump the first two megs to see if you can read that correctly.

 

otherwise, check the GPIO polarity thingy ...

QuoteReplyEditDelete

 

 

2008-10-24 13:50:22     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 64178   

 

Yeah, what I think is weird is that the breakout board Bluetechnix supplies seems to pull one of the GPIOs differently than our protoboard which lets them float (the core module alone seems to set them at 0) - so it boots off a different window of flash when in the breakout board (annoying). But that wouldn't cause what I'm seeing I don't think - I get errors just trying to do a get status on 0x100000 or above, let alone read - and yes, I tried dumping memory and everything below 0x100000 works fine, all zeros above (although u-boot sees that memory just fine).

 

Not sure what's going on, but I guess for now I'll try a manual gpio flipping u-boot loading script and use all but the last window, and then hardcode the gpios to 1s and use the FIRST meg of the last window as jffs2. Ugh. Oh well

 

Thanks for your help!

QuoteReplyEditDelete

 

 

2008-10-24 13:52:32     Re: Booting Bluetechnix CM-BF527?

Brad Bozarth (UNITED STATES)

Message: 64179   

 

Just to double check: "hardcodes a pointer to the async bank region"

 

Anything special to access one or the other async bank region other than just looking at 0x0-0xFFFFF versus 0x100000-0x1FFFFF?

QuoteReplyEditDelete

 

 

2008-10-24 14:15:16     Re: Booting Bluetechnix CM-BF527?

Mike Frysinger (UNITED STATES)

Message: 64180   

 

parallel flash is directly addressable without any glue inbetween.  you only need the magic if you want to do operations like erase or lock pages.

Attachments

    Outcomes