FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
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.
5288 Discussions

U-boot for NIOS-II Cyclone-II​I (EP3C40F78​0I7)- compilation error

Altera_Forum
Honored Contributor II
856 Views

Hi , 

 

I need to port the U-boot (1.3.3) to NIOS-II Cyclone-III (EP3C40F780I7) based customized board. Started following the Altera wiki http://www.alterawiki.com/wiki/dasuboot instructions. 

 

1) Generated the my_nios2_fpga.h from sopc file. 

2) Copied the relevant nios2_generic files. 

3) Used the installed tool chain " nios2-linux-uclibc-" for compilation. 

4) Using U-buntu linux distribution for u-boot compilation. 

 

Following compilation errors are coming during U-boot compilation: 

 

u-boot-1.3.3$ make clean 

u-boot-1.3.3$ export CROSS_COMPILE=/opt/nios2/bin/nios2-linux-uclibc- 

u-boot-1.3.3$ make my_nios2_config 

Configuring for my_nios2 board... 

u-boot-1.3.3$ make 

Generating include/autoconf.mk.dep 

for dir in tools examples api_examples ; do make -C $dir _depend ; done 

make[1]: Entering directory `/home/borelas/u-boot-1.3.3/tools' 

make[1]: Nothing to be done for `_depend'. 

make[1]: Leaving directory `/home/borelas/u-boot-1.3.3/tools' 

make[1]: Entering directory `/home/borelas/u-boot-1.3.3/examples' 

make[1]: Nothing to be done for `_depend'. 

make[1]: Leaving directory `/home/borelas/u-boot-1.3.3/examples' 

make[1]: Entering directory `/home/borelas/u-boot-1.3.3/api_examples' 

make[1]: Nothing to be done for `_depend'. 

make[1]: Leaving directory `/home/borelas/u-boot-1.3.3/api_examples' 

Generating include/autoconf.mk 

make -C tools all 

make[1]: Entering directory `/home/borelas/u-boot-1.3.3/tools' 

gcc -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c 

gcc -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -o img2srec img2srec.o 

strip img2srec 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o mkimage.o mkimage.c 

gcc -g -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o crc32.o crc32.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o image.o image.c 

gcc -g -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o md5.o md5.c 

gcc -g -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o sha1.o sha1.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o fdt.o fdt.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o fdt_ro.o fdt_ro.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o fdt_rw.o fdt_rw.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o fdt_strerror.o fdt_strerror.c 

gcc -g -Wall -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o fdt_wip.o fdt_wip.c 

gcc -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -o mkimage mkimage.o crc32.o image.o md5.o sha1.o fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o 

strip mkimage 

gcc -g -Wall -pedantic -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -O -c -o envcrc.o envcrc.c 

gcc -g -idirafter /home/borelas/u-boot-1.3.3/include -idirafter /home/borelas/u-boot-1.3.3/include2 -idirafter /home/borelas/u-boot-1.3.3/include -DTEXT_BASE= -DUSE_HOSTCC -c -o environment.o environment.c 

In file included from environment.c:32: 

/home/borelas/u-boot-1.3.3/include/environment.h:107: error: ‘CFG_ENV_SIZE’ undeclared here (not in a function) 

make[1]: *** [environment.o] Error 1 

make[1]: Leaving directory `/home/borelas/u-boot-1.3.3/tools' 

make: *** [tools] Error 2 

 

 

Any inputs to resolve these error? 

 

Thanks, 

Siva
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
121 Views

Hi, 

 

U-boot 1.3.3 does not have nios2-generic approach. Starting from U-boot V2010.12 , it supports the nios2-generic approach. with this I could able to compile and download the U-boot. 

 

Still i have some issues with ethernet. Post more once i will resolve. 

 

Thanks, 

Siva
Reply