[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] SPI booting
Hi Adam,
Adam Koch wrote:
I have written my own initial SPI bootloader to load code to RAM. What
i'd like to be able to do is also U-boot the kernel from SPI flash.
In PetaLinux we package the u-boot image into a self-relocating binary
blob. FS-boot just jumps to an address in flash memory, and the blob
copies itself to the correct place in RAM and launches u-boot.
Unless you make a tricky memory-like wrapper around the SPI interface
(so you can just read addresses and get memory contents), you'll need a
scheme like Steve describes, whereby your bootloader copies u-boot
word-by-word from the SPI flash into RAM, then jumps to it.
The first thing i tried to change was the flash_memory setting in OS EDK
settings but found it doesn't support xps_spi. What does this setting
do? Can it be set to none?
This is a PetaLinux limitation - You can set the 'flash memory'
parameter to none, however FS-boot and u-boot will complain as they
assume there is flash memory (due to the flash booting scheme I
described above).
You already have your own SPI-capable bootloader by the sound of it, so
you can probably not bother with fs-boot. Or, even better, merge your
SPI reading code into FS-boot and share you changes so we can make it
available to everyone!
Regarding u-boot, you'll have a little work to do (e.g. adding SPI
support to load the kernel image from flash) and so on. But it's mostly
fiddling around the edges, nothing fundamental I don't think, and quite
possibly been done before.
An alternative to all of this is as I hinted earlier, create a
memory-like hardware interface around the SPI controller, so the serial
flash actually just looks like a (slow) memory.
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/