public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Redboot network setup
@ 2001-09-13 19:30 Fabrice Gautier
  2001-09-14  0:17 ` Robin Farine
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-13 19:30 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: Ecos-List (E-mail)

> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Subject: Re: [ECOS] Redboot network setup
> 
> There shouldn't be anything needing a timeout on a 
> non-blocking read. In the other ports you're looking at it's only the
non-virtual 
> vector blocking read functions that have these timeouts.

Right,

I think I found another problem which caused Redboot to hang. It seems that
the size of the Ethernet packets are not checked before being used as
arguments for memcopy in eth_drv_read. There is also a "len" argument in
this function which is not used. I did this modification:

Index: eth_drv.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c,v
retrieving revision 1.10
diff -u -r1.10 eth_drv.c
--- eth_drv.c   2001/08/17 16:37:36     1.10
+++ eth_drv.c   2001/09/14 01:59:47
@@ -341,6 +341,10 @@
     msg = eth_drv_msg_get(&eth_msg_full);
     if (msg) {
         memcpy(eth_hdr, msg->data, 14);
+               if(msg->len > len || msg->len < 14){
+                       diag_printf("ETHERNET PACKET ERROR: msg->len <0 or >
len\n");
+                       return 0;
+               }
         memcpy(buf, &msg->data[14], msg->len-14);
         eth_drv_msg_put(&eth_msg_free, msg);
         res = msg->len;


and it seems to works somewhat...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-13 19:30 [ECOS] Redboot network setup Fabrice Gautier
@ 2001-09-14  0:17 ` Robin Farine
  0 siblings, 0 replies; 17+ messages in thread
From: Robin Farine @ 2001-09-14  0:17 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: 'Jonathan Larmour', Ecos-List (E-mail)

Shouldn't the error case call eth_drv_msg_put(&eth_msg_free, msg)?

+               if(msg->len > len || msg->len < 14){
+                   diag_printf("ETHERNET PACKET ERROR: msg->len <0 or > len\n");
+                   eth_drv_msg_put(&eth_msg_free, msg);
+                   return 0;
+               }

