summaryrefslogtreecommitdiffstats
path: root/apps/plugins/firmware_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/firmware_flash.c')
-rw-r--r--apps/plugins/firmware_flash.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c
index 7353a3e8c6..8f7f187607 100644
--- a/apps/plugins/firmware_flash.c
+++ b/apps/plugins/firmware_flash.c
@@ -608,6 +608,13 @@ void DoUserDialog(char* filename)
rb->lcd_setfont(FONT_SYSFIXED);
+ /* this can only work if Rockbox runs in DRAM, not flash ROM */
+ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
+ { /* we're running from flash */
+ rb->splash(HZ*3, true, "Not from ROM");
+ return; /* exit */
+ }
+
/* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{
@@ -829,6 +836,13 @@ void DoUserDialog(char* filename)
tCheckROM result;
bool is_romless;
+ /* this can only work if Rockbox runs in DRAM, not flash ROM */
+ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
+ { /* we're running from flash */
+ rb->splash(HZ*3, true, "Not from ROM");
+ return; /* exit */
+ }
+
/* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{