[U-Boot] exit(-1) function in U-Boot
Drasko DRASKOVIC
drasko.draskovic at gmail.com
Tue Mar 17 14:38:00 CET 2009
Hi Wolfgang,
>Instead of vague descriptions like "something is wrong within TFTP"
>or "it breaks" you could try and post the exact commands you're
>trying and the exact error messages you are seing,
I am sorry for being vague, I hope this example will make it a bit more
clear:
static void
TftpTimeout (void)
{
if (++TftpTimeoutCount > TIMEOUT_COUNT) {
puts ("\nRetry count exceeded; timeout error\n");
if (image_valid == 0)
{
/*
* We have no valid Linux image anymore!
* We must start update again!
*/
NetStartAgain ();
}
* else /* last image is not corrupted, I want to boot it */
{
/* LET ME OUT! I do not want to go back to net.c caller,
bacause I do not know how to tell him it was TIMEOUT.
All I can do is NetState = NETLOOP_FAIL. Not much of an
info. */
printf("TIMEOUT error\n");
exit (-1);
}*
} else {
puts ("T ");
NetSetTimeout (TIMEOUT * CFG_HZ, TftpTimeout);
TftpSend ();
}
}
>including information which version of U-Boot you are running
u-boot-1.1.6
>and on which platform.
ARM9
Best regards,
Drasko
More information about the U-Boot
mailing list