void board_init(void) { InitEEPROM(); MacFromEE(); EMAC_Init(); EMAC_SetMACAddress(mac); while (sdcard_init() == 0) printf("Looking for SD card\n"); }
/* * .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); }
int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ int len, sec; printf("\nSend data to be written into EEPROM\n"); while ((len = xmodem_rx(addr)) == -1) continue; sec = GetSeconds() + 1; while (sec >= GetSeconds()) continue; printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, len); InitEEPROM(); printf("init done\n"); WriteEEPROM(0, addr, len); printf("\nWrote %d bytes. Press reset\n", len); return (1); }