I am working with nios2-linux on a self designed ep3c80 board these days.I followed almost everything said by alterawiki, but linux always hangs after a single line "uncompressing linux... OK, booting the kernel." showed, no matter what I changed in kernel configurations or sopc system, it never truns me on... Yesterday, one of my scrupulous student found some big bugs in xxx_fpga.h which was generated by sopc-create-header-files utility. They are 4 macro definitions:
#define FAST_TLB_MISS_EXCEPTION_ADDR 0x0 # define EXCEPTION_ADDR 0x0 # define RESET_ADDR 0x0 # define BREAK_ADDR 0x0They are obviously errors! Problem solved after I changed them to:
#define FAST_TLB_MISS_EXCEPTION_ADDR <on_chip_mem addr + 0xc0000000> # define EXCEPTION_ADDR <sdram addr + 0xc0000020> # define RESET_ADDR <epcs addr(no cfi on my board) + 0xc0000000> # define BREAK_ADDR <jtga_debug_module addr + 0xc0000020>It seems to be a bug of sopc-create-header-files utility in quartus 11.0. I don't know whether it has been fixed in recent sp. Guys working with nios2-linux and quartus 11.0, Please Pay Attention!!!
Yes, this is a known problem and has been reported to Altera.On a side note: You don't need to use the sopc-create-header-files method anymore with more recent versions of Linux. Instead you can use sopc2dts to generate a Devicetree source file and then pass it to your kernel, see http://alterawiki.com/wiki/devicetree for details.