Description
The Nios II boot code is included in the <Nios II installation>\components\altera_nios2\HAL\src and <Nios II installation>\components\altera_hal\HAL\src directories. The boot sequence starts in crt0.s which calls alt_main() which calls main().
For more information on the boot sequence refer to the Nios II Software Developer's Handbook which can be found in the Nios II installation at <Nios II installation</documents/n2sw_nii5v2.pdf and on the Altera web site at http://www.altera.com/literature/lit-nio2.jsp.