Robin

Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> > From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> > Subject: Re: [ECOS] Redboot network setup
> > 
> > There shouldn't be anything needing a timeout on a 
> > non-blocking read. In the other ports you're looking at it's only the
> non-virtual 
> > vector blocking read functions that have these timeouts.
> 
> Right,
> 
> I think I found another problem which caused Redboot to hang. It seems that
> the size of the Ethernet packets are not checked before being used as
> arguments for memcopy in eth_drv_read. There is also a "len" argument in
> this function which is not used. I did this modification:
> 
> Index: eth_drv.c
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c,v
> retrieving revision 1.10
> diff -u -r1.10 eth_drv.c
> --- eth_drv.c   2001/08/17 16:37:36     1.10
> +++ eth_drv.c   2001/09/14 01:59:47
> @@ -341,6 +341,10 @@
>      msg = eth_drv_msg_get(&eth_msg_full);
>      if (msg) {
>          memcpy(eth_hdr, msg->data, 14);
> +               if(msg->len > len || msg->len < 14){
> +                       diag_printf("ETHERNET PACKET ERROR: msg->len <0 or >
> len\n");
> +                       return 0;
> +               }
>          memcpy(buf, &msg->data[14], msg->len-14);
>          eth_drv_msg_put(&eth_msg_free, msg);
>          res = msg->len;
> 
> 
> and it seems to works somewhat...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-20 10:15 Fabrice Gautier
@ 2001-09-20 10:32 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-20 10:32 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: 'Robin Farine', Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> > -----Original Message-----
> > From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> > Subject: Re: [ECOS] Redboot network setup
> >
> >
> > Fabrice Gautier wrote:
> > >
> > > (gdb) load
> > > Loading section .rom_vectors, size 0x40 lma 0x20000
> > >
> > > Error: Remote communication error: Connection reset by peer.
> > >
> >
> > Perhaps it uses more than 0x20000 bytes of RAM. Try updating
> > the RAM MLT
> > file to reserve 0x30000 instead.
> >
> 
> I already update from 0x10000 and according to
> $ arm-elf-size redboot.elf
>    text    data     bss     dec     hex filename
>   74124    1108   40732  115964   1c4fc redboot.elf
> and
> $ arm-elf-objdump -h redboot.elf
> ...
>   12 .data         00000454  00000800  2401218c  00020800  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>  13 .bss          00009f1c  00000c54  00000c54  00000c54  2**4
>                   ALLOC
> 
> this should not be the problem... except if it's using memory outside the
> mempry map....

RAM should go from 0 upwards on all ARM targets or things will almost
certainly break. You can debug the GDB protocol, and see at exactly what
address it goes wrong at, then try writing to that address by hand
yourself.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-20 10:15 Fabrice Gautier
  2001-09-20 10:32 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-20 10:15 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: 'Robin Farine', Ecos-List (E-mail)

> -----Original Message-----
> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Subject: Re: [ECOS] Redboot network setup
> 
> 
> Fabrice Gautier wrote:
> > 
> > (gdb) load
> > Loading section .rom_vectors, size 0x40 lma 0x20000
> > 
> > Error: Remote communication error: Connection reset by peer.
> > 
> 
> Perhaps it uses more than 0x20000 bytes of RAM. Try updating 
> the RAM MLT
> file to reserve 0x30000 instead.
> 

I already update from 0x10000 and according to 
$ arm-elf-size redboot.elf
   text    data     bss     dec     hex filename
  74124    1108   40732  115964   1c4fc redboot.elf
and
$ arm-elf-objdump -h redboot.elf
...
  12 .data         00000454  00000800  2401218c  00020800  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 13 .bss          00009f1c  00000c54  00000c54  00000c54  2**4
                  ALLOC

this should not be the problem... except if it's using memory outside the
mempry map....

Have to check that...

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-19 21:27 Fabrice Gautier
@ 2001-09-20  4:51 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-20  4:51 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: 'Robin Farine', Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> (gdb) load
> Loading section .rom_vectors, size 0x40 lma 0x20000
> 
> Error: Remote communication error: Connection reset by peer.
> 
> I'm not sure what's going on, but may be there is some problem in the
> Integrator HAL i'm  using.

Perhaps it uses more than 0x20000 bytes of RAM. Try updating the RAM MLT
file to reserve 0x30000 instead.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-19 21:27 Fabrice Gautier
  2001-09-20  4:51 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-19 21:27 UTC (permalink / raw)
  To: 'Robin Farine', Fabrice Gautier
  Cc: 'Jonathan Larmour', Ecos-List (E-mail)

> -----Original Message-----
> From: Robin Farine [ mailto:acnrf@dial.eunet.ch ]
> Subject: Re: [ECOS] Redboot network setup
> 
> 
> Shouldn't the error case call eth_drv_msg_put(&eth_msg_free, msg)?
> 
> +               if(msg->len > len || msg->len < 14){
> +                   diag_printf("ETHERNET PACKET ERROR: 
> msg->len <0 or > len\n");
> +                   eth_drv_msg_put(&eth_msg_free, msg);
> +                   return 0;
> +               }
> 
> Robin

Yes probably, i'm not sure, it seems to works better ...somewhat

But anyway I'm still not able to use gdb through TCP/IP. It connects, then I
have a few ETHERNET PACKET ERROR on the serial console. I Try to load but:

(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x20000

Error: Remote communication error: Connection reset by peer.

I'm not sure what's going on, but may be there is some problem in the
Integrator HAL i'm  using.

-- 
Fabrice Gautier
Software Engineer, Sigma Designs
Fabrice_Gautier@sdesigns.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-13 17:10 Fabrice Gautier
@ 2001-09-13 18:13 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-13 18:13 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> > From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> > Subject: Re: [ECOS] Redboot network setup
> > >
> > > Then explain me where does the polling occurs ?
> >
> > net_io_test() is an "idle" function, which calls __tcp_poll().
> >
> > Yes, that should work. Maybe RedBoot is jammed somewhere
> > else, like some other idle function is blocking.
> 
> Now I see. And i think the problem is in cyg_hal_plf_serial_getc_nonblock
> where we can see:
> 
>     long timeout = 1000000000;  // A long time...
> 
> Indeed a long time, for a non blocking function...
> 
> This is in hal_diag.c of the Integrator port but there is the same thing in
> 7 others ports:
> 
> hal\arm\aeb\current\src\hal_diag.c(447):    long timeout = 1000000000;  // A
> long time...
> hal\arm\cma230\current\src\hal_diag.c(526):    long timeout = 1000000000;
> // A long time...
> hal\arm\ebsa285\current\src\hal_diag.c(346):    long timeout = 1000000000;
> // A long time...
> hal\arm\edb7xxx\current\src\hal_diag.c(375):    long timeout = 1000000000;
> // A long time...
> hal\arm\iq80310\current\src\hal_diag.c(524):    long timeout = 1000000000;
> // A long time...
> hal\arm\pid\current\src\hal_diag.c(501):    long timeout = 1000000000;  // A
> long time...
> hal\mips\rm7000\ocelot\current\src\ns16552.c(487):    long timeout =
> 1000000000;  // A long time...
> 
> Does anybody noticed problem with networking on this ports?
> 
> Maybe the timeout is not an issue for some ports but it was for me, if I
> reduce the timeout to 100 it seems to works. But i'm not sure It needs a
> timeout at all....

There shouldn't be anything needing a timeout on a non-blocking read. In
the other ports you're looking at it's only the non-virtual vector blocking
read functions that have these timeouts.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-13 17:10 Fabrice Gautier
  2001-09-13 18:13 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-13 17:10 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: Gary Thomas, Ecos-List (E-mail)

> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Subject: Re: [ECOS] Redboot network setup
> > 
> > Then explain me where does the polling occurs ?
> 
> net_io_test() is an "idle" function, which calls __tcp_poll().
> 
> Yes, that should work. Maybe RedBoot is jammed somewhere 
> else, like some other idle function is blocking.


Now I see. And i think the problem is in cyg_hal_plf_serial_getc_nonblock
where we can see:

    long timeout = 1000000000;  // A long time...

Indeed a long time, for a non blocking function...

This is in hal_diag.c of the Integrator port but there is the same thing in
7 others ports:

hal\arm\aeb\current\src\hal_diag.c(447):    long timeout = 1000000000;  // A
long time...
hal\arm\cma230\current\src\hal_diag.c(526):    long timeout = 1000000000;
// A long time...
hal\arm\ebsa285\current\src\hal_diag.c(346):    long timeout = 1000000000;
// A long time...
hal\arm\edb7xxx\current\src\hal_diag.c(375):    long timeout = 1000000000;
// A long time...
hal\arm\iq80310\current\src\hal_diag.c(524):    long timeout = 1000000000;
// A long time...
hal\arm\pid\current\src\hal_diag.c(501):    long timeout = 1000000000;  // A
long time...
hal\mips\rm7000\ocelot\current\src\ns16552.c(487):    long timeout =
1000000000;  // A long time...

Does anybody noticed problem with networking on this ports?

Maybe the timeout is not an issue for some ports but it was for me, if I
reduce the timeout to 100 it seems to works. But i'm not sure It needs a
timeout at all....

Thanks

-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.com


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-13 16:19 Fabrice Gautier
@ 2001-09-13 16:25 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-13 16:25 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Gary Thomas, Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> > From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> > Subject: Re: [ECOS] Redboot network setup
> >
> >
> > Fabrice Gautier wrote:
> > >
> > > Actually, I'm just trying with redboot, no apps yet.
> > > But are you saying "No, it use interrupts" or "No, it use
> > polling but should
> > > work anyway"
> >
> > The latter.
> 
> Then explain me where does the polling occurs ?

net_io_test() is an "idle" function, which calls __tcp_poll().
 
> I have redbot in flash and I use the ARM debugger and Multi-ICE to debug it.
> I've set a breakpoint in __enet_poll but it's never reached. I know it
> should work: I had it working on x86 last year but I'm lost, ...

Yes, that should work. Maybe RedBoot is jammed somewhere else, like some
other idle function is blocking.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-13 16:19 Fabrice Gautier
  2001-09-13 16:25 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-13 16:19 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: Gary Thomas, Ecos-List (E-mail)

> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Subject: Re: [ECOS] Redboot network setup
> 
> 
> Fabrice Gautier wrote:
> > 
> > Actually, I'm just trying with redboot, no apps yet.
> > But are you saying "No, it use interrupts" or "No, it use 
> polling but should
> > work anyway"
> 
> The latter.

Then explain me where does the polling occurs ?

I have redbot in flash and I use the ARM debugger and Multi-ICE to debug it.
I've set a breakpoint in __enet_poll but it's never reached. I know it
should work: I had it working on x86 last year but I'm lost, ...

Thanks

-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.com


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-13 15:33 Fabrice Gautier
@ 2001-09-13 16:03 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-13 16:03 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Gary Thomas, Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> Actually, I'm just trying with redboot, no apps yet.
> But are you saying "No, it use interrupts" or "No, it use polling but should
> work anyway"

The latter.

> Cause i've seen the net_io_isr function and was wondering if it was
> connected to an interrupt? (Then maybe the interrupt from the Integrator PCI
> bus is not handled correctly )

Nope.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-13 15:33 Fabrice Gautier
  2001-09-13 16:03 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-13 15:33 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: Gary Thomas, Ecos-List (E-mail)

> -----Original Message-----
> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Subject: Re: [ECOS] Redboot network setup
> 
> > Actually, and correct me if I'm wrong, since Redboot 
> > networking is based on
> > polling the ethernet interface, this is quite logical. 
> > Redboot will not by
> > itself poll for ethernet packet until I launch the ping command.
> 
> No, RedBoot should always be able to reply. Even when an 
> application is
> loaded (provided the app supports interworking with RedBoot 
> to allow net debugging).

Actually, I'm just trying with redboot, no apps yet.
But are you saying "No, it use interrupts" or "No, it use polling but should
work anyway" 
Cause i've seen the net_io_isr function and was wondering if it was
connected to an interrupt? (Then maybe the interrupt from the Integrator PCI
bus is not handled correctly ) 

> You aren't on a different subnet or anything? RedBoot can't 
> do routing, not even just through a default gateway.

No, I just have a hub with the 2 machines.

-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-13 12:16 Fabrice Gautier
@ 2001-09-13 14:35 ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-13 14:35 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Gary Thomas, Ecos-List (E-mail)

Fabrice Gautier wrote:
> [patch]

Applied with some minor fixes, thanks!

> Actually, and correct me if I'm wrong, since Redboot networking is based on
> polling the ethernet interface, this is quite logical. Redboot will not by
> itself poll for ethernet packet until I launch the ping command.

No, RedBoot should always be able to reply. Even when an application is
loaded (provided the app supports interworking with RedBoot to allow net
debugging).

You aren't on a different subnet or anything? RedBoot can't do routing, not
even just through a default gateway.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [ECOS] Redboot network setup
@ 2001-09-13 12:16 Fabrice Gautier
  2001-09-13 14:35 ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-13 12:16 UTC (permalink / raw)
  To: 'Jonathan Larmour', Gary Thomas
  Cc: Fabrice Gautier, Ecos-List (E-mail)

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

Patch attached.

And changelog Entry:

2001-09-13  Fabrice Gautier <Fabrice_Gautier@sdesigns.com>

        * cdl/redboot.cdl, src/net_io.c: added configurations options to
deactivate
        BOOTP and to enable net debug.
 

That said i have a few questions about the networking in Redboot because I
have some problem with it. I'm using the ARM Integrator beta port so maybe
the problem is with the ethernet driver.

The problem is when i launch Redboot with static IP adress, I can't ping
redboot from my host. However If I use the ping command in redboot, then, If
i'm lucky i can ping from the host. 

I activated the net_debug options in Redboot and used an ethernet analyzer.
It appears that Redboot never respond to the ARP request from the host.

Actually, and correct me if I'm wrong, since Redboot networking is based on
polling the ethernet interface, this is quite logical. Redboot will not by
itself poll for ethernet packet until I launch the ping command.

The other thing is that once I launched the ping command in redboot, Redboot
seems to dies some times after. I can see the debug output but I don't have
any ping replys (the ethernet analyzer doesn't see any arp or ping request
from redboot, only the ping replys if i'm lucky) 

Also, it appears that I've more luck when I disconnected my host and my
target from the rest of the network. (This is a network with a lot of
windows machine, so there is quite a bit of broadcasts and i guess this
causes more packet lost for Redboot).

To be honest, I'm still wondering how the polling method can works...

-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.com



[-- Attachment #2: redboot.diff --]
[-- Type: text/x-diff, Size: 2572 bytes --]

Index: packages/redboot/current/cdl/redboot.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/cdl/redboot.cdl,v
retrieving revision 1.25
diff -u -r1.25 redboot.cdl
--- redboot.cdl	2001/08/17 16:37:37	1.25
+++ redboot.cdl	2001/09/13 18:51:12
@@ -124,7 +124,16 @@
             puts $::cdl_system_header "#define CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS 1"
         }
 
-        cdl_option CYGDAT_REDBOOT_DEFAULT_IP_ADDR {
+        cdl_option CYGSEM_REDBOOT_NET_DEBUG {
+            display          "Print debug information"
+            flavor           bool
+            default_value    0
+            description      "
+                This option is overriden by the configuration stored in flash.
+				"
+        }
+
+        cdl_component CYGDAT_REDBOOT_DEFAULT_IP_ADDR {
             display          "Default IP address"
             flavor           booldata
             default_value    CYGSEM_REDBOOT_FLASH_CONFIG ? 0 : \
@@ -134,7 +143,20 @@
                 server does not respond. The numbers should be separated by
                 *commas*, and not dots. If an IP address is configured into
                 the Flash configuration, that will be used in preference."
+
+	        cdl_option CYGSEM_REDBOOT_DEFAULT_NO_BOOTP {
+		        display          "Do not try to use BOOTP"
+			    flavor           bool
+				default_value    0
+				requires         CYGDAT_REDBOOT_DEFAULT_IP_ADDR 
+				description      "
+					By default Redboot try to use BOOTP to get an IP address. If there's no
+					BOOTP server on your network use this option to avoid to wait until the
+					timeout. This option is overriden by the configuration stored in flash."
+			}
+
         }
+
 
         cdl_option CYGNUM_REDBOOT_NETWORKING_TCP_PORT {
             display          "TCP port to listen for incoming connections"
Index: packages/redboot/current/src/net/net_io.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/net/net_io.c,v
retrieving revision 1.16
diff -u -r1.16 net_io.c
--- net_io.c	2001/08/10 19:27:58	1.16
+++ net_io.c	2001/09/13 18:51:12
@@ -535,8 +535,8 @@
     cyg_netdevtab_entry_t *t;
 
     // Set defaults as appropriate
-    use_bootp = true;
-    net_debug = false;
+    use_bootp = ! CYGSEM_REDBOOT_DEFAULT_NO_BOOTP;
+    net_debug = CYGSEM_REDBOOT_NET_DEBUG;
     gdb_port = CYGNUM_REDBOOT_NETWORKING_TCP_PORT;
 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
     // Fetch values from saved config data, if available

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-12 17:13 ` Gary Thomas
@ 2001-09-13 11:16   ` Jonathan Larmour
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Larmour @ 2001-09-13 11:16 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Fabrice Gautier, Ecos-List (E-mail)

Gary Thomas wrote:
> 
> On Thu, 2001-09-13 at 09:11, Fabrice Gautier wrote:
> > Hi,
> >
> > I have a few questions about the network setup in redboot.
> >
> > - I can't find a way to deactivate the use of BOOTP for ethernet
> > configuration (except by modifying the code) Did i overlook a cdl option?
> > - I can't find a way to set the server adress. Since I'm not using bootp i
> > need to manual enter it somewhere. Did i missed something ?
> 
> These are set using 'fconfig' data.

More configury would probably be useful here if Fabrice was interested in
writing it. It shouldn't be all that difficult as it's just statically
initializing those variables that are set by the RedBoot config data. See
redboot/current/src/net/net_io.c

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ECOS] Redboot network setup
  2001-09-12 17:04 Fabrice Gautier
@ 2001-09-12 17:13 ` Gary Thomas
  2001-09-13 11:16   ` Jonathan Larmour
  0 siblings, 1 reply; 17+ messages in thread
From: Gary Thomas @ 2001-09-12 17:13 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

On Thu, 2001-09-13 at 09:11, Fabrice Gautier wrote:
> Hi,
> 
> I have a few questions about the network setup in redboot.
> 
> - I can't find a way to deactivate the use of BOOTP for ethernet
> configuration (except by modifying the code) Did i overlook a cdl option?
> - I can't find a way to set the server adress. Since I'm not using bootp i
> need to manual enter it somewhere. Did i missed something ?

These are set using 'fconfig' data.  

Currently, if you don't have FLASH or enable 'fconfig', you get
fixed defaults (BOOTP)

> - Idem for netmask and broadcast adress

RedBoot does not use these.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ECOS] Redboot network setup
@ 2001-09-12 17:04 Fabrice Gautier
  2001-09-12 17:13 ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Fabrice Gautier @ 2001-09-12 17:04 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

I have a few questions about the network setup in redboot.

- I can't find a way to deactivate the use of BOOTP for ethernet
configuration (except by modifying the code) Did i overlook a cdl option?
- I can't find a way to set the server adress. Since I'm not using bootp i
need to manual enter it somewhere. Did i missed something ?
- Idem for netmask and broadcast adress

Thanks
-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-09-20 10:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-13 19:30 [ECOS] Redboot network setup Fabrice Gautier
2001-09-14  0:17 ` Robin Farine
  -- strict thread matches above, loose matches on Subject: below --
2001-09-20 10:15 Fabrice Gautier
2001-09-20 10:32 ` Jonathan Larmour
2001-09-19 21:27 Fabrice Gautier
2001-09-20  4:51 ` Jonathan Larmour
2001-09-13 17:10 Fabrice Gautier
2001-09-13 18:13 ` Jonathan Larmour
2001-09-13 16:19 Fabrice Gautier
2001-09-13 16:25 ` Jonathan Larmour
2001-09-13 15:33 Fabrice Gautier
2001-09-13 16:03 ` Jonathan Larmour
2001-09-13 12:16 Fabrice Gautier
2001-09-13 14:35 ` Jonathan Larmour
2001-09-12 17:04 Fabrice Gautier
2001-09-12 17:13 ` Gary Thomas
2001-09-13 11:16   ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).