Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Boot u-boot form SPI flash

Altera_Forum
Honored Contributor II
1,304 Views

Hi All, 

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

 

Best Regards,
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
491 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
491 Views

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...
0 Kudos
Altera_Forum
Honored Contributor II
491 Views

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
0 Kudos
Reply