From 6c6a2ed9108a2937c644042b35c72ffc38f5ecce Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Fri, 2 May 2008 03:27:17 +0000 Subject: Working ROLO for the Gigabeat F/X git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17304 a1c6a512-1295-4272-9138-f99709370657 --- firmware/rolo.c | 6 +++--- firmware/target/arm/s3c2440/app.lds | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/firmware/rolo.c b/firmware/rolo.c index a76a8925b0..1b29affb25 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c @@ -41,7 +41,7 @@ #endif #if !defined(IRIVER_IFP7XX_SERIES) && \ - (CONFIG_CPU != PP5002) && (CONFIG_CPU != S3C2440) + (CONFIG_CPU != PP5002) /* FIX: this doesn't work on iFP, 3rd Gen ipods */ #define IRQ0_EDGE_TRIGGER 0x80 @@ -168,7 +168,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest, "mov pc, r0 \n" ); -#elif defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) +#elif defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) || (CONFIG_CPU == S3C2440) /* Flush and invalidate caches */ invalidate_icache(); @@ -226,7 +226,7 @@ int rolo_load(const char* filename) length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA; #if defined(CPU_COLDFIRE) || defined(CPU_PP) || (CONFIG_CPU==DM320) \ - || defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) + || defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) || (CONFIG_CPU == S3C2440) /* Read and save checksum */ lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); if (read(fd, &file_checksum, 4) != 4) { diff --git a/firmware/target/arm/s3c2440/app.lds b/firmware/target/arm/s3c2440/app.lds index e999ef0760..7321df8af2 100644 --- a/firmware/target/arm/s3c2440/app.lds +++ b/firmware/target/arm/s3c2440/app.lds @@ -33,6 +33,11 @@ MEMORY SECTIONS { + /* This nice little hack is to trick ROLO into loading in a certain place + * CRT0.s takes care of making sure the code is where it needs to be + */ + loadaddress = 0x31000000; + .vectors DRAMORIG : { _vectorstart = .; -- cgit v1.2.3