summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-02-28 08:40:37 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-02-28 08:40:37 +0000
commit343c428f2cf97c82540aecf07d154e43ff40e79a (patch)
tree288809e43479940614c805551281d0545047bda0 /bootloader
parent9d3ccba765eff9629a2cb6ea6e3616f23545cfc6 (diff)
downloadrockbox-343c428f2cf97c82540aecf07d154e43ff40e79a.tar.gz
rockbox-343c428f2cf97c82540aecf07d154e43ff40e79a.tar.bz2
rockbox-343c428f2cf97c82540aecf07d154e43ff40e79a.zip
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
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/main.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/bootloader/main.c b/bootloader/main.c
index 930a67c693..1b6ccc7aeb 100644
--- a/bootloader/main.c
+++ b/bootloader/main.c
@@ -370,7 +370,8 @@ void main(void)
bool rec_button = false;
bool hold_status = false;
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
releases the ON button */
@@ -511,6 +512,11 @@ void main(void)
lcd_putsxy((LCD_WIDTH-w)/2, (LCD_HEIGHT-h)/2, msg);
lcd_update();
+#ifdef HAVE_REMOTE_LCD
+ lcd_remote_puts(0, 3, msg);
+ lcd_remote_update();
+#endif
+
#ifdef HAVE_EEPROM_SETTINGS
if (firmware_settings.initialized)
{
@@ -527,6 +533,7 @@ void main(void)
{
/* Print the battery status. */
line = 0;
+ remote_line = 0;
check_battery();
ata_spin(); /* Prevent the drive from spinning down */
@@ -566,7 +573,8 @@ void main(void)
printf("Loading firmware");
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)
start_firmware();
@@ -577,8 +585,10 @@ void main(void)
sleep(HZ*2);
shutdown();
}
- else
+ else {
+ sleep(HZ*2);
start_iriver_fw();
+ }
}
/* These functions are present in the firmware library, but we reimplement