# HG changeset patch # User jlarmour # Date 1166497901 0 # Node ID 9a2aea4e184adcc10b93287a7e635270d6e29320 # Parent 429abd93c92a61f8544a4ac84209f39787331404 * cdl/redboot.cdl: Modified to change the option CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE to make it independent of CYGSEM_REDBOOT_FLASH_CONFIG, changes in net_io.c will allow to specify a default interface in terms of the name and its position in the table of interfaces for the driver. * src/net/net_io.c: Modified to allow CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE to be used even with no flash available. Bug regarding CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE fixed, so that when working with several network interfaces, and the default one fails to initialize, only the first successfully initialized one is used. diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,19 @@ +2006-11-28 David Fernandez + + * cdl/redboot.cdl: Modified to change the option + CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE to make it independent of + CYGSEM_REDBOOT_FLASH_CONFIG, changes in net_io.c will allow to + specify a default interface in terms of the name and its position + in the table of interfaces for the driver. + + * src/net/net_io.c: Modified to allow + CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE to be used even with no flash + available. + Bug regarding CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE fixed, so that + when working with several network interfaces, and the default one + fails to initialize, only the first successfully initialized one is + used. + 2006-11-19 Andrew Lunn * src/load.c: Only call valid_address() if diff --git a/packages/redboot/current/cdl/redboot.cdl b/packages/redboot/current/cdl/redboot.cdl --- a/packages/redboot/current/cdl/redboot.cdl +++ b/packages/redboot/current/cdl/redboot.cdl @@ -527,7 +527,7 @@ cdl_package CYGPKG_REDBOOT { cdl_option CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE { display "Default network device driver" flavor data - active_if { CYGSEM_REDBOOT_FLASH_CONFIG && CYGHWR_NET_DRIVERS > 1 } + active_if { CYGHWR_NET_DRIVERS > 1 } default_value { "\"\"" } description " This is the name of the default network device to use." diff --git a/packages/redboot/current/src/net/net_io.c b/packages/redboot/current/src/net/net_io.c --- a/packages/redboot/current/src/net/net_io.c +++ b/packages/redboot/current/src/net/net_io.c @@ -683,7 +683,7 @@ net_init(void) unsigned index; struct eth_drv_sc *primary_net = (struct eth_drv_sc *)0; #if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1) - char *default_devname; + char *default_devname = CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE; int default_index; #endif #ifdef CYGDAT_REDBOOT_DEFAULT_BOOTP_SERVER_IP_ADDR @@ -740,7 +740,7 @@ net_init(void) primary_net = __local_enet_sc; } else #endif -#endif +#endif // (CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1) for (index = 0; (t = net_devtab_entry(index)) != NULL; index++) { #ifdef CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE if (index == default_index) @@ -752,9 +752,13 @@ net_init(void) primary_net = __local_enet_sc; } #if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1) +# ifdef CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE + break; +# else if (index == default_index) { primary_net = __local_enet_sc; } +# endif // CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE #endif } }