2009-01-16 19:32:42 Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68054
I'm successful in compiling the most recent 2008 OS release and making a couple of modifications. Using TFTP, the newly compiled OS is downloaded tot eh Stamp and everything runs great!
Special THANK YOU to Mike to his generous help getting to this point!
Questions:
1) Could someone point me to the proper documentation to learn how to re-flash the board so the Stamp will boot the newly compiled OS from memory rather than having to down load the binary after each Stamp board reboot/reset?
2) Can this be accomplished without a JTAG?
3) Can this be accomplished independently from U-Boot (just the OS) or does U-boot and the new OS have to be reflashed together?
Thank you!
-David
QuoteReplyEditDelete
2009-01-16 23:45:00 Re: Flashing the BF537 Stamp with a New OS
Mike Frysinger (UNITED STATES)
Message: 68055
working with parallel flash from u-boot is documented here:
http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:parallel-flash
linux can program any flash device it knows about, and linux can handle CFI flashes (which are on all stamp boards) just fine:
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:mtd
QuoteReplyEditDelete
2009-01-17 11:50:54 Re: Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68062
If I understand correctly, a working STAMP unit out of the box has U-Boot contained in the on board ROM, and the OS resides in the Flash memory?
Each time I reboot the BF537 Stamp, I need to download my recompiled binary of the OS. Where does the new OS need to be loaded to directly run the new OS from the Stamp rather than being pulled down after each Stamp reboot from the development system?
-David
QuoteReplyEditDelete
2009-01-17 13:39:00 Re: Flashing the BF537 Stamp with a New OS
Mike Frysinger (UNITED STATES)
Message: 68064
yes, the stamp comes with u-boot at the start of flash and a kernel/rootfs image somewhere in flash. but that location is completely arbitrary. stick it where ever you want and just change the u-boot environment to have it autoboot however you want.
QuoteReplyEditDelete
2009-01-19 04:16:15 Re: Flashing the BF537 Stamp with a New OS
Ian Jeffray (UNITED KINGDOM)
Message: 68094
That's just the default setup. You can have the STAMP board fetch its uImage from a TFTP server on every boot if you like - that's what I do for regular development. Simply change the environment within u-boot to use tftp to fetch the image, rather than fetching it out of flash... set bootargs run ramboot ; savee
The key is that ramboot does "tftp $(loadaddr) uImage ... bootm" rather than flashboot which does "bootm 0x20040000" to run from flash.
QuoteReplyEditDelete
2009-01-19 12:33:01 Re: Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68122
Thank you Mike and Ian.
I got it working. When the kernel is compiled it now exceeds 4MB and cannot fit into the flash memory space. I'll have to run from RAM until more flash can be added to the board.
Just curious, are there any plans to revise the STAMP board with more flash memory in future versions?
-David
QuoteReplyEditDelete
2009-01-19 12:53:25 Re: Flashing the BF537 Stamp with a New OS
Mike Frysinger (UNITED STATES)
Message: 68123
the BF537 only has 4 megs of async memory, so no
QuoteReplyEditDelete
2009-01-19 17:16:05 Re: Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68129
The u-image size the the latest 2008 release is 4.03MB. Are we reaching a point when the standard distribution will exceed the flash memory size of the BF537 STAMP?
Can the binary image be compressed in flash memory and expanded into ram to support larger images?
-David
QuoteReplyEditDelete
2009-01-19 20:07:18 Re: Flashing the BF537 Stamp with a New OS
Robin Getz (UNITED STATES)
Message: 68131
David:
It has never been a requirement (from us) to have the default uImage fit into the flash. I don't see why we would do that.
-Robin
QuoteReplyEditDelete
2009-01-19 20:08:23 Re: Flashing the BF537 Stamp with a New OS
Robin Getz (UNITED STATES)
Message: 68132
David:
No - there are no plans to modify the flash size. If you want to make a smaller image - it is covered in the faq.
-Robin
QuoteReplyEditDelete
2009-01-20 16:59:30 Re: Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68164
If I understand the documentation to load the current 2008R1.5 image to the flash memory:
The flash memory where the image is loaded needs to be unprotected and overwritten with all 0's "zero".
Load the uImage.intramfs image to the flash. In my case using tftp
Change the bootcmd to the the kernel entry point in the U-boot environment
My question is what is the flash memory address range where the new kernel image is loaded for the BF537 Stamp?
I'm successful in loaded to ram on start-up using tftp and everything runs OK. I'd like to replace the existing 2007 image that came loaded on the STAMP with the updated version.
-David
QuoteReplyEditDelete
2009-01-20 17:24:46 Re: Flashing the BF537 Stamp with a New OS
Mike Frysinger (UNITED STATES)
Message: 68165
the HRM of every Blackfin part has a detailed memory map showing the async region, as does every board manual shows what is hooked up to which async bank
QuoteReplyEditDelete
2009-01-20 17:52:27 Re: Flashing the BF537 Stamp with a New OS
David Welch (UNITED STATES)
Message: 68167
That did not really answer my question. I know the flash memory range is 0x20000000 to 0x203FFFFF. I did not want to trash the boot loader. If I bought a new BF-537 Stamp with the 2008R1.5 kernel installed rather than the 1007R1 kernel, what address range would it be located?
Thank you for your help,
-David
QuoteReplyEditDelete
2009-01-21 03:30:16 Re: Flashing the BF537 Stamp with a New OS
Mike Frysinger (UNITED STATES)
Message: 68172
the boot loader only takes up as much space as its actual size. on our platforms, we make sure u-boot never grows beyond 256k. so you're pretty much free to do whatever you like with the rest (keeping in mind the location of the MAC address on the bf537-stamp).