This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Redboot with static IP
- To: 'Gary Thomas' <gthomas at redhat dot com>
- Subject: RE: [ECOS] Redboot with static IP
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Mon, 6 Nov 2000 15:01:33 -0800
- Cc: "Ecos-List (E-mail)" <ecos-discuss at sourceware dot cygnus dot com>
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.
>