From f692c5dc4bf1a31d967eede16076c47d2dccafba Mon Sep 17 00:00:00 2001 From: Alex Bennee Date: Thu, 13 Nov 2008 19:56:06 +0000 Subject: [PATCH] Make /.rockbox a configurable path While the bootloader is hard coded to look for .rockbox we do have the ability to run additional firmware files from the File Browser. However they will most likely fail unless you have unziped the while new build ontop of the old one. This patch adds the ability to specify a different root. This is useful for testing. It also means any messing around or config hacking you do won't impact your normal working install. You just won't be able to boot directly into such a firmware. --- apps/settings.h | 9 +++++++-- tools/configure | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/apps/settings.h b/apps/settings.h index 8448059..c5658aa 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -57,10 +57,15 @@ struct opt_items { #define ROCKBOX_DIR "." #define ROCKBOX_DIR_LEN 1 #else -#define ROCKBOX_DIR "/.rockbox" -#define ROCKBOX_DIR_LEN 9 + +/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */ +#ifndef ROCKBOX_DIR +#error ROCKBOX_DIR not defined (should be in autoconf.h) +#endif +#define ROCKBOX_DIR_LEN sizeof(ROCKBOX_DIR) #endif + #define FONT_DIR ROCKBOX_DIR "/fonts" #define LANG_DIR ROCKBOX_DIR "/langs" #define WPS_DIR ROCKBOX_DIR "/wps" diff --git a/tools/configure b/tools/configure index 0f6c3bb..b371b80 100755 --- a/tools/configure +++ b/tools/configure @@ -15,6 +15,8 @@ use_logf="#undef ROCKBOX_HAS_LOGF" scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` +rbdir="/.rockbox" + # # Begin Function Definitions # @@ -607,6 +609,13 @@ cat < autoconf.h \ -e "s,@ENDIAN@,${defendian},g" \ -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \ -e "s,@config_rtc@,$config_rtc,g" \ -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \ + -e "s,@RBDIR@,${rbdir},g" \ < autoconf.h \ @config_rtc@ @have_rtc_alarm@ +/* root of Rockbox */ +#define ROCKBOX_DIR "@RBDIR@" + #endif /* __BUILD_AUTOCONF_H */ EOF -- 1.5.6.4