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++
12595 Discussions

u-boot compiling problems custom NIOSII based board using cyclone III

Honored Contributor II



I could not find a specific forum for u-boot on NIOSII so i hope this is a good place to start.  


I have a custom board that uses the Cyclone III FPGA that is running uClinux 2.6.38. I am trying to build and install u-boot so that i can eventually boot from SD card. At this moment, the board boots from zImage stored in EPCS memory. 


I read through the instructions in the following tutorials available through alterawiki: 


Unfortunately, after following the instructions in DasUBoot link above, i get several errors when i run the "make clean; make my_nios2_config; make" commands. Below are some of the messages i get: 


arch/nios2/lib/libnios2.o: In function `board_init': 

/home/ja2/u-boot/arch/nios2/lib/board.c:127: undefined reference to `flash_init' 

/home/ja2/u-boot/arch/nios2/lib/board.c:127: relocation truncated to fit: R_NIOS2_CALL26 against `flash_init' 

common/libcommon.o: In function `flash_sect_roundb': 

/home/ja2/u-boot/common/cmd_flash.c:113: undefined reference to `flash_info' 

/home/ja2/u-boot/common/cmd_flash.c:113: undefined reference to `flash_info' 

common/libcommon.o: In function `flash_fill_sect_ranges': 



It all seems to be related to the flash.c file in the "boards/altera/common/" directory. This file does not have any "flash_init" function as other "flash.c" files located under other "boards" directories do. The line of code in "board.c" (line 127) that throws the error about "flash_init" (second error line in the error message above) is part of a section of code that depends on CONFIG_SYS_NO_FLASH -- see below. 



bd->bi_flashsize = flash_init();# endif 



I, however, need Flash so cannot disable this section of code by defining CONFIG_SYS_NO_FLASH. My first question is:  


is Flash use supported by Altera's NIOSII processor? If so, how can i get around this problem? how can something so basic not be implemented in the flash.c file and how can other people compile u-boot for NIOSII??? 


It is hard for me to believe that Flash is not supported by Altera with u-boot but i cannot understand how other people have been able to compile u-boot for Altera's development boards without having this problem... 


I obtained my copy of u-boot by performing the following: 



git clone -n git:// 


cd u-boot 

git fetch origingit checkout -b my_nios2 origin/master 

I thank you in advance for your help, please let me know how to successfully compile u-boot
0 Kudos
1 Reply
Honored Contributor II


Did you ever resolve this? I'm using the Rocket boards instructions 


and getting this error (plus some others). Undefined reference 'u_boot_hus_start' , 'default_serial_console' ,'write_buff', and others.
0 Kudos