public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Redboot with static IP
@ 2000-11-06 15:02 Fabrice Gautier
  2000-11-10  4:39 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Gautier @ 2000-11-06 15:02 UTC (permalink / raw)
  To: 'Gary Thomas'; +Cc: Ecos-List (E-mail)

Hi

I've finaly made this patch for redboot IP configuration.
It adds configurations options for local and server ip adresses.
I think that if there is a configuration stored in flash its override the
default adresses set with this new options, but I didn't test it on any
platform with flash.

There is also a few correction for some "displays" in the redboot cdl

Thanks


Index: redboot/current/cdl/redboot.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/cdl/redboot.cdl,v
retrieving revision 1.6
diff -u -w -r1.6 redboot.cdl
--- redboot.cdl	2000/10/31 20:53:13	1.6
+++ redboot.cdl	2000/11/06 22:54:33
@@ -63,6 +63,7 @@
         requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
 
         cdl_option CYGBLD_BUILD_REDBOOT_WITH_THREADS {
+	    display "Enable thread debugging"
             no_define
             active_if { CYG_HAL_STARTUP != "RAM" }
             requires  CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
@@ -89,7 +90,7 @@
     }
 
     cdl_component CYGPKG_REDBOOT_NETWORKING {
-        display       "Build Redboot ROM binary image"
+        display       "Redboot network support"
         flavor        bool
         active_if     CYGPKG_IO_ETH_DRIVERS
         default_value 1
@@ -101,6 +102,30 @@
             puts $::cdl_system_header "#define
CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS 1"
         }
 
+	cdl_component CYGPKG_REDBOOT_NETWORKING_ADDRS {
+	    display          "Static addresses configuration"
+	    flavor           bool
+	    default_value    0
+	    description      "
+	       Use this option to configure default IP adresses manually.
RedBoot
+	       will attempt to use BOOTP if this option is not used. Flash
stored
+	       configuration may override these default settings."
+	     
+	    cdl_option CYGDAT_REDBOOT_NETWORKING_ADDRS_LOCAL {
+	        display          "Local IP adress"
+	        flavor           data
+	        default_value    { "192.168.1.1" }
+	        description      "IP address of the target"
+            }
+
+	    cdl_option CYGDAT_REDBOOT_NETWORKING_ADDRS_SERVER {
+	        display          "Server IP adress"
+	        flavor           data
+	        default_value    { "192.168.1.2" }
+	        description      "IP address of the TFTP server used to
download files"
+            }				    		
+	}
+	       
         cdl_option CYGNUM_REDBOOT_NETWORKING_TCP_PORT {
             display          "TCP port to listen for incoming connections"
             flavor           data
Index: redboot/current/src/net/net_io.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/net/net_io.c,v
retrieving revision 1.4
diff -u -w -r1.4 net_io.c
--- net_io.c	2000/10/31 20:53:15	1.4
+++ net_io.c	2000/11/06 22:54:33
@@ -451,6 +451,9 @@
 
 RedBoot_init(net_init, RedBoot_INIT_LAST);
 
+#define _string(s) #s
+#define string(s) _string(s)
+
 void
 net_init(void)
 {
@@ -461,6 +464,13 @@
         use_bootp = true;
         net_debug = false;
         gdb_port = CYGNUM_REDBOOT_NETWORKING_TCP_PORT;
+	
+#ifdef CYGPKG_REDBOOT_NETWORKING_ADDRS // manual static config
+	use_bootp=false;
+
inet_aton(string(CYGDAT_REDBOOT_NETWORKING_ADDRS_LOCAL),&__local_ip_addr);
+
inet_aton(string(CYGDAT_REDBOOT_NETWORKING_ADDRS_SERVER),&my_bootp_info.bp_s
iaddr.s_addr);
+#endif
+
 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
     } else {
         flash_get_config("net_debug", &net_debug, CONFIG_BOOL);



-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

> -----Original Message-----
> From: Gary Thomas [ mailto:gthomas@redhat.com ]
> Sent: Thursday, October 12, 2000 4:54 PM
> To: Fabrice Gautier
> Cc: Ecos-List (E-mail)
> Subject: RE: [ECOS] Redboot with static IP
> 
> 
> 
> On 12-Oct-2000 Fabrice Gautier wrote:
> > Hi,
> > 
> > Is it possible to assign a static IP when using redboot ? 
> > 
> > The ethernet driver worked well with full DHCP but it 
> doesn't work with the
> > redboot bootp.
> > 
> 
> The short answer is "yes".  However, it might not work so easily for
> you.  The support static network setups, including the IP address, you
> need to include flash support in RedBoot.  I doubt that this will be
> immediately available for you on the PC.
> 
> However, you might be able to look into the code in RedBoot 
> that handles
> this and see how to make it work without the flash stuff present.
> 

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

* RE: [ECOS] Redboot with static IP
  2000-11-06 15:02 [ECOS] Redboot with static IP Fabrice Gautier
@ 2000-11-10  4:39 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2000-11-10  4:39 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

Thanks for this feedback.  I plan to integrate your changes into the 
RedBoot sources soon (and give you credit as appropriate).

On 06-Nov-2000 Fabrice Gautier wrote:
> Hi
> 
> I've finaly made this patch for redboot IP configuration.
> It adds configurations options for local and server ip adresses.
> I think that if there is a configuration stored in flash its override the
> default adresses set with this new options, but I didn't test it on any
> platform with flash.
> 
> There is also a few correction for some "displays" in the redboot cdl
> 

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

* RE: [ECOS] Redboot with static IP
  2000-10-12 15:51 Fabrice Gautier
@ 2000-10-12 16:45 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2000-10-12 16:45 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

On 12-Oct-2000 Fabrice Gautier wrote:
> Hi,
> 
> Is it possible to assign a static IP when using redboot ? 
> 
> The ethernet driver worked well with full DHCP but it doesn't work with the
> redboot bootp.
> 

The short answer is "yes".  However, it might not work so easily for
you.  The support static network setups, including the IP address, you
need to include flash support in RedBoot.  I doubt that this will be
immediately available for you on the PC.

However, you might be able to look into the code in RedBoot that handles
this and see how to make it work without the flash stuff present.

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

* [ECOS] Redboot with static IP
@ 2000-10-12 15:51 Fabrice Gautier
  2000-10-12 16:45 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Gautier @ 2000-10-12 15:51 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

Is it possible to assign a static IP when using redboot ? 

The ethernet driver worked well with full DHCP but it doesn't work with the
redboot bootp.

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

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

end of thread, other threads:[~2000-11-10  4:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-06 15:02 [ECOS] Redboot with static IP Fabrice Gautier
2000-11-10  4:39 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2000-10-12 15:51 Fabrice Gautier
2000-10-12 16:45 ` Gary Thomas

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).