/******************************************************************************************** * File: bootstrap.c * Version: 1.0.0 * Copyright: 2011 (c) Guo Wenxue * Description: This C code is the first stage bootloader(named bootstrap) main code, test on FL2440 board. * ChangeLog: 1, Release initial version on "Tue Jul 12 16:43:18 CST 2011" * *******************************************************************************************/ #include #include int dbg_mode(struct boot_nand_t *nand); unsigned long do_go_exec (ulong (*entry)(int, char * const []), int argc, char * const argv[]); void print_buf(char *prompt, char *buf, int len) { int i; printf("%s %d bytes\n", prompt, len); printf("------------------------------------------------------------------------------------\n"); for(i=0; iblock_size + 1)*nand->block_size; nand_erase(nand, LAUNCHER_NAND_ADDR, erase_size, SKIP_BAD_BLOCK); nand_write(nand, LAUNCHER_NAND_ADDR, size, addr); return 0; }