Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Boot u-boot form SPI flash

Hi All,

Does anyone know how to boot u-boot form SPI flash memory?

Best Regards,

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi posix6973,

    > Does anyone know how to boot u-boot form SPI flash memory?

    You need to write your own "bootloader bootloader" ;-)

    As long as you load the u-boot binary to a 32-bit aligned memory address that is

    above (or equal to) its actual run-time address, u-boot will relocate itself and the

    exception trampoline as needed.

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I think 2 boot procedures are needed.

    1,altera's default EPCS bootloader copy uboot from epcs to sdram.

    2,uboot runs, and then boot other application such as linux...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    AFAIK, while uboot does offer some nice features, it is possible to directly boot the image generated by the uCLinux "make" system. I planned to do this with the no-MMU version. That seemed to be standard; I don't know if this is not a recommended with the MMU version of the system.

    I understand that the "hardware" generates a standard executable Avalon bus memory (EPCS) from the SPI flash. The CPU starts there and copies the compressed image, which is created by the "make" system and includes the root file system, into RAM. This image is started and compresses itself and the root file system and starts the Kernel.

    Moreover I planned to use the same SPI flash that the FPGA uses to draw it's hardware design from, to also hold the miniature EPCS "booter" (i.e. copier) and the compressed Image. I did not try this yet but IMHO it _should_ work.

    -Michael