Mercurial > ecos
changeset 2339:9a2aea4e184a
* 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.
| author | jlarmour |
|---|---|
| date | Tue, 19 Dec 2006 03:11:41 +0000 |
| parents | 429abd93c92a |
| children | a47155ebc83f |
| files | packages/redboot/current/ChangeLog packages/redboot/current/cdl/redboot.cdl packages/redboot/current/src/net/net_io.c |
| diffstat | 3 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,19 @@ +2006-11-28 David Fernandez <dfernandez@cct.co.uk> + + * 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 <lunn@laptop.lunn.ch> * src/load.c: Only call valid_address() if
--- 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."
--- 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 } }
