diff options
author | Vencislav Atanasov <user890104@freemyipod.org> | 2024-12-12 23:46:25 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-12-13 08:32:19 -0500 |
commit | 06963a5ce41450b57631e10ffb39d9012cbde39c (patch) | |
tree | c32bdc0034b33fa2fd1ef646ce2a31e0c0841f6e | |
parent | 0fef17206eb1cea53e8f7d57c7445c373864174d (diff) | |
download | rockbox-06963a5ce4.tar.gz rockbox-06963a5ce4.zip |
S5L8702: Clean up linker script, also add support for S5L8720
Tested on ipod6g (normal + bootloader).
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I64beed48e3d88436b9082d4ae387f39843ab2e20
-rw-r--r-- | firmware/target/arm/s5l8702/boot.lds | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/firmware/target/arm/s5l8702/boot.lds b/firmware/target/arm/s5l8702/boot.lds index 61f23b9c22..54a4d4d1ae 100644 --- a/firmware/target/arm/s5l8702/boot.lds +++ b/firmware/target/arm/s5l8702/boot.lds @@ -1,6 +1,7 @@ #define ASM #include "config.h" #include "cpu.h" +#include "crypto-s5l8702.h" /* IM3HDR_SZ */ ENTRY(start) #ifdef ROCKBOX_LITTLE_ENDIAN @@ -13,42 +14,25 @@ STARTUP(target/arm/s5l8702/crt0.o) #define MAX_LOADSIZE 8M /* reserved for loading Rockbox binary */ -#ifdef IPOD_NANO2G -#define DRAMORIG 0x08000000 + ((MEMORYSIZE - 1) * 0x100000) -#define DRAMSIZE 0x00100000 - -#define IRAMORIG 0x22000000 -#define IRAMSIZE 256K - -MEMORY -{ - DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE - IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE -} -#define LOAD_AREA IRAM -#define VECT_AREA IRAM -#define BSS_AREA DRAM - -#elif defined(IPOD_6G) +#if defined(IPOD_6G) || defined(IPOD_NANO3G) || defined(IPOD_NANO4G) MEMORY { DRAM : ORIGIN = DRAM_ORIG, LENGTH = DRAM_SIZE IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE - /* s5l8702 maps address 0 to ROM, IRAM or DRAM */ + /* s5l8702/s5l8720 maps address 0 to ROM, IRAM or DRAM */ VECT_AREA : ORIGIN = 0, LENGTH = 1K /* IRAM region where loaded IM3 body will be moved and executed, - preserving the loaded IM3 header (0x800 bytes) at IRAM1_ORIG */ - MOVE_AREA : ORIGIN = IRAM1_ORIG + 0x800, - LENGTH = IRAM1_SIZE - 0x800 + preserving the loaded IM3 header (0x600 or 0x800 bytes) at IRAM1_ORIG */ + MOVE_AREA : ORIGIN = IRAM1_ORIG + IM3HDR_SZ, + LENGTH = IRAM1_SIZE - IM3HDR_SZ /* DRAM region for BSS */ BSS_AREA : ORIGIN = DRAM_ORIG + MAX_LOADSIZE, LENGTH = DRAM_SIZE - MAX_LOADSIZE - TTB_SIZE } #define LOAD_AREA MOVE_AREA - #else #error No target defined! #endif @@ -56,7 +40,6 @@ MEMORY SECTIONS { - _dfuloadaddr = IRAM0_ORIG ; _movestart = LOADADDR(.text) ; _moveend = LOADADDR(.data) + SIZEOF(.data) ; |