New FLASH configuration option for network support
Uwe Kindler
ukindler@htwm.de
Tue Jan 6 21:12:00 GMT 2004
Hello,
when a RedBoot configuration supports network connection, it sends some
packet at startup to ensure that IP address is not in use. When the board is
not connected to a network, this procdure needs a quite long time - for the
EDOSK-2674 board this means that a startup with network support but without
a network connection last several seconds. This is quite annoying especialy
when debugging a application where the board needs to be reset quite often.
Because network support is not needed if the board is currently not
connected to a network I would like to suggest the following patch which
enables flash configuration of network support - the patch is tested for
EDOSK-2674 board and works well.
Regards, Uwe
eCos port for Renesas EDOSK-2674
http://www.htwm.de/ukindler/ecos
Index: redboot/current/include/redboot.h
===================================================================
--- old/redboot.h 2003-10-15 17:52:04.000000000 +0200
+++ redboot.h 2004-01-06 20:19:38.000000000 +0100
@@ -111,6 +111,7 @@
EXTERN bootp_header_t my_bootp_info;
EXTERN int gdb_port;
EXTERN bool net_debug;
+EXTERN bool net_active;
#endif
#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
Index: redboot/current/src/net/net_io.c
===================================================================
--- old/net_io.c 2003-10-09 22:23:36.000000000 +0200
+++ net_io.c 2004-01-06 20:21:22.000000000 +0100
@@ -75,6 +75,12 @@
CONFIG_BOOL,
false
);
+RedBoot_config_option("Network support active",
+ net_active,
+ ALWAYS_ENABLED, true,
+ CONFIG_BOOL,
+ true
+ );
#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
RedBoot_config_option("Default network device",
net_device,
@@ -684,14 +690,22 @@
net_debug = false;
#endif
gdb_port = CYGNUM_REDBOOT_NETWORKING_TCP_PORT;
+ net_active = true;
#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
// Fetch values from saved config data, if available
#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
flash_get_config("net_device", &default_devname, CONFIG_NETPORT);
#endif
flash_get_config("net_debug", &net_debug, CONFIG_BOOL);
+ flash_get_config("net_active", &net_active, CONFIG_BOOL);
flash_get_config("gdb_port", &gdb_port, CONFIG_INT);
flash_get_config("bootp", &use_bootp, CONFIG_BOOL);
+ //
+ // stop initialization if user does not need network interface
+ //
+ if (!net_active) {
+ return;
+ }
if (!use_bootp) {
flash_get_IP("bootp_my_ip", &__local_ip_addr);
#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
More information about the Ecos-patches
mailing list