H100/H300 bootloader: Better remote control output, removed a wild pointer access when loading Rockbox, add a 2 second delay before rebooting when Rockbox is not found

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12519 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2007-02-28 08:40:37 +00:00
parent 9d3ccba765
commit 343c428f2c

View file

@ -370,7 +370,8 @@ void main(void)
bool rec_button = false; bool rec_button = false;
bool hold_status = false; bool hold_status = false;
int data; int data;
extern int line; extern int line; /* From common.c */
extern int remote_line; /* From common.c */
/* We want to read the buttons as early as possible, before the user /* We want to read the buttons as early as possible, before the user
releases the ON button */ releases the ON button */
@ -511,6 +512,11 @@ void main(void)
lcd_putsxy((LCD_WIDTH-w)/2, (LCD_HEIGHT-h)/2, msg); lcd_putsxy((LCD_WIDTH-w)/2, (LCD_HEIGHT-h)/2, msg);
lcd_update(); lcd_update();
#ifdef HAVE_REMOTE_LCD
lcd_remote_puts(0, 3, msg);
lcd_remote_update();
#endif
#ifdef HAVE_EEPROM_SETTINGS #ifdef HAVE_EEPROM_SETTINGS
if (firmware_settings.initialized) if (firmware_settings.initialized)
{ {
@ -527,6 +533,7 @@ void main(void)
{ {
/* Print the battery status. */ /* Print the battery status. */
line = 0; line = 0;
remote_line = 0;
check_battery(); check_battery();
ata_spin(); /* Prevent the drive from spinning down */ ata_spin(); /* Prevent the drive from spinning down */
@ -566,7 +573,8 @@ void main(void)
printf("Loading firmware"); printf("Loading firmware");
i = load_firmware((unsigned char *)DRAM_START, BOOTFILE, MAX_LOADSIZE); i = load_firmware((unsigned char *)DRAM_START, BOOTFILE, MAX_LOADSIZE);
printf("Result: %d", strerror(i)); if(i < 0)
printf("Error: %d", strerror(i));
if (i == EOK) if (i == EOK)
start_firmware(); start_firmware();
@ -577,8 +585,10 @@ void main(void)
sleep(HZ*2); sleep(HZ*2);
shutdown(); shutdown();
} }
else else {
sleep(HZ*2);
start_iriver_fw(); start_iriver_fw();
}
} }
/* These functions are present in the firmware library, but we reimplement /* These functions are present in the firmware library, but we reimplement