Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision version.c/version.h are generated once with new tools/genversion.sh Changes in the VCS are still not auto detected, so you'll have to remove builddir/version.* if you want to change the string in your binaries APPSVERSION is now called RBVERSION and is defined in the generated header instead of being defined by the Makefiles appsversion is now called rbversion (the plugin api number didn't change since old modules are still binary compatible) Change some bootloaders to use knwon-at-buildtime RBVERSION instead of "%s" + rbversion You'll need to run make clean to regenerate dependencies after the removal of apps/version.h To build binaries with a different version string, hand-edit tools/version.sh or tools/genversion.sh (which calls the former) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6ca9f232a8
commit
5d236b2bfd
|
@ -120,8 +120,6 @@
|
||||||
|
|
||||||
/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
|
/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
|
||||||
|
|
||||||
const char appsversion[]=APPSVERSION;
|
|
||||||
|
|
||||||
static void init(void);
|
static void init(void);
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
#ifdef HAVE_SDL
|
||||||
|
|
|
@ -172,7 +172,7 @@ static const char* info_getname(int selected_item, void *data,
|
||||||
{
|
{
|
||||||
case INFO_VERSION:
|
case INFO_VERSION:
|
||||||
snprintf(buffer, buffer_len, "%s: %s",
|
snprintf(buffer, buffer_len, "%s: %s",
|
||||||
str(LANG_VERSION), appsversion);
|
str(LANG_VERSION), rbversion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INFO_BUFFER: /* buffer */
|
case INFO_BUFFER: /* buffer */
|
||||||
|
@ -259,7 +259,7 @@ static int info_speak_item(int selected_item, void * data)
|
||||||
{
|
{
|
||||||
case INFO_VERSION: /* version */
|
case INFO_VERSION: /* version */
|
||||||
talk_id(LANG_VERSION, false);
|
talk_id(LANG_VERSION, false);
|
||||||
talk_spell(appsversion, true);
|
talk_spell(rbversion, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INFO_BUFFER: /* buffer */
|
case INFO_BUFFER: /* buffer */
|
||||||
|
|
|
@ -621,7 +621,7 @@ int show_logo( void )
|
||||||
char version[32];
|
char version[32];
|
||||||
int font_h, font_w;
|
int font_h, font_w;
|
||||||
|
|
||||||
snprintf(version, sizeof(version), "Ver. %s", appsversion);
|
snprintf(version, sizeof(version), "Ver. %s", rbversion);
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
|
#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS)
|
||||||
|
@ -646,7 +646,7 @@ int show_logo( void )
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_double_height(true);
|
lcd_double_height(true);
|
||||||
lcd_puts(0, 0, rockbox);
|
lcd_puts(0, 0, rockbox);
|
||||||
lcd_puts_scroll(0, 1, appsversion);
|
lcd_puts_scroll(0, 1, rbversion);
|
||||||
#endif
|
#endif
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
|
|
|
@ -718,7 +718,7 @@ static const struct plugin_api rockbox_api = {
|
||||||
semaphore_release,
|
semaphore_release,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
appsversion,
|
rbversion,
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
};
|
};
|
||||||
|
|
|
@ -885,7 +885,7 @@ int (*round_value_to_list32)(unsigned long value,
|
||||||
void (*semaphore_release)(struct semaphore *s);
|
void (*semaphore_release)(struct semaphore *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *appsversion;
|
const char *rbversion;
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
};
|
};
|
||||||
|
|
|
@ -546,7 +546,7 @@ int main(void)
|
||||||
"will continue.\n\n",BATTERY_LOG);
|
"will continue.\n\n",BATTERY_LOG);
|
||||||
rb->fdprintf(fd,
|
rb->fdprintf(fd,
|
||||||
"Battery bench run for %s version %s\n\n"
|
"Battery bench run for %s version %s\n\n"
|
||||||
,MODEL_NAME,rb->appsversion);
|
,MODEL_NAME,rb->rbversion);
|
||||||
|
|
||||||
rb->fdprintf(fd,
|
rb->fdprintf(fd,
|
||||||
"Battery type: %d mAh Buffer Entries: %d\n"
|
"Battery type: %d mAh Buffer Entries: %d\n"
|
||||||
|
@ -578,7 +578,7 @@ int main(void)
|
||||||
rb->fdprintf(fd, "\n--File already present. Resuming Benchmark--\n");
|
rb->fdprintf(fd, "\n--File already present. Resuming Benchmark--\n");
|
||||||
rb->fdprintf(fd,
|
rb->fdprintf(fd,
|
||||||
"Battery bench run for %s version %s\n\n"
|
"Battery bench run for %s version %s\n\n"
|
||||||
,MODEL_NAME,rb->appsversion);
|
,MODEL_NAME,rb->rbversion);
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,7 @@ int flash_rockbox(const char *filename, int section)
|
||||||
rb->memset(&hdr, 0, sizeof(struct flash_header));
|
rb->memset(&hdr, 0, sizeof(struct flash_header));
|
||||||
hdr.magic = FLASH_MAGIC;
|
hdr.magic = FLASH_MAGIC;
|
||||||
hdr.length = len;
|
hdr.length = len;
|
||||||
// rb->strncpy(hdr.version, APPSVERSION, sizeof(hdr.version)-1);
|
// rb->strncpy(hdr.version, rb->rbversion , sizeof(hdr.version)-1);
|
||||||
p16 = (uint16_t *)&hdr;
|
p16 = (uint16_t *)&hdr;
|
||||||
|
|
||||||
rb->snprintf(buf, sizeof(buf), "Programming...");
|
rb->snprintf(buf, sizeof(buf), "Programming...");
|
||||||
|
|
|
@ -129,7 +129,7 @@ enum plugin_status plugin_start(
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
list = rb->get_settings_list(&setting_count);
|
list = rb->get_settings_list(&setting_count);
|
||||||
rb->fdprintf(fd, "# .cfg file created by rockbox %s - "
|
rb->fdprintf(fd, "# .cfg file created by rockbox %s - "
|
||||||
"http://www.rockbox.org\r\n\r\n", rb->appsversion);
|
"http://www.rockbox.org\r\n\r\n", rb->rbversion);
|
||||||
|
|
||||||
rb->fdprintf(fd, "# -- Sound settings -- #\r\n");
|
rb->fdprintf(fd, "# -- Sound settings -- #\r\n");
|
||||||
for(i=0;i<setting_count;i++)
|
for(i=0;i<setting_count;i++)
|
||||||
|
|
|
@ -536,7 +536,7 @@ static bool settings_write_config(const char* filename, int options)
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return false;
|
return false;
|
||||||
fdprintf(fd, "# .cfg file created by rockbox %s - "
|
fdprintf(fd, "# .cfg file created by rockbox %s - "
|
||||||
"http://www.rockbox.org\r\n\r\n", appsversion);
|
"http://www.rockbox.org\r\n\r\n", rbversion);
|
||||||
for(i=0; i<nb_settings; i++)
|
for(i=0; i<nb_settings; i++)
|
||||||
{
|
{
|
||||||
if (settings[i].cfg_name == NULL)
|
if (settings[i].cfg_name == NULL)
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/***************************************************************************
|
|
||||||
* __________ __ ___.
|
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
* \/ \/ \/ \/ \/
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (C) 2002 Björn Stenberg
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
||||||
* KIND, either express or implied.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
#ifndef _VERSION_H_
|
|
||||||
#define _VERSION_H_
|
|
||||||
|
|
||||||
extern const char appsversion[];
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -46,12 +46,8 @@ ifdef APPEXTRA
|
||||||
INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
|
INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef VERSION
|
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) $(EXTRA_DEFINES) \
|
||||||
VERSION=$(shell date +%y%m%d-%H%M)
|
-DMEM=${MEMORYSIZE}
|
||||||
endif
|
|
||||||
|
|
||||||
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
|
|
||||||
-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
|
||||||
|
|
||||||
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
||||||
SOURCES = $(SRC)
|
SOURCES = $(SRC)
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
static void load_fw(unsigned char* ptr, unsigned int len)
|
static void load_fw(unsigned char* ptr, unsigned int len)
|
||||||
|
@ -66,7 +67,7 @@ void main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
reset_screen();
|
reset_screen();
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", APPSVERSION);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
ret = storage_init();
|
ret = storage_init();
|
||||||
if(ret)
|
if(ret)
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#include "usb-target.h"
|
#include "usb-target.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define TAR_CHUNK 512
|
#define TAR_CHUNK 512
|
||||||
#define TAR_HEADER_SIZE 157
|
#define TAR_HEADER_SIZE 157
|
||||||
|
|
||||||
const char version[] = APPSVERSION;
|
|
||||||
/* Where files sent via MTP are stored */
|
/* Where files sent via MTP are stored */
|
||||||
static const char basedir[] = "/Content/0b00/00/";
|
static const char basedir[] = "/Content/0b00/00/";
|
||||||
/* Can use memory after vector table up to 0x01f00000 */
|
/* Can use memory after vector table up to 0x01f00000 */
|
||||||
|
@ -346,7 +346,7 @@ void main(void)
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
printf("Gigabeat S Rockbox Bootloader");
|
printf("Gigabeat S Rockbox Bootloader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
/* Initialize KPP so we can poll the button states */
|
/* Initialize KPP so we can poll the button states */
|
||||||
button_init_device();
|
button_init_device();
|
||||||
|
|
|
@ -45,11 +45,10 @@
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "mmu-arm.h"
|
#include "mmu-arm.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
void shutdown(void)
|
void shutdown(void)
|
||||||
{
|
{
|
||||||
/* We need to gracefully spin down the disk to prevent clicks. */
|
/* We need to gracefully spin down the disk to prevent clicks. */
|
||||||
|
@ -174,7 +173,7 @@ void main(void)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
sleep(50); /* ATA seems to error without this pause */
|
sleep(50); /* ATA seems to error without this pause */
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "powermgmt.h"
|
#include "powermgmt.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
#include "pcf50606.h"
|
#include "pcf50606.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -58,8 +60,6 @@ int usb_screen(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
/* Reset the cookie for the crt0 crash check */
|
/* Reset the cookie for the crt0 crash check */
|
||||||
inline void __reset_cookie(void)
|
inline void __reset_cookie(void)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ void main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
check_battery();
|
check_battery();
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "hwcompat.h"
|
#include "hwcompat.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define XSC(X) #X
|
#define XSC(X) #X
|
||||||
#define SC(X) XSC(X)
|
#define SC(X) XSC(X)
|
||||||
|
@ -56,9 +57,6 @@
|
||||||
/* A buffer to load the Linux kernel or Rockbox into */
|
/* A buffer to load the Linux kernel or Rockbox into */
|
||||||
unsigned char *loadbuffer = (unsigned char *)DRAM_START;
|
unsigned char *loadbuffer = (unsigned char *)DRAM_START;
|
||||||
|
|
||||||
/* Bootloader version */
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
#if CONFIG_KEYPAD == IPOD_4G_PAD && !defined(IPOD_MINI)
|
#if CONFIG_KEYPAD == IPOD_4G_PAD && !defined(IPOD_MINI)
|
||||||
/* check if number of seconds has past */
|
/* check if number of seconds has past */
|
||||||
int timer_check(int clock_start, unsigned int usecs)
|
int timer_check(int clock_start, unsigned int usecs)
|
||||||
|
@ -335,7 +333,7 @@ void* main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version: %s", version);
|
printf("Version: " RBVERSION);
|
||||||
printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
|
printf("IPOD version: 0x%08x", IPOD_HW_REVISION);
|
||||||
|
|
||||||
i=ata_init();
|
i=ata_init();
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
/* Safety measure - maximum allowed firmware image size.
|
/* Safety measure - maximum allowed firmware image size.
|
||||||
The largest known current (October 2009) firmware is about 6.2MB so
|
The largest known current (October 2009) firmware is about 6.2MB so
|
||||||
|
@ -54,9 +55,6 @@
|
||||||
/* The buffer to load the firmware into - use an uncached alias of 0x08000000 */
|
/* The buffer to load the firmware into - use an uncached alias of 0x08000000 */
|
||||||
unsigned char *loadbuffer = (unsigned char *)0x48000000;
|
unsigned char *loadbuffer = (unsigned char *)0x48000000;
|
||||||
|
|
||||||
/* Bootloader version */
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
extern int line;
|
extern int line;
|
||||||
|
|
||||||
void fatal_error(void)
|
void fatal_error(void)
|
||||||
|
@ -209,7 +207,7 @@ void main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version: %s", version);
|
printf("Version: " RBVERSION);
|
||||||
|
|
||||||
i = storage_init();
|
i = storage_init();
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "eeprom_settings.h"
|
#include "eeprom_settings.h"
|
||||||
#include "rbunicode.h"
|
#include "rbunicode.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -58,8 +59,6 @@
|
||||||
static bool recovery_mode = false;
|
static bool recovery_mode = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
/* Reset the cookie for the crt0 crash check */
|
/* Reset the cookie for the crt0 crash check */
|
||||||
inline void __reset_cookie(void)
|
inline void __reset_cookie(void)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +253,7 @@ void failsafe_menu(void)
|
||||||
extern int line;
|
extern int line;
|
||||||
|
|
||||||
reset_screen();
|
reset_screen();
|
||||||
printf("Bootloader %s", version);
|
printf("Bootloader " RBVERSION);
|
||||||
check_battery();
|
check_battery();
|
||||||
printf("=========================");
|
printf("=========================");
|
||||||
line += FAILSAFE_OPTIONS;
|
line += FAILSAFE_OPTIONS;
|
||||||
|
@ -502,7 +501,7 @@ void main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
/* No need to wait here more because lcd_init and others already do that. */
|
/* 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 */
|
// sleep(HZ/50); /* Allow the button driver to check the buttons */
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "rbunicode.h"
|
#include "rbunicode.h"
|
||||||
#include "isp1362.h"
|
#include "isp1362.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -55,8 +56,6 @@
|
||||||
|
|
||||||
#define DRAM_START 0x31000000
|
#define DRAM_START 0x31000000
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
/* Reset the cookie for the crt0 crash check */
|
/* Reset the cookie for the crt0 crash check */
|
||||||
inline void __reset_cookie(void)
|
inline void __reset_cookie(void)
|
||||||
{
|
{
|
||||||
|
@ -210,7 +209,7 @@ void main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
sleep(HZ/50); /* Allow the button driver to check the buttons */
|
sleep(HZ/50); /* Allow the button driver to check the buttons */
|
||||||
rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
|
rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
|
||||||
|
|
|
@ -39,9 +39,7 @@
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "backlight-target.h"
|
#include "backlight-target.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
#include "version.h"
|
||||||
/* Bootloader version */
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
#define START_SECTOR_OF_ROM 1
|
#define START_SECTOR_OF_ROM 1
|
||||||
#define ROMSECTOR_TO_HACK 63
|
#define ROMSECTOR_TO_HACK 63
|
||||||
|
@ -116,7 +114,7 @@ void* main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox e200R installer");
|
printf("Rockbox e200R installer");
|
||||||
printf("Version: %s", version);
|
printf("Version: " RBVERSION);
|
||||||
printf(MODEL_NAME);
|
printf(MODEL_NAME);
|
||||||
printf("");
|
printf("");
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "crc32-mi4.h"
|
#include "crc32-mi4.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
#include "version.h"
|
||||||
#if defined(SANSA_E200) || defined(PHILIPS_SA9200)
|
#if defined(SANSA_E200) || defined(PHILIPS_SA9200)
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "backlight-target.h"
|
#include "backlight-target.h"
|
||||||
|
@ -95,9 +96,6 @@ extern int show_logo(void);
|
||||||
/* A buffer to load the original firmware or Rockbox into */
|
/* A buffer to load the original firmware or Rockbox into */
|
||||||
unsigned char *loadbuffer = (unsigned char *)DRAM_START;
|
unsigned char *loadbuffer = (unsigned char *)DRAM_START;
|
||||||
|
|
||||||
/* Bootloader version */
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
/* Locations and sizes in hidden partition on Sansa */
|
/* Locations and sizes in hidden partition on Sansa */
|
||||||
#if (CONFIG_STORAGE & STORAGE_SD)
|
#if (CONFIG_STORAGE & STORAGE_SD)
|
||||||
#define PPMI_SECTOR_OFFSET 1024
|
#define PPMI_SECTOR_OFFSET 1024
|
||||||
|
@ -525,7 +523,7 @@ void* main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version: %s", version);
|
printf("Version: " RBVERSION);
|
||||||
printf(MODEL_NAME);
|
printf(MODEL_NAME);
|
||||||
|
|
||||||
i=storage_init();
|
i=storage_init();
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "audiohw.h"
|
#include "audiohw.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
#define LONG_DELAY 200000
|
#define LONG_DELAY 200000
|
||||||
#define SHORT_DELAY 50000
|
#define SHORT_DELAY 50000
|
||||||
#define PAUSE_DELAY 50000
|
#define PAUSE_DELAY 50000
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
#define LONG_DELAY 200000
|
#define LONG_DELAY 200000
|
||||||
#define SHORT_DELAY 50000
|
#define SHORT_DELAY 50000
|
||||||
#define PAUSE_DELAY 50000
|
#define PAUSE_DELAY 50000
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
#define LONG_DELAY 200000
|
#define LONG_DELAY 200000
|
||||||
#define SHORT_DELAY 50000
|
#define SHORT_DELAY 50000
|
||||||
#define PAUSE_DELAY 50000
|
#define PAUSE_DELAY 50000
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "dma-target.h"
|
#include "dma-target.h"
|
||||||
#include "uart-s3c2440.h"
|
#include "uart-s3c2440.h"
|
||||||
#include "led-mini2440.h"
|
#include "led-mini2440.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
@ -78,7 +79,7 @@ int main(void)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", APPSVERSION);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
rc = storage_init();
|
rc = storage_init();
|
||||||
if(rc)
|
if(rc)
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -78,8 +79,6 @@ int usb_screen(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
static inline bool _charger_inserted(void)
|
static inline bool _charger_inserted(void)
|
||||||
{
|
{
|
||||||
return (GPIO1_READ & (1<<14)) ? false : true;
|
return (GPIO1_READ & (1<<14)) ? false : true;
|
||||||
|
@ -233,7 +232,7 @@ static void bootmenu(void)
|
||||||
/* backbone of menu */
|
/* backbone of menu */
|
||||||
/* run the loader */
|
/* run the loader */
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Ver: %s", version);
|
printf("Ver: " RBVERSION);
|
||||||
|
|
||||||
check_battery();
|
check_battery();
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "tsc2100.h"
|
#include "tsc2100.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "system-arm.h"
|
#include "system-arm.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +84,7 @@ void main(void)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", APPSVERSION);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
/* Enter USB mode without USB thread */
|
/* Enter USB mode without USB thread */
|
||||||
if(usb_detect() == USB_INSERTED)
|
if(usb_detect() == USB_INSERTED)
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "disk.h"
|
#include "disk.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "adc.h"
|
#include "adc.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
extern int show_logo(void);
|
extern int show_logo(void);
|
||||||
extern void power_off(void);
|
extern void power_off(void);
|
||||||
|
@ -296,7 +297,7 @@ int main(void)
|
||||||
if(verbose)
|
if(verbose)
|
||||||
reset_screen();
|
reset_screen();
|
||||||
printf(MODEL_NAME" Rockbox Bootloader");
|
printf(MODEL_NAME" Rockbox Bootloader");
|
||||||
printf("Version "APPSVERSION);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
if(button_hold())
|
if(button_hold())
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
#include "wmcodec.h"
|
#include "wmcodec.h"
|
||||||
#include "nand-target.h"
|
#include "nand-target.h"
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
#define LONG_DELAY 200000
|
#define LONG_DELAY 200000
|
||||||
#define SHORT_DELAY 50000
|
#define SHORT_DELAY 50000
|
||||||
#define PAUSE_DELAY 50000
|
#define PAUSE_DELAY 50000
|
||||||
|
|
|
@ -23,13 +23,14 @@
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "bitmaps/rockboxlogo.h"
|
#include "bitmaps/rockboxlogo.h"
|
||||||
|
|
||||||
#if LCD_WIDTH <= 128
|
#if LCD_WIDTH <= 128
|
||||||
#define BOOT_VERSION ("Boot " APPSVERSION)
|
#define BOOT_VERSION ("Boot " RBVERSION)
|
||||||
#else
|
#else
|
||||||
#define BOOT_VERSION ("Boot Ver. " APPSVERSION)
|
#define BOOT_VERSION ("Boot Ver. " RBVERSION)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Ensure TEXT_XPOS is >= 0 */
|
/* Ensure TEXT_XPOS is >= 0 */
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
/* Show the Rockbox logo - in show_logo.c */
|
/* Show the Rockbox logo - in show_logo.c */
|
||||||
extern int show_logo(void);
|
extern int show_logo(void);
|
||||||
|
@ -50,8 +51,6 @@ extern int show_logo(void);
|
||||||
/* Address to load main Rockbox image to */
|
/* Address to load main Rockbox image to */
|
||||||
#define LOAD_ADDRESS 0x20000000 /* DRAM_START */
|
#define LOAD_ADDRESS 0x20000000 /* DRAM_START */
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
extern int line;
|
extern int line;
|
||||||
|
|
||||||
#define MAX_LOAD_SIZE (8*1024*1024) /* Arbitrary, but plenty. */
|
#define MAX_LOAD_SIZE (8*1024*1024) /* Arbitrary, but plenty. */
|
||||||
|
@ -152,7 +151,7 @@ void* main(void)
|
||||||
available for loading the firmware. Otherwise display the debug screen. */
|
available for loading the firmware. Otherwise display the debug screen. */
|
||||||
#ifdef TCCBOOT
|
#ifdef TCCBOOT
|
||||||
printf("Rockbox boot loader");
|
printf("Rockbox boot loader");
|
||||||
printf("Version %s", version);
|
printf("Version " RBVERSION);
|
||||||
|
|
||||||
printf("ATA");
|
printf("ATA");
|
||||||
rc = storage_init();
|
rc = storage_init();
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
|
||||||
|
|
||||||
void* main(void)
|
void* main(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -39,7 +39,7 @@ bool action_userabort(int timeout)
|
||||||
\return
|
\return
|
||||||
\description
|
\description
|
||||||
|
|
||||||
const char *appsversion
|
const char *rbversion
|
||||||
\return version of the plugin API
|
\return version of the plugin API
|
||||||
\description
|
\description
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,14 @@ FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
||||||
ifeq (,$(findstring -DARCHOS_PLAYER,$(TARGET)))
|
ifeq (,$(findstring -DARCHOS_PLAYER,$(TARGET)))
|
||||||
FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
|
FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
|
||||||
endif
|
endif
|
||||||
|
FIRMLIB_OBJ += $(BUILDDIR)/version.o
|
||||||
OTHER_SRC += $(FIRMLIB_SRC)
|
OTHER_SRC += $(FIRMLIB_SRC)
|
||||||
|
|
||||||
FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a
|
FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a
|
||||||
|
|
||||||
SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf
|
SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf
|
||||||
|
|
||||||
CLEANOBJS += $(BUILDDIR)/sysfont.*
|
CLEANOBJS += $(BUILDDIR)/sysfont.* $(BUILDDIR)/version.*
|
||||||
|
|
||||||
# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
|
# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
|
||||||
ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
|
ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
|
||||||
|
@ -43,3 +44,5 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h
|
||||||
$(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
|
$(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@
|
||||||
|
|
||||||
|
$(BUILDDIR)/version.c $(BUILDDIR)/version.h:
|
||||||
|
$(TOOLSDIR)/genversion.sh $(BUILDDIR) $(TOOLSDIR)/version.sh $(ROOTDIR)
|
||||||
|
|
|
@ -27,7 +27,7 @@ ifdef APPEXTRA
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
|
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
|
||||||
-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
||||||
|
|
||||||
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
||||||
SOURCES = $(SRC)
|
SOURCES = $(SRC)
|
||||||
|
|
|
@ -28,7 +28,7 @@ VERSION=$(shell date +%y%m%d-%H%M)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
|
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
|
||||||
-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
||||||
|
|
||||||
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
||||||
SOURCES = $(SRC)
|
SOURCES = $(SRC)
|
||||||
|
|
|
@ -3103,7 +3103,6 @@ export BUILDDIR=@PWD@
|
||||||
export LANGUAGE=@LANGUAGE@
|
export LANGUAGE=@LANGUAGE@
|
||||||
export VOICELANGUAGE=@VOICELANGUAGE@
|
export VOICELANGUAGE=@VOICELANGUAGE@
|
||||||
export MEMORYSIZE=@MEMORY@
|
export MEMORYSIZE=@MEMORY@
|
||||||
export VERSION:=\$(shell \$(ROOTDIR)/tools/version.sh \$(ROOTDIR))
|
|
||||||
export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
|
export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
|
||||||
export MKFIRMWARE=@TOOL@
|
export MKFIRMWARE=@TOOL@
|
||||||
export BMP2RB_MONO=@BMP2RB_MONO@
|
export BMP2RB_MONO=@BMP2RB_MONO@
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
|
||||||
|
# Usage: genversion.sh destination-dir path-to-version.sh [source-root]
|
||||||
|
|
||||||
|
# Generate version.[ch] files
|
||||||
|
|
||||||
|
VERSION=`$2 $3`
|
||||||
|
|
||||||
|
cat > "$1/_version.h" << EOF
|
||||||
|
/* Generated by genversion.sh */
|
||||||
|
extern const char rbversion[];
|
||||||
|
#define RBVERSION "$VERSION"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -f "$1/version.h" ]
|
||||||
|
then if diff "$1/_version.h" "$1/version.h" > /dev/null
|
||||||
|
then mv "$1/_version.h" "$1/version.h"
|
||||||
|
else rm -f "$1/_version.h"
|
||||||
|
fi
|
||||||
|
else mv "$1/_version.h" "$1/version.h"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cat > "$1/_version.c" << EOF
|
||||||
|
/* Generated by genversion.sh */
|
||||||
|
const char rbversion[] = "$VERSION";
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -f "$1/version.c" ]
|
||||||
|
then if diff "$1/_version.c" "$1/version.c" > /dev/null
|
||||||
|
then mv "$1/_version.c" "$1/version.c"
|
||||||
|
else rm -f "$1/_version.c"
|
||||||
|
fi
|
||||||
|
else mv "$1/_version.c" "$1/version.c"
|
||||||
|
fi
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
include $(TOOLSDIR)/functions.make
|
include $(TOOLSDIR)/functions.make
|
||||||
|
|
||||||
DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \
|
DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \
|
||||||
-DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \
|
-DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \
|
||||||
-DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \
|
|
||||||
$(EXTRA_DEFINES) # <-- -DSIMULATOR or not
|
$(EXTRA_DEFINES) # <-- -DSIMULATOR or not
|
||||||
INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
|
INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ include $(TOOLSDIR)/makesrc.inc
|
||||||
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
||||||
|
|
||||||
DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
||||||
$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
|
$(TARGET) -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
|
||||||
|
|
||||||
SOURCES = $(SRC)
|
SOURCES = $(SRC)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue