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

Compiling Error when adding ethernet into kernel

Altera_Forum
Honored Contributor II
1,403 Views

Hi, 

I am going to develop ethernet applications with Nios2 and uClinux on CYCLONE_EVAL_1C12. After adding the ethernet module according to NIOSWIKI, the kernel compiling failed.  

 

Could anybody do me a favor to figure it out? Thank you very much. 

 

The following is my work flow : 

 

HOST COMPUTER: openSUSE linux 

BOARD: niosII_cyclone_eval_1c12/verilog/standard/standard_1c12.ptf (I use altera's example directly) 

# set target ptf (if not, the customization of kernerl would fail. so I performed this step) 

make vendor_hwselect SYSPTF=~/uClinux-dist/standard_1c12.ptf 

# configure linux kernel 

make menuconfig # I set all others according to NIOSWIKI except the ethernet driver where I  

# chose MORETHANIP_10M_100M 

# set target ptf again 

make vendor_hwselect SYSPTF=~/uClinux-dist/standard_1c12.ptf 

# make kernel and applications 

make romfs # error, ignored according to NIOSWIKI 

make # error, ignored according to NIOSWIKI 

make# there are still lots errors as the following: 

 

arch/nios2nommu/kernel/setup.c: In function `setup_arch': 

arch/nios2nommu/kernel/setup.c:230: error: `na_mtip_mac_control_port' undeclared (first use in this function) 

arch/nios2nommu/kernel/setup.c:230: error: (Each undeclared identifier is reported only once 

arch/nios2nommu/kernel/setup.c:230: error: for each function it appears in.) 

arch/nios2nommu/kernel/setup.c:325: warning: implicit declaration of function `paging_init' 

make[2]: *** [arch/nios2nommu/kernel/setup.o] Error 1 

make[2]: *** Waiting for unfinished jobs.... 

CC arch/nios2nommu/mm/memory.o 

CC arch/nios2nommu/mm/dma-noncoherent.o 

make[1]: *** [arch/nios2nommu/kernel] Error 2 

make[1]: *** Waiting for unfinished jobs.... 

LD arch/nios2nommu/mm/built-in.o 

make[1]: Leaving directory `/home/yongping/uClinux-dist/linux-2.6.x' 

make: *** [linux] Error 1 

 

It seems that some header file is missed. I am not familiar with linux system. 

 

Thank you.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
624 Views

Please check your mtip port address defs in linux-2.6.x/include/nios2_system.h . 

try modify the define of na_mtip_mac_control_port in setup.c. 

you may need to check drivers/net/Space.c and mtip1000.c. 

 

I have never tested these drivers. Please forward the patches to the wiki when you work through. 

 

It is nice to see your joint. 

Cheer. 

 

Hippo
0 Kudos
Reply