summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/common.c3
-rw-r--r--bootloader/gigabeat-s.c6
-rw-r--r--bootloader/iaudio_coldfire.c2
-rw-r--r--bootloader/ipod.c2
-rw-r--r--bootloader/main-pp.c8
5 files changed, 12 insertions, 9 deletions
diff --git a/bootloader/common.c b/bootloader/common.c
index ae6003cddf..40e460bed9 100644
--- a/bootloader/common.c
+++ b/bootloader/common.c
@@ -29,6 +29,7 @@
#include "common.h"
#include "power.h"
#include "kernel.h"
+#include "config.h"
/* TODO: Other bootloaders need to be adjusted to set this variable to true
on a button press - currently only the ipod, H10 and Sansa versions do. */
@@ -141,7 +142,7 @@ int load_firmware(unsigned char* buf, char* firmware, int buffer_size)
int i;
char filename[MAX_PATH];
- snprintf(filename,sizeof(filename),"/.rockbox/%s",firmware);
+ snprintf(filename,sizeof(filename), BOOTDIR "/%s",firmware);
fd = open(filename, O_RDONLY);
if(fd < 0)
{
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index e1e293fb55..e860a2e379 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -266,8 +266,8 @@ static void handle_untar(void)
{
printf("Found rockbox binary. Moving...");
close(fd);
- remove("/.rockbox/rockbox.gigabeat");
- int ret = rename(buf, "/.rockbox/rockbox.gigabeat");
+ remove( BOOTDIR "/" BOOTFILE);
+ int ret = rename(buf, BOOTDIR "/" BOOTFILE);
printf("returned %d", ret);
sleep(HZ);
break;
@@ -299,7 +299,7 @@ static void handle_untar(void)
/* Try to load the firmware and run it */
static void __attribute__((noreturn)) handle_firmware_load(void)
{
- int rc = load_firmware(load_buf, "/.rockbox/rockbox.gigabeat",
+ int rc = load_firmware(load_buf, BOOTFILE,
load_buf_size);
if(rc < 0)
diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c
index 0af2f25256..a3b318bbbc 100644
--- a/bootloader/iaudio_coldfire.c
+++ b/bootloader/iaudio_coldfire.c
@@ -216,7 +216,7 @@ void main(void)
if (i < EOK) {
printf("Error!");
- printf("Can't load rockbox.iaudio:");
+ printf("Can't load " BOOTFILE ": ");
printf(strerror(rc));
sleep(HZ*3);
power_off();
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index cdf939c1fc..ec5fbd1a38 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -348,7 +348,7 @@ void* main(void)
rc=load_firmware(loadbuffer, BOOTFILE, MAX_LOADSIZE);
if (rc < EOK) {
printf("Error!");
- printf("Can't load rockbox.ipod:");
+ printf("Can't load " BOOTFILE ": ");
printf(strerror(rc));
} else {
printf("Rockbox loaded.");
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 692a7bdfb4..f227e0f4f3 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -23,6 +23,8 @@
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
+
+#include "config.h"
#include "common.h"
#include "cpu.h"
#include "file.h"
@@ -292,7 +294,7 @@ int load_mi4(unsigned char* buf, char* firmware, unsigned int buffer_size)
unsigned long sum;
char filename[MAX_PATH];
- snprintf(filename,sizeof(filename),"/.rockbox/%s",firmware);
+ snprintf(filename,sizeof(filename), BOOTDIR "/%s",firmware);
fd = open(filename, O_RDONLY);
if(fd < 0)
{
@@ -610,14 +612,14 @@ void* main(void)
printf("Loading Rockbox...");
rc=load_mi4(loadbuffer, BOOTFILE, MAX_LOADSIZE);
if (rc < EOK) {
- printf("Can't load %s:", BOOTFILE);
+ printf("Can't load " BOOTFILE ": ");
printf(strerror(rc));
#ifdef OLD_BOOTFILE
/* Try loading rockbox from old rockbox.e200/rockbox.h10 format */
rc=load_firmware(loadbuffer, OLD_BOOTFILE, MAX_LOADSIZE);
if (rc < EOK) {
- printf("Can't load %s:", OLD_BOOTFILE);
+ printf("Can't load " OLD_BOOTFILE" : ");
error(EBOOTFILE, rc);
}
#endif