* [ECOS] Patch not start network device
@ 2007-06-08 9:10 Manfred Gruber
2007-06-08 12:56 ` Manfred Gruber
0 siblings, 1 reply; 3+ messages in thread
From: Manfred Gruber @ 2007-06-08 9:10 UTC (permalink / raw)
To: ecos-discuss
Hi !
I have done a small patch to not switch on ethernet if ip is 0.0.0.0 and bootp
is false in redboot. This speeds up my boot process.
Index: ecos/packages/redboot/current/src/net/net_io.c
===================================================================
--- ecos.orig/packages/redboot/current/src/net/net_io.c
+++ ecos/packages/redboot/current/src/net/net_io.c
@@ -701,6 +701,12 @@ net_init(void)
#endif
}
#endif
+ /* not start network if ip address is set to 0.0.0.0 and bootp is
switched off */
+ if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
+ __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0 && (use_bootp ==
false)) {
+ diag_printf("Not starting network, bootp is false and IP is 0.0.0.0!
\n");
+ return;
+ }
# ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
// Don't override if the user has deliberately set something more
// verbose.
what do you think about that, the patch is against flash_v2 branch ?
regards
--
Manfred Gruber
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Patch not start network device
2007-06-08 9:10 [ECOS] Patch not start network device Manfred Gruber
@ 2007-06-08 12:56 ` Manfred Gruber
2007-06-08 13:17 ` Gary Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Manfred Gruber @ 2007-06-08 12:56 UTC (permalink / raw)
To: ecos-discuss
Hi !
Ok I found out it is better to do such things in the network driver, not
generic..
regards manfred
Am Donnerstag, 7. Juni 2007 19:02 schrieb Manfred Gruber:
> Hi !
>
> I have done a small patch to not switch on ethernet if ip is 0.0.0.0 and
> bootp is false in redboot. This speeds up my boot process.
>
> Index: ecos/packages/redboot/current/src/net/net_io.c
> ===================================================================
> --- ecos.orig/packages/redboot/current/src/net/net_io.c
> +++ ecos/packages/redboot/current/src/net/net_io.c
> @@ -701,6 +701,12 @@ net_init(void)
> #endif
> }
> #endif
> + /* not start network if ip address is set to 0.0.0.0 and bootp is
> switched off */
> + if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
> + __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0 && (use_bootp ==
> false)) {
> + diag_printf("Not starting network, bootp is false and IP is
> 0.0.0.0! \n");
> + return;
> + }
> # ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
> // Don't override if the user has deliberately set something more
> // verbose.
>
> what do you think about that, the patch is against flash_v2 branch ?
>
> regards
> --
> Manfred Gruber
--
mfg
Manfred Gruber
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Patch not start network device
2007-06-08 12:56 ` Manfred Gruber
@ 2007-06-08 13:17 ` Gary Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Gary Thomas @ 2007-06-08 13:17 UTC (permalink / raw)
To: Manfred Gruber; +Cc: ecos-discuss
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Manfred Gruber wrote:
> Hi !
>
> Ok I found out it is better to do such things in the network driver, not
> generic..
Which network driver?
I would think that generic is better. In fact, I think that an even
better solution would be to have an fconfig setting which enables
networking.
>
> regards manfred
>
> Am Donnerstag, 7. Juni 2007 19:02 schrieb Manfred Gruber:
>> Hi !
>>
>> I have done a small patch to not switch on ethernet if ip is 0.0.0.0 and
>> bootp is false in redboot. This speeds up my boot process.
>>
>> Index: ecos/packages/redboot/current/src/net/net_io.c
>> ===================================================================
>> --- ecos.orig/packages/redboot/current/src/net/net_io.c
>> +++ ecos/packages/redboot/current/src/net/net_io.c
>> @@ -701,6 +701,12 @@ net_init(void)
>> #endif
>> }
>> #endif
>> + /* not start network if ip address is set to 0.0.0.0 and bootp is
>> switched off */
>> + if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
>> + __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0 && (use_bootp ==
>> false)) {
>> + diag_printf("Not starting network, bootp is false and IP is
>> 0.0.0.0! \n");
>> + return;
>> + }
>> # ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
>> // Don't override if the user has deliberately set something more
>> // verbose.
>>
>> what do you think about that, the patch is against flash_v2 branch ?
>>
>> regards
>> --
>> Manfred Gruber
>
- --
- ------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGaTaSmaKbSsQGV8ARAjsHAKCV/QU7jl7FN5JO3lbdgJOFUUc0agCfXUrJ
fGQXUG1jCeqj16zUpPhuk0I=
=QuKz
-----END PGP SIGNATURE-----
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-08 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 9:10 [ECOS] Patch not start network device Manfred Gruber
2007-06-08 12:56 ` Manfred Gruber
2007-06-08 13:17 ` 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).