Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

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

Altera_Forum
Honored Contributor II
1,082 Views

Hi,  

 

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: 

http://www.alterawiki.com/wiki/dasuboot 

http://www.alterawiki.com/wiki/u-boot_config 

http://www.alterawiki.com/wiki/extrem_guide_to_kill_neek_with_u-boot 

 

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. 

# ifndef CONFIG_SYS_NO_FLASH 

WATCHDOG_RESET(); 

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://git.denx.de/u-boot.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
Altera_Forum
Honored Contributor II
162 Views

jamun001, 

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

http://rocketboards.org/foswiki/view/documentation/niosiilinuxusermanual#building_u_45boot 

 

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