summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/Makefile3
-rw-r--r--firmware/rom.lds70
-rwxr-xr-xtools/buildzip.pl10
-rwxr-xr-xtools/configure3
4 files changed, 68 insertions, 18 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 00612fa499..c63fa825c9 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -190,6 +190,9 @@ $(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE)
190 echo "fake" > $@; \ 190 echo "fake" > $@; \
191 fi 191 fi
192 192
193$(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin
194 $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@
195
193include $(TOOLSDIR)/make.inc 196include $(TOOLSDIR)/make.inc
194 197
195$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang 198$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang
diff --git a/firmware/rom.lds b/firmware/rom.lds
index 29e72d70c0..0967c6b88a 100644
--- a/firmware/rom.lds
+++ b/firmware/rom.lds
@@ -1,38 +1,39 @@
1#include "config.h" 1#include "config.h"
2 2
3ENTRY(start) 3ENTRY(start)
4
4#ifdef CPU_COLDFIRE 5#ifdef CPU_COLDFIRE
5OUTPUT_FORMAT(elf32-m68k) 6OUTPUT_FORMAT(elf32-m68k)
6#else
7OUTPUT_FORMAT(elf32-sh)
8#endif
9#ifdef CPU_COLDFIRE
10INPUT(target/coldfire/crt0.o) 7INPUT(target/coldfire/crt0.o)
11#elif defined(CPU_PP) 8#elif defined(CPU_PP)
9OUTPUT_FORMAT(elf32-littlearm)
12INPUT(target/arm/crt0-pp.o) 10INPUT(target/arm/crt0-pp.o)
13#elif defined(CPU_ARM) 11#elif defined(CPU_ARM)
12OUTPUT_FORMAT(elf32-littlearm)
14INPUT(target/arm/crt0.o) 13INPUT(target/arm/crt0.o)
15#elif CONFIG_CPU == SH7034 14#elif CONFIG_CPU == SH7034
15OUTPUT_FORMAT(elf32-sh)
16INPUT(target/sh/crt0.o) 16INPUT(target/sh/crt0.o)
17#else 17#else
18OUTPUT_FORMAT(elf32-sh)
18INPUT(crt0.o) 19INPUT(crt0.o)
19#endif 20#endif
20 21
21 22
22#if MEMORYSIZE >= 32 23#if MEMORYSIZE >= 32
23#define PLUGINSIZE 0xC0000 24#define PLUGINSIZE PLUGIN_BUFFER_SIZE
24#else 25#else
25#define PLUGINSIZE 0x8000 26#define PLUGINSIZE 0x8000
26#endif 27#endif
27 28
28#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE
29 29
30#ifdef IRIVER_H100 30#ifdef IRIVER_H100_SERIES
31#define CODECSIZE CODEC_SIZE
31#define DRAMORIG 0x31000000 32#define DRAMORIG 0x31000000
32#define IRAMORIG 0x10000000 33#define IRAMORIG 0x10000000
33#define IRAMSIZE 0x18000 34#define IRAMSIZE 0xc000
34#define FLASHORIG 0x001f0000 35#define FLASHORIG 0x00100028
35#define FLASHSIZE 2M 36#define FLASHSIZE 0x000eff80
36#else 37#else
37#define DRAMORIG 0x09000000 38#define DRAMORIG 0x09000000
38#define IRAMORIG 0x0f000000 39#define IRAMORIG 0x0f000000
@@ -41,7 +42,18 @@ INPUT(crt0.o)
41#define FLASHSIZE 256K - ROM_START 42#define FLASHSIZE 256K - ROM_START
42#endif 43#endif
43 44
44#define ENDADDR (DRAMORIG + DRAMSIZE) 45#ifdef CODECSIZE
46#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE
47/* Where the codec buffer ends, and the plugin buffer starts */
48#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
49#else
50#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE
51/* Where the audio buffer ends, and the plugin buffer starts */
52#define ENDADDR ENDAUDIOADDR
53#endif
54
55/* End of the audio buffer, where the codec/plugin buffer starts */
56#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
45 57
46MEMORY 58MEMORY
47{ 59{
@@ -74,10 +86,15 @@ SECTIONS
74 . = ALIGN(0x200); 86 . = ALIGN(0x200);
75 *(.data) 87 *(.data)
76 . = ALIGN(0x4); 88 . = ALIGN(0x4);
77 _dataend = .; 89 _dataend = .;
78 . = ALIGN(0x10); /* Maintain proper alignment for .text section */ 90 . = ALIGN(0x10); /* Maintain proper alignment for .text section */
79 } > DRAM 91 } > DRAM
80 92
93 /DISCARD/ :
94 {
95 *(.eh_frame)
96 }
97
81 /* TRICK ALERT! Newer versions of the linker don't allow output sections 98 /* TRICK ALERT! Newer versions of the linker don't allow output sections
82 to overlap even if one of them is empty, so advance the location pointer 99 to overlap even if one of them is empty, so advance the location pointer
83 "by hand" */ 100 "by hand" */
@@ -105,7 +122,7 @@ SECTIONS
105 *(.idata) 122 *(.idata)
106 _iramend = .; 123 _iramend = .;
107 } > IRAM 124 } > IRAM
108 125
109 .ibss (NOLOAD) : 126 .ibss (NOLOAD) :
110 { 127 {
111 _iedata = .; 128 _iedata = .;
@@ -122,29 +139,48 @@ SECTIONS
122 . += 0x2000; 139 . += 0x2000;
123 _stackend = .; 140 _stackend = .;
124 stackend = .; 141 stackend = .;
125 } > DRAM 142 } > IRAM
126 143
144#ifdef CPU_COLDFIRE
145 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
146#else
127 .bss : 147 .bss :
148#endif
128 { 149 {
129 _edata = .; 150 _edata = .;
130 *(.bss) 151 *(.bss*)
131 *(COMMON) 152 *(COMMON)
153 . = ALIGN(0x4);
132 _end = .; 154 _end = .;
133 } > DRAM 155 } > DRAM
134 156
135 .audiobuf : 157 .audiobuf ALIGN(4):
136 { 158 {
137 . = ALIGN(0x4);
138 _audiobuffer = .; 159 _audiobuffer = .;
160 audiobuffer = .;
139 } > DRAM 161 } > DRAM
140 162
163#ifdef CODECSIZE
164 .audiobufend ENDAUDIOADDR:
165#else
141 .audiobufend ENDADDR: 166 .audiobufend ENDADDR:
167#endif
142 { 168 {
143 _audiobufend = .; 169 _audiobufend = .;
170 audiobufend = .;
144 } > DRAM 171 } > DRAM
145 172
173#ifdef CODECSIZE
174 .codec ENDAUDIOADDR:
175 {
176 codecbuf = .;
177 _codecbuf = .;
178 }
179#endif
180
146 .plugin ENDADDR: 181 .plugin ENDADDR:
147 { 182 {
148 _pluginbuf = .; 183 _pluginbuf = .;
184 pluginbuf = .;
149 } 185 }
150} 186}
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index a30eb28e67..3eb974c10d 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -216,6 +216,16 @@ sub buildzip {
216 if( filesize("rombox.ucl") > 1000) { 216 if( filesize("rombox.ucl") > 1000) {
217 `cp rombox.ucl .rockbox/`; # UCL for flashing 217 `cp rombox.ucl .rockbox/`; # UCL for flashing
218 } 218 }
219
220 # Check for rombox.target
221 if ($image=~/(.*)\.(\w+)$/)
222 {
223 my $romfile = "rombox.$2";
224 if (filesize($romfile) > 1000)
225 {
226 `cp $romfile .rockbox/`;
227 }
228 }
219 } 229 }
220 230
221 mkdir ".rockbox/docs", 0777; 231 mkdir ".rockbox/docs", 0777;
diff --git a/tools/configure b/tools/configure
index 53be8eee91..1cfc4cc104 100755
--- a/tools/configure
+++ b/tools/configure
@@ -767,7 +767,7 @@ EOF
767 output="rockbox.iriver" 767 output="rockbox.iriver"
768 appextra="recorder:gui" 768 appextra="recorder:gui"
769 archosrom="" 769 archosrom=""
770 flash="" 770 flash="$pwd/rombox.iriver"
771 plugins="yes" 771 plugins="yes"
772 codecs="libmad liba52 libffmpegFLAC libTremor libwavpack libmusepack libalac libfaad libm4a" 772 codecs="libmad liba52 libffmpegFLAC libTremor libwavpack libmusepack libalac libfaad libm4a"
773 # toolset is the tools within the tools directory that we build for 773 # toolset is the tools within the tools directory that we build for
@@ -1244,6 +1244,7 @@ fi
1244 extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES 1244 extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES
1245 appsdir='\$(ROOTDIR)/bootloader' 1245 appsdir='\$(ROOTDIR)/bootloader'
1246 apps="bootloader" 1246 apps="bootloader"
1247 flash=""
1247 if test -n "$boottool"; then 1248 if test -n "$boottool"; then
1248 tool="$boottool" 1249 tool="$boottool"
1249 fi 1250 fi