diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2008-03-27 23:58:03 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2008-03-27 23:58:03 +0000 |
commit | 82c52302bdc664fdcb177811c65c2891d53ef73a (patch) | |
tree | 0e84d262d97cc3a3b9e9983780d51cc3c18eb0db /firmware/target/coldfire | |
parent | 8406d92475024bec99a99371c3a8c4b243ff2015 (diff) | |
download | rockbox-82c52302bdc664fdcb177811c65c2891d53ef73a.tar.gz rockbox-82c52302bdc664fdcb177811c65c2891d53ef73a.zip |
split boot.lds and move it into the target tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16855 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r-- | firmware/target/coldfire/iaudio/boot.lds | 90 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/boot.lds | 89 |
2 files changed, 179 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/boot.lds b/firmware/target/coldfire/iaudio/boot.lds new file mode 100644 index 0000000000..17b1457747 --- /dev/null +++ b/firmware/target/coldfire/iaudio/boot.lds | |||
@@ -0,0 +1,90 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-m68k) | ||
5 | INPUT(target/coldfire/crt0.o) | ||
6 | |||
7 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
8 | |||
9 | #if defined(IAUDIO_X5) || defined(IAUDIO_M5) | ||
10 | #define DRAMORIG 0x31000000 | ||
11 | #define IRAMORIG 0x10000000 | ||
12 | #define IRAMSIZE 0x20000 | ||
13 | #define FLASHORIG 0x00010000 | ||
14 | #define FLASHSIZE 4M | ||
15 | #elif defined(IAUDIO_M3) | ||
16 | #define DRAMORIG 0x31000000 | ||
17 | #define IRAMORIG 0x10000000 | ||
18 | #define IRAMSIZE 0x18000 | ||
19 | #define FLASHORIG 0x00010000 | ||
20 | #define FLASHSIZE 4M | ||
21 | #endif | ||
22 | |||
23 | MEMORY | ||
24 | { | ||
25 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
26 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
27 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | ||
28 | } | ||
29 | |||
30 | SECTIONS | ||
31 | { | ||
32 | .vectors : | ||
33 | { | ||
34 | *(.init.text) | ||
35 | _datacopy = .; | ||
36 | } > FLASH | ||
37 | |||
38 | .data : AT ( _datacopy ) | ||
39 | { | ||
40 | _datastart = .; | ||
41 | KEEP(*(.resetvectors)); | ||
42 | *(.resetvectors); | ||
43 | KEEP(*(.vectors)); | ||
44 | *(.vectors); | ||
45 | . = ALIGN(0x200); | ||
46 | *(.icode) | ||
47 | *(.irodata) | ||
48 | *(.idata) | ||
49 | *(.data*) | ||
50 | . = ALIGN(0x4); | ||
51 | _dataend = .; | ||
52 | . = ALIGN(0x10); /* Maintain proper alignment for .text section */ | ||
53 | } > IRAM | ||
54 | |||
55 | /* TRICK ALERT! Newer versions of the linker don't allow output sections | ||
56 | to overlap even if one of them is empty, so advance the location pointer | ||
57 | "by hand" */ | ||
58 | .text LOADADDR(.data) + SIZEOF(.data) : | ||
59 | { | ||
60 | *(.init.text) | ||
61 | *(.text*) | ||
62 | . = ALIGN(0x4); | ||
63 | } > FLASH | ||
64 | |||
65 | .rodata : | ||
66 | { | ||
67 | *(.rodata*) | ||
68 | . = ALIGN(0x4); | ||
69 | _iramcopy = .; | ||
70 | } > FLASH | ||
71 | |||
72 | .stack : | ||
73 | { | ||
74 | *(.stack) | ||
75 | _stackbegin = .; | ||
76 | stackbegin = .; | ||
77 | . += 0x2000; | ||
78 | _stackend = .; | ||
79 | stackend = .; | ||
80 | } > IRAM | ||
81 | |||
82 | .bss DRAMORIG+0x800000: | ||
83 | { | ||
84 | _edata = .; | ||
85 | *(.ibss) | ||
86 | *(.bss*) | ||
87 | *(COMMON) | ||
88 | _end = .; | ||
89 | } > DRAM | ||
90 | } | ||
diff --git a/firmware/target/coldfire/iriver/boot.lds b/firmware/target/coldfire/iriver/boot.lds new file mode 100644 index 0000000000..4e2619f764 --- /dev/null +++ b/firmware/target/coldfire/iriver/boot.lds | |||
@@ -0,0 +1,89 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-m68k) | ||
5 | INPUT(target/coldfire/crt0.o) | ||
6 | |||
7 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
8 | |||
9 | #ifdef IRIVER_H100_SERIES | ||
10 | #define DRAMORIG 0x31000000 | ||
11 | #define IRAMORIG 0x10000000 | ||
12 | #define IRAMSIZE 0x18000 | ||
13 | #define FLASHORIG 0x001f0000 | ||
14 | #define FLASHSIZE 2M | ||
15 | #elif defined(IRIVER_H300_SERIES) | ||
16 | #define DRAMORIG 0x31000000 | ||
17 | #define IRAMORIG 0x10000000 | ||
18 | #define IRAMSIZE 0x18000 | ||
19 | #define FLASHORIG 0x003f0000 | ||
20 | #define FLASHSIZE 4M | ||
21 | #endif | ||
22 | |||
23 | MEMORY | ||
24 | { | ||
25 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
26 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
27 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | ||
28 | } | ||
29 | |||
30 | SECTIONS | ||
31 | { | ||
32 | .vectors : | ||
33 | { | ||
34 | _datacopy = .; | ||
35 | } > FLASH | ||
36 | |||
37 | .data : AT ( _datacopy ) | ||
38 | { | ||
39 | _datastart = .; | ||
40 | KEEP(*(.resetvectors)); | ||
41 | *(.resetvectors); | ||
42 | KEEP(*(.vectors)); | ||
43 | *(.vectors); | ||
44 | . = ALIGN(0x200); | ||
45 | *(.icode) | ||
46 | *(.irodata) | ||
47 | *(.idata) | ||
48 | *(.data*) | ||
49 | . = ALIGN(0x4); | ||
50 | _dataend = .; | ||
51 | . = ALIGN(0x10); /* Maintain proper alignment for .text section */ | ||
52 | } > IRAM | ||
53 | |||
54 | /* TRICK ALERT! Newer versions of the linker don't allow output sections | ||
55 | to overlap even if one of them is empty, so advance the location pointer | ||
56 | "by hand" */ | ||
57 | .text LOADADDR(.data) + SIZEOF(.data) : | ||
58 | { | ||
59 | *(.init.text) | ||
60 | *(.text*) | ||
61 | . = ALIGN(0x4); | ||
62 | } > FLASH | ||
63 | |||
64 | .rodata : | ||
65 | { | ||
66 | *(.rodata*) | ||
67 | . = ALIGN(0x4); | ||
68 | _iramcopy = .; | ||
69 | } > FLASH | ||
70 | |||
71 | .stack : | ||
72 | { | ||
73 | *(.stack) | ||
74 | _stackbegin = .; | ||
75 | stackbegin = .; | ||
76 | . += 0x2000; | ||
77 | _stackend = .; | ||
78 | stackend = .; | ||
79 | } > IRAM | ||
80 | |||
81 | .bss DRAMORIG+0x800000: | ||
82 | { | ||
83 | _edata = .; | ||
84 | *(.ibss) | ||
85 | *(.bss*) | ||
86 | *(COMMON) | ||
87 | _end = .; | ||
88 | } > DRAM | ||
89 | } | ||