[uClinux-dev] FTP Server on the 5272 board

Rene Gegusch rgegusch at mf.tu-berlin.de
Wed Mar 19 05:03:01 EST 2003


I tried to add the definition of fec_hwp to the uC5272 define part in line 97 
(fec.c) by copying the first definition of the M5272 into it.
	//Adding to avoid error of missing declaration of fec_hwp
	static volatile fec_t *fec_hwp = (volatile fec_t *) (MCF_MBAR + 0x840);

This time there was following error:
fec.c: In function `fec_set_mac_address':
fec.c:1572: `my_enet_addr' undeclared (first use in this function)
fec.c:1572: (Each undeclared identifier is reported only once
fec.c:1572: for each function it appears in.)
fec.c: In function `fec_enet_init':
fec.c:1654: `my_enet_addr' undeclared (first use in this function)
fec.c:1593: warning: `eap' might be used uninitialized in this function
fec.c: In function `fec_restart':
fec.c:1939: `my_enet_addr' undeclared (first use in this function)
fec.c:1910: warning: `eap' might be used uninitialized in this function
make[4]: *** [fec.o] Fehler 1

Looks like there are now all other variables missing, declarded under M5272, 
but not in uC5272... :(
I would like to add those easily into it, but because I do not really know for 
what they are it would be only poor hacking. I didn't really wanted to do 
this!

this is what I finally add in line 98:
	//Adding to avoid error of missing declaration of fec_hwp and my_enet_hddr[3]
	static volatile fec_t *fec_hwp = (volatile fec_t *) (MCF_MBAR + 0x840);
	static ushort my_enet_addr[3];

fec.c compiled now with no errors, but another module didn't accepted my 
hackings... (what a surprise)
Take a look at this:

In file included from uCcs8900.c:69:
/home/rgegusch/test/coldfire/uClinux-dist-patched/linux-2.4.x/include/linux/malloc.h:4: 
warning: #warning linux/malloc.h is deprecated, use linux/slab.h instead.
uCcs8900.c:318: #error MAC address is not defined
uCcs8900.c:111: warning: `cs8900_irq_map' defined but not used
uCcs8900.c:652: warning: `cs8900_interrupt' defined but not used
make[4]: *** [uCcs8900.o] Fehler 1


Regards,
Rene


Am Dienstag, 18. März 2003 01:34 schrieb Greg Ungerer:
> Hi Rene,
>
> Rene Gegusch wrote:
> > make dep went on without any errors, but make gave me this error:
> > m68k-elf-gcc -fno-builtin -nostdinc -D__KERNEL__
> > -I/home/rgegusch/test/coldfire/uClinux-dist-patched/linux-2.4.x/include
> > -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
> > -fno-common -fomit-frame-pointer
> > -I/usr/local/lib/gcc-lib/m68k-elf/2.95.3/./include -pipe -DNO_MM -DNO_FPU
> > -m5307 -Wa,-S -Wa,-m5307 -D__ELF__ -DMAGIC_ROM_PTR
> > -DUTS_SYSNAME="uClinux" -D__linux__ -O1   -nostdinc -iwithprefix include
> > -DKBUILD_BASENAME=fec  -c -o fec.o fec.c
> > fec.c: In function `fec_enet_init':
> > fec.c:1676: `fec_hwaddr' undeclared (first use in this function)
> > fec.c:1676: (Each undeclared identifier is reported only once
> > fec.c:1676: for each function it appears in.)
>
> OK, this looks like a real bug in the current fec.c driver.
>
> Change lines 96-104 to be:
>
>      #if defined(CONFIG_BOARD_UC5272)
>      unsigned char    fec_hwaddr[6] = { 0x00, 0xd0, 0xcf, 0x00, 0x00,
> 0x72 };
>      #elif defined(CONFIG_M5272)
>      static volatile fec_t   *fec_hwp = (volatile fec_t *) (MCF_MBAR +
> 0x840);
>      static ushort           my_enet_addr[] = { 0x00d0, 0xcf00, 0x0072 };
>      #else
>      static volatile fec_t   *fec_hwp = &(((immap_t
> *)IMAP_ADDR)->im_cpm.cp_fec)
>      static ushort           my_enet_addr[3];
>      #endif /* CONFIG_M5272 */
>
> This is probably not exactly what Arcturus intended here, since
> it is hard coding the MAC address. But it should get you compiling,
> and it will work on a single unit.
>
> Regards
> Greg
>
>
> ------------------------------------------------------------------------
> Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
> SnapGear Pty Ltd                               PHONE:    +61 7 3435 2888
> 825 Stanley St,                                  FAX:    +61 7 3891 3630
> Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org





More information about the uClinux-dev mailing list