summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2014-08-28 10:26:45 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-08-28 10:44:22 -0400
commit95a4c3afcd53a1f8b835dec33de51f9c304de4d9 (patch)
tree951877fd6a5604da066ced93e0e1a16a99181de2
parent21e2b595c2797c226699cf19a2a2ad4abf22b210 (diff)
downloadrockbox-95a4c3a.tar.gz
rockbox-95a4c3a.tar.bz2
rockbox-95a4c3a.zip
Fix up the bootloaders
They can't access the raw RBVERSION define any longer. Change-Id: I698062b36306399945c01de54cdccaa1a1a8434e
-rw-r--r--bootloader/creativezvm.c2
-rw-r--r--bootloader/gigabeat-s.c2
-rw-r--r--bootloader/gigabeat.c2
-rw-r--r--bootloader/iaudio_coldfire.c2
-rw-r--r--bootloader/imx233.c2
-rw-r--r--bootloader/ipod.c2
-rw-r--r--bootloader/ipodnano2g.c2
-rw-r--r--bootloader/iriver_h1x0.c4
-rw-r--r--bootloader/iriver_h300.c2
-rw-r--r--bootloader/main-e200r-installer.c2
-rw-r--r--bootloader/main-pp.c2
-rw-r--r--bootloader/mini2440.c2
-rw-r--r--bootloader/mpio_hd200_hd300.c4
-rw-r--r--bootloader/mrobe500.c2
-rw-r--r--bootloader/ondavx747.c2
-rw-r--r--bootloader/rk27xx.c2
-rw-r--r--bootloader/sansaconnect.c2
-rw-r--r--bootloader/show_logo.c17
-rw-r--r--bootloader/telechips.c2
19 files changed, 31 insertions, 26 deletions
diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c
index f3a3960552..f31f6490a4 100644
--- a/bootloader/creativezvm.c
+++ b/bootloader/creativezvm.c
@@ -68,7 +68,7 @@ void main(void)
lcd_setfont(FONT_SYSFIXED);
reset_screen();
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
ret = storage_init();
if(ret)
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index 50ff12da72..3b852dbaa8 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -354,7 +354,7 @@ void main(void)
verbose = true;
printf("Gigabeat S Rockbox Bootloader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
adc_init();
batt = _battery_voltage();
diff --git a/bootloader/gigabeat.c b/bootloader/gigabeat.c
index f995be078c..52f55a5cdd 100644
--- a/bootloader/gigabeat.c
+++ b/bootloader/gigabeat.c
@@ -174,7 +174,7 @@ void main(void)
verbose = true;
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
sleep(50); /* ATA seems to error without this pause */
diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c
index da7a7af208..013e8859e8 100644
--- a/bootloader/iaudio_coldfire.c
+++ b/bootloader/iaudio_coldfire.c
@@ -188,7 +188,7 @@ void main(void)
}
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
check_battery();
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index f0d6aa0fe1..d2562d0676 100644
--- a/bootloader/imx233.c
+++ b/bootloader/imx233.c
@@ -154,7 +154,7 @@ void main(uint32_t arg, uint32_t addr)
button_init();
- printf("%s: %s", MSG(240, "Ver", "Boot version"), RBVERSION);
+ printf("%s: %s", MSG(240, "Ver", "Boot version"), rbversion);
printf("%s: %x ", MSG(240, "Arg", "Boot arg"), arg);
printf("%s: %x", MSG(240, "Addr", "Boot addr"), addr);
#if IMX233_SUBTARGET >= 3780
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index cae2501485..b2d4532168 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -334,7 +334,7 @@ void* main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox boot loader");
- printf("Version: " RBVERSION);
+ printf("Version: %s", rbversion);
printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
i=ata_init();
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c
index f3be7aed01..cdd866f71e 100644
--- a/bootloader/ipodnano2g.c
+++ b/bootloader/ipodnano2g.c
@@ -204,7 +204,7 @@ void main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox boot loader");
- printf("Version: " RBVERSION);
+ printf("Version: %s", rbversion);
i = storage_init();
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index 61077f3842..7f236d4510 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -254,7 +254,7 @@ void failsafe_menu(void)
extern int line;
reset_screen();
- printf("Bootloader " RBVERSION);
+ printf("Bootloader %s", rbversion);
check_battery();
printf("=========================");
line += FAILSAFE_OPTIONS;
@@ -502,7 +502,7 @@ void main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
/* No need to wait here more because lcd_init and others already do that. */
// sleep(HZ/50); /* Allow the button driver to check the buttons */
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c
index 2f53d03e2f..362eb947c8 100644
--- a/bootloader/iriver_h300.c
+++ b/bootloader/iriver_h300.c
@@ -210,7 +210,7 @@ void main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
sleep(HZ/50); /* Allow the button driver to check the buttons */
rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
diff --git a/bootloader/main-e200r-installer.c b/bootloader/main-e200r-installer.c
index c24f5c068c..490f1f04dd 100644
--- a/bootloader/main-e200r-installer.c
+++ b/bootloader/main-e200r-installer.c
@@ -112,7 +112,7 @@ void* main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox e200R installer");
- printf("Version: " RBVERSION);
+ printf("Version: %s", rbversion);
printf(MODEL_NAME);
printf("");
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 9f7b88cdc8..38760a0e58 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -349,7 +349,7 @@ void* main(void)
lcd_setfont(FONT_SYSFIXED);
printf("Rockbox boot loader");
- printf("Version: " RBVERSION);
+ printf("Version: %s", rbversion);
printf(MODEL_NAME);
i=storage_init();
diff --git a/bootloader/mini2440.c b/bootloader/mini2440.c
index 4976318e9a..b3d73d1270 100644
--- a/bootloader/mini2440.c
+++ b/bootloader/mini2440.c
@@ -79,7 +79,7 @@ int main(void)
verbose = true;
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
rc = storage_init();
if(rc)
diff --git a/bootloader/mpio_hd200_hd300.c b/bootloader/mpio_hd200_hd300.c
index 963e65f22b..a4e13e1f88 100644
--- a/bootloader/mpio_hd200_hd300.c
+++ b/bootloader/mpio_hd200_hd300.c
@@ -196,7 +196,7 @@ static void rb_boot(void)
reset_screen();
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
rc = storage_init();
if(rc)
@@ -234,7 +234,7 @@ static void bootmenu(void)
/* backbone of menu */
/* run the loader */
printf("Rockbox boot loader");
- printf("Ver: " RBVERSION);
+ printf("Ver: %s", rbversion);
check_battery();
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 1b00e12b92..0b9ffb6281 100644
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -85,7 +85,7 @@ void main(void)
verbose = true;
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
/* Enter USB mode without USB thread */
if(usb_detect() == USB_INSERTED)
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index 0c189eaca1..3d03c36eae 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -297,7 +297,7 @@ int main(void)
if(verbose)
reset_screen();
printf(MODEL_NAME" Rockbox Bootloader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
#ifdef HAS_BUTTON_HOLD
if(button_hold())
diff --git a/bootloader/rk27xx.c b/bootloader/rk27xx.c
index dae738ec08..d190ea5a5a 100644
--- a/bootloader/rk27xx.c
+++ b/bootloader/rk27xx.c
@@ -159,7 +159,7 @@ void main(void)
else if (boot == of)
snprintf(filename,sizeof(filename), BOOTDIR "/%s", "BASE.RKW");
- printf("Bootloader version: %s", RBVERSION);
+ printf("Bootloader version: %s", rbversion);
printf("Loading: %s", filename);
ret = load_rkw(loadbuffer, filename, LOAD_SIZE);
diff --git a/bootloader/sansaconnect.c b/bootloader/sansaconnect.c
index 280c386968..48617ec337 100644
--- a/bootloader/sansaconnect.c
+++ b/bootloader/sansaconnect.c
@@ -66,7 +66,7 @@ void main(void)
btn = button_read_device();
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
ret = storage_init();
if(ret)
diff --git a/bootloader/show_logo.c b/bootloader/show_logo.c
index 538e90299a..6584e3f24d 100644
--- a/bootloader/show_logo.c
+++ b/bootloader/show_logo.c
@@ -28,14 +28,14 @@
#include "bitmaps/rockboxlogo.h"
#if LCD_WIDTH <= 128
-#define BOOT_VERSION ("Boot " RBVERSION)
+#define BOOT_VERFMT "Boot %s"
#else
-#define BOOT_VERSION ("Boot Ver. " RBVERSION)
+#define BOOT_VERFMT "Boot Ver. %s"
#endif
/* Ensure TEXT_XPOS is >= 0 */
-#define TEXT_WIDTH ((sizeof(BOOT_VERSION)-1)*SYSFONT_WIDTH)
-#define TEXT_XPOS ((TEXT_WIDTH > LCD_WIDTH) ? 0 : ((LCD_WIDTH - TEXT_WIDTH) / 2))
+#define TEXT_WIDTH(l) ((l)*SYSFONT_WIDTH)
+#define TEXT_XPOS(w) (((w) > LCD_WIDTH) ? 0 : ((LCD_WIDTH - (w)) / 2))
#define LOGO_XPOS ((LCD_WIDTH - BMPWIDTH_rockboxlogo) / 2)
void show_logo( void )
@@ -43,14 +43,19 @@ void show_logo( void )
lcd_clear_display();
lcd_setfont(FONT_SYSFIXED);
+ char verstr[strlen(rbversion) + sizeof (BOOT_VERFMT)];
+ int len = snprintf(verstr, sizeof(verstr), BOOT_VERFMT, rbversion);
+ int text_width = TEXT_WIDTH(len);
+ int text_xpos = TEXT_XPOS(text_width);
+
#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
/* The top 16 lines of the Sansa Clip screen are yellow, and the bottom 48
are blue, so we reverse the usual positioning */
- lcd_putsxy(TEXT_XPOS, 0, BOOT_VERSION);
+ lcd_putsxy(text_xpos, 0, verstr);
lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 16);
#else
lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 10);
- lcd_putsxy(TEXT_XPOS, LCD_HEIGHT-SYSFONT_HEIGHT, BOOT_VERSION);
+ lcd_putsxy(text_xpos, LCD_HEIGHT-SYSFONT_HEIGHT, verstr);
#endif
lcd_update();
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index 77aa398487..17ba509a6c 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -152,7 +152,7 @@ void* main(void)
available for loading the firmware. Otherwise display the debug screen. */
#ifdef TCCBOOT
printf("Rockbox boot loader");
- printf("Version " RBVERSION);
+ printf("Version %s", rbversion);
printf("ATA");
rc = storage_init();