4 extern unsigned long __dummy;
11 printf("U-Boot Firmware Updater\n\n\n");
12 printf("****************************************************\n"
13 "* ATTENTION!! PLEASE READ THIS NOTICE CAREFULLY! *\n"
14 "****************************************************\n\n"
15 "This program will update your computer's firmware.\n"
16 "Do NOT remove the disk, reset the machine, or do\n"
17 "anything that might disrupt functionality. If this\n");
18 printf("Program fails, your computer might be unusable, and\n"
19 "you will need to return your board for reflashing.\n"
20 "If you find this too risky, remove the diskette and\n"
21 "switch off your machine now. Otherwise press the \n"
22 "SPACE key now to start the process\n\n");
35 printf("\nUpdate done. Please remove diskette.\n");
36 printf("The machine will automatically reset in %d seconds\n", i);
37 printf("You can switch off/reset now when the floppy is removed\n\n");
41 printf("Resetting in %d\r", i);
51 unsigned long *addr = &__dummy + 65;
52 unsigned long flash_size = flash_init();
55 flash_sect_protect(0, 0xFFF00000, 0xFFF7FFFF);
57 flash_sect_erase(0xFFF00000, 0xFFF7FFFF);
59 rc = flash_write((uchar *)addr, 0xFFF00000, 0x7FFFF);
60 if (rc != 0) printf("\nFlashing failed due to error %d\n", rc);
61 else printf("\ndone\n");
62 flash_sect_protect(1, 0xFFF00000, 0xFFF7FFFF);