forked from len0rd/rockbox
imx233/fuze+: rework linker script to load the bootloader at ram start + 1Mb to leave a load for the firmware
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30521 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dad541a391
commit
d945c36677
2 changed files with 26 additions and 14 deletions
|
|
@ -6,28 +6,35 @@ OUTPUT_FORMAT(elf32-littlearm)
|
|||
OUTPUT_ARCH(arm)
|
||||
STARTUP(target/arm/imx233/crt0.o)
|
||||
|
||||
/* Leave a hole at the beginning of the RAM to load the firmware */
|
||||
#define RAM_HOLE 1024 * 1024
|
||||
|
||||
/* Make a difference between virtual and physical address so that we can use
|
||||
* the resulting elf file with the elftosb tools which loads at the *physical*
|
||||
* address */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE
|
||||
DRAM : ORIGIN = CACHED_DRAM_ADDR, LENGTH = DRAM_SIZE - TTB_SIZE - FRAME_SIZE
|
||||
UNCACHED_DRAM : ORIGIN = UNCACHED_DRAM_ADDR, LENGTH = DRAM_SIZE - TTB_SIZE - FRAME_SIZE
|
||||
DRAM : ORIGIN = CACHED_DRAM_ADDR + RAM_HOLE, LENGTH = DRAM_SIZE - TTB_SIZE - FRAME_SIZE - RAM_HOLE
|
||||
UDRAM : ORIGIN = UNCACHED_DRAM_ADDR + RAM_HOLE, LENGTH = DRAM_SIZE - TTB_SIZE - FRAME_SIZE - RAM_HOLE
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
loadaddress = UNCACHED_DRAM_ADDR;
|
||||
_loadaddress = UNCACHED_DRAM_ADDR;
|
||||
loadaddressend = UNCACHED_DRAM_ADDR + RAM_HOLE;
|
||||
_loadaddressend = UNCACHED_DRAM_ADDR + RAM_HOLE;
|
||||
|
||||
.text :
|
||||
{
|
||||
*(.text*)
|
||||
} > DRAM
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data*)
|
||||
*(.rodata*)
|
||||
_dataend = . ;
|
||||
} > DRAM
|
||||
|
||||
.iram :
|
||||
.itext :
|
||||
{
|
||||
_iramstart = .; // always 0
|
||||
*(.vectors)
|
||||
|
|
@ -39,7 +46,7 @@ SECTIONS
|
|||
_iramend = .;
|
||||
} > IRAM AT> DRAM
|
||||
|
||||
_iramcopy = LOADADDR(.iram);
|
||||
_iramcopy = LOADADDR(.itext);
|
||||
|
||||
.ibss (NOLOAD) :
|
||||
{
|
||||
|
|
@ -58,6 +65,9 @@ SECTIONS
|
|||
stackend = .;
|
||||
} > DRAM
|
||||
|
||||
/* physical address of the stack */
|
||||
stackend_phys = stackend - CACHED_DRAM_ADDR + UNCACHED_DRAM_ADDR;
|
||||
|
||||
/* treat .bss and .ncbss as a single section */
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
|
|
@ -73,7 +83,7 @@ SECTIONS
|
|||
. = ALIGN(CACHEALIGN_SIZE);
|
||||
} AT> DRAM
|
||||
|
||||
.bssendadr . - UNCACHED_DRAM_ADDR + CACHED_DRAM_ADDR (NOLOAD) :
|
||||
.bssendadr (NOLOAD) :
|
||||
{
|
||||
_end = .;
|
||||
} > DRAM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue