Fix up the bootloaders

They can't access the raw RBVERSION define any longer.

Change-Id: I698062b36306399945c01de54cdccaa1a1a8434e
This commit is contained in:
Michael Sevakis 2014-08-28 10:26:45 -04:00
parent 21e2b595c2
commit 95a4c3afcd
19 changed files with 31 additions and 26 deletions

View File

@ -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)

View File

@ -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();

View File

@ -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 */

View File

@ -188,7 +188,7 @@ void main(void)
}
printf("Rockbox boot loader");
printf("Version " RBVERSION);
printf("Version %s", rbversion);
check_battery();

View File

@ -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

View File

@ -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();

View File

@ -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();

View File

@ -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 */

View File

@ -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)

View File

@ -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("");

View File

@ -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();

View File

@ -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)

View File

@ -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();

View File

@ -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)

View File

@ -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())

View File

@ -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);

View File

@ -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)

View File

@ -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();

View File

@ -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();