1
0
Fork 0
forked from len0rd/rockbox

Enable ROM file generation for H120/H140.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11947 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2007-01-08 18:21:12 +00:00
parent dc040f0c8a
commit b1af4e6cc8
4 changed files with 68 additions and 18 deletions

View file

@ -190,6 +190,9 @@ $(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE)
echo "fake" > $@; \ echo "fake" > $@; \
fi fi
$(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin
$(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@
include $(TOOLSDIR)/make.inc include $(TOOLSDIR)/make.inc
$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang $(OBJDIR)/lang.o: lang/$(LANGUAGE).lang

View file

@ -1,38 +1,39 @@
#include "config.h" #include "config.h"
ENTRY(start) ENTRY(start)
#ifdef CPU_COLDFIRE #ifdef CPU_COLDFIRE
OUTPUT_FORMAT(elf32-m68k) OUTPUT_FORMAT(elf32-m68k)
#else
OUTPUT_FORMAT(elf32-sh)
#endif
#ifdef CPU_COLDFIRE
INPUT(target/coldfire/crt0.o) INPUT(target/coldfire/crt0.o)
#elif defined(CPU_PP) #elif defined(CPU_PP)
OUTPUT_FORMAT(elf32-littlearm)
INPUT(target/arm/crt0-pp.o) INPUT(target/arm/crt0-pp.o)
#elif defined(CPU_ARM) #elif defined(CPU_ARM)
OUTPUT_FORMAT(elf32-littlearm)
INPUT(target/arm/crt0.o) INPUT(target/arm/crt0.o)
#elif CONFIG_CPU == SH7034 #elif CONFIG_CPU == SH7034
OUTPUT_FORMAT(elf32-sh)
INPUT(target/sh/crt0.o) INPUT(target/sh/crt0.o)
#else #else
OUTPUT_FORMAT(elf32-sh)
INPUT(crt0.o) INPUT(crt0.o)
#endif #endif
#if MEMORYSIZE >= 32 #if MEMORYSIZE >= 32
#define PLUGINSIZE 0xC0000 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
#else #else
#define PLUGINSIZE 0x8000 #define PLUGINSIZE 0x8000
#endif #endif
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE
#ifdef IRIVER_H100 #ifdef IRIVER_H100_SERIES
#define CODECSIZE CODEC_SIZE
#define DRAMORIG 0x31000000 #define DRAMORIG 0x31000000
#define IRAMORIG 0x10000000 #define IRAMORIG 0x10000000
#define IRAMSIZE 0x18000 #define IRAMSIZE 0xc000
#define FLASHORIG 0x001f0000 #define FLASHORIG 0x00100028
#define FLASHSIZE 2M #define FLASHSIZE 0x000eff80
#else #else
#define DRAMORIG 0x09000000 #define DRAMORIG 0x09000000
#define IRAMORIG 0x0f000000 #define IRAMORIG 0x0f000000
@ -41,7 +42,18 @@ INPUT(crt0.o)
#define FLASHSIZE 256K - ROM_START #define FLASHSIZE 256K - ROM_START
#endif #endif
#define ENDADDR (DRAMORIG + DRAMSIZE) #ifdef CODECSIZE
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE
/* Where the codec buffer ends, and the plugin buffer starts */
#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
#else
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE
/* Where the audio buffer ends, and the plugin buffer starts */
#define ENDADDR ENDAUDIOADDR
#endif
/* End of the audio buffer, where the codec/plugin buffer starts */
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
MEMORY MEMORY
{ {
@ -78,6 +90,11 @@ SECTIONS
. = ALIGN(0x10); /* Maintain proper alignment for .text section */ . = ALIGN(0x10); /* Maintain proper alignment for .text section */
} > DRAM } > DRAM
/DISCARD/ :
{
*(.eh_frame)
}
/* TRICK ALERT! Newer versions of the linker don't allow output sections /* TRICK ALERT! Newer versions of the linker don't allow output sections
to overlap even if one of them is empty, so advance the location pointer to overlap even if one of them is empty, so advance the location pointer
"by hand" */ "by hand" */
@ -122,29 +139,48 @@ SECTIONS
. += 0x2000; . += 0x2000;
_stackend = .; _stackend = .;
stackend = .; stackend = .;
} > DRAM } > IRAM
#ifdef CPU_COLDFIRE
.bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
#else
.bss : .bss :
#endif
{ {
_edata = .; _edata = .;
*(.bss) *(.bss*)
*(COMMON) *(COMMON)
. = ALIGN(0x4);
_end = .; _end = .;
} > DRAM } > DRAM
.audiobuf : .audiobuf ALIGN(4):
{ {
. = ALIGN(0x4);
_audiobuffer = .; _audiobuffer = .;
audiobuffer = .;
} > DRAM } > DRAM
#ifdef CODECSIZE
.audiobufend ENDAUDIOADDR:
#else
.audiobufend ENDADDR: .audiobufend ENDADDR:
#endif
{ {
_audiobufend = .; _audiobufend = .;
audiobufend = .;
} > DRAM } > DRAM
#ifdef CODECSIZE
.codec ENDAUDIOADDR:
{
codecbuf = .;
_codecbuf = .;
}
#endif
.plugin ENDADDR: .plugin ENDADDR:
{ {
_pluginbuf = .; _pluginbuf = .;
pluginbuf = .;
} }
} }

View file

@ -216,6 +216,16 @@ sub buildzip {
if( filesize("rombox.ucl") > 1000) { if( filesize("rombox.ucl") > 1000) {
`cp rombox.ucl .rockbox/`; # UCL for flashing `cp rombox.ucl .rockbox/`; # UCL for flashing
} }
# Check for rombox.target
if ($image=~/(.*)\.(\w+)$/)
{
my $romfile = "rombox.$2";
if (filesize($romfile) > 1000)
{
`cp $romfile .rockbox/`;
}
}
} }
mkdir ".rockbox/docs", 0777; mkdir ".rockbox/docs", 0777;

3
tools/configure vendored
View file

@ -767,7 +767,7 @@ EOF
output="rockbox.iriver" output="rockbox.iriver"
appextra="recorder:gui" appextra="recorder:gui"
archosrom="" archosrom=""
flash="" flash="$pwd/rombox.iriver"
plugins="yes" plugins="yes"
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack libmusepack libalac libfaad libm4a" codecs="libmad liba52 libffmpegFLAC libTremor libwavpack libmusepack libalac libfaad libm4a"
# toolset is the tools within the tools directory that we build for # toolset is the tools within the tools directory that we build for
@ -1244,6 +1244,7 @@ fi
extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES
appsdir='\$(ROOTDIR)/bootloader' appsdir='\$(ROOTDIR)/bootloader'
apps="bootloader" apps="bootloader"
flash=""
if test -n "$boottool"; then if test -n "$boottool"; then
tool="$boottool" tool="$boottool"
fi fi