summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2020-10-25 23:48:26 +0000
committerSolomon Peachy <pizza@shaftnet.org>2020-10-26 01:07:14 +0000
commit129001909d36161b4850142f29eeafc295b92a3e (patch)
treeac324ab92eab17f65c291fede8fb2f9e65562784
parentf7e0ce8fb96d9e8d8428925abac7d9a6ceb3d83a (diff)
downloadrockbox-129001909d36161b4850142f29eeafc295b92a3e.tar.gz
rockbox-129001909d36161b4850142f29eeafc295b92a3e.tar.bz2
rockbox-129001909d36161b4850142f29eeafc295b92a3e.zip
h300: enable support for iriver_flash
This also modifies the configuration file to include macros defined in the H100 / H120 implementation. Change-Id: Iae845889c98661ec548c04fc57e733dcc346c0f1
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/iriver_flash.c4
-rw-r--r--firmware/export/config/iriverh300.h11
3 files changed, 12 insertions, 5 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index c0246eecc4..910ffe4161 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -61,7 +61,7 @@ iriverify.c
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) /* Requires real hardware */
-#if defined(IRIVER_H100_SERIES)
+#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
iriver_flash.c
#endif
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index cecd4990a9..2ef6872c7d 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -27,7 +27,7 @@
unsigned char *audiobuf;
ssize_t audiobuf_size;
-#ifndef IRIVER_H100_SERIES
+#if !defined(IRIVER_H100_SERIES) && !defined(IRIVER_H300_SERIES)
#error this platform is not (yet) flashable
#endif
@@ -48,7 +48,7 @@ struct flash_info
char name[32];
};
-#ifdef IRIVER_H100_SERIES
+#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
#define SEC_SIZE 4096
#define BOOTLOADER_ERASEGUARD (BOOTLOADER_ENTRYPOINT / SEC_SIZE)
enum sections {
diff --git a/firmware/export/config/iriverh300.h b/firmware/export/config/iriverh300.h
index e2f16d2b4e..ca0df7217e 100644
--- a/firmware/export/config/iriverh300.h
+++ b/firmware/export/config/iriverh300.h
@@ -157,6 +157,9 @@
/* Define this if you want to use coldfire's i2c interface */
#define CONFIG_I2C I2C_COLDFIRE
+/* Define this if you can run rockbox from flash memory */
+#define HAVE_FLASHED_ROCKBOX
+
/* The size of the flash ROM */
#define FLASH_SIZE 0x400000
@@ -184,13 +187,17 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-#define BOOTLOADER_ENTRYPOINT 0x001F0000
-#define FLASH_ENTRYPOINT 0x00001000
+#define BOOTLOADER_ENTRYPOINT 0x003F0000
+#define FLASH_RAMIMAGE_ENTRY 0x00001000
+#define FLASH_ROMIMAGE_ENTRY 0x00100000
#define FLASH_MAGIC 0xfbfbfbf1
/* Define this if there is an EEPROM chip */
#define HAVE_EEPROM
+/* Define this if the EEPROM chip is used */
+#define HAVE_EEPROM_SETTINGS
+
/* Define this for FM radio input available */
#define HAVE_FMRADIO_IN