This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Missing ethernet support when building RedBoot withoutdriver warnings


On Tue, 2004-02-24 at 14:30, Uwe Kindler wrote:
> Hello,
> 
> I just discovered the following problem. When I build RedBoot (for Renesas
> EDOSK-2674 platform) with Ethernet support and I disable 'Show driver
> warnings' CYGSEM_IO_ETH_DRIVERS_WARN and disable 'Support printig driver
> debug information' CYGDBG_IO_ETH_DRIVERS_DEBUG then there is no ethernet
> support present when booting the board. If I enable one of the two options
> above, then ethernet support is present. I debugged a RedBoot RAM
> application in order to find the problem. I discovered, that the file
> redboot_net_io.o compiled from net_io.c is not linked to the final
> redboot.elf file - that means RedBoot_init(net_init, RedBoot_INIT_LAST); in
> redboot/current/src/net/net_io.c is not active and so ethernet won't be
> initialized.
> 
> As soon as I put the following code:
> 
> int old_console;
> old_console = start_console();
> end_console(old_console);
> 
> into the file eth_drv.c from stand-alone stack, the file redboot_net_io.o is
> linked correctly to the final redboot image. Normally the code above is only
> called if one of the warning options is active. So the file redboot_net_io.o
> is not linked into the final redboot image because there is no single
> function call from outside the file net_io.c which calls a function inside
> net_io.c.
> 
> What should I do in order to force the linking of redboot_net_io.o if
> warning and debug messages are disabled.
> 
> Thank you very much.

Try the attached patch.  If it works for you, I'll commit it.
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: redboot/current/cdl/redboot.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/cdl/redboot.cdl,v
retrieving revision 1.63
diff -u -5 -p -r1.63 redboot.cdl
--- redboot/current/cdl/redboot.cdl	11 Feb 2004 13:40:53 -0000	1.63
+++ redboot/current/cdl/redboot.cdl	24 Feb 2004 22:12:46 -0000
@@ -288,12 +288,12 @@ cdl_package CYGPKG_REDBOOT {
             active_if     CYGPKG_IO_ETH_DRIVERS
             default_value 1
             implements    CYGINT_REDBOOT_LOAD_METHOD
             compile net/bootp.c net/udp.c net/ip.c net/pktbuf.c net/cksum.c
             compile net/enet.c net/icmp.c net/tcp.c net/timers.c net/arp.c
-            compile net/net_io.c net/inet_addr.c
-            compile -library=libextras.a net/ping.c
+            compile net/inet_addr.c
+            compile -library=libextras.a net/ping.c net/net_io.c 
             description "This option includes networking support in RedBoot."
             define_proc {
                 puts $::cdl_system_header "#define CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS 1"
             }
     

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]