Exemplo n.º 1
0
/*
 * .KB_C_FN_DEFINITION_START
 * void ExecuteEnvironmentFunctions(void)
 *  This global function executes applicable entries in the environment.
 * .KB_C_FN_DEFINITION_END
 */
void
ExecuteEnvironmentFunctions(void)
{
	currentIndex = 0;
	currentOffset = 0;

	DumpBootCommands();
	Bootloader(ReadCharFromEnvironment);
}
Exemplo n.º 2
0
/*
 * .KB_C_FN_DEFINITION_START
 * int main(void)
 *  This global function waits at least one second, but not more than two 
 * seconds, for input from the serial port.  If no response is recognized,
 * it acts according to the parameters specified by the environment.  For 
 * example, the function might boot an operating system.  Do not return
 * from this function.
 * .KB_C_FN_DEFINITION_END
 */
int
main(void)
{
	InitEEPROM();
	EMAC_Init();
	LoadBootCommands();
	printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r");
	if (getc(1) == -1)
		ExecuteEnvironmentFunctions();
	Bootloader(0);

	return (1);
}
Exemplo n.º 3
0
int
main(void)
{
	printf("\nBoot\n");
	EEInit();
	SPI_InitFlash();
#ifdef TSC_FPGA
	fpga_load();
#endif
	EMAC_Init();
	LoadBootCommands();
	if (getc(1) == -1) {
		start_wdog(30);
		ExecuteEnvironmentFunctions();
	}
	Bootloader(getc);
	return (1);
}