Rockchip rk27xx port initial commit. This is still work in progress.
[kugel-rb.git] / firmware / target / arm / rk27xx / boot.lds
blobb7bc9beac07150bac114a269dec648e6f8283114
1 #include "config.h"
3 ENTRY(start)
4 #ifdef ROCKBOX_LITTLE_ENDIAN
5 OUTPUT_FORMAT(elf32-littlearm)
6 #else
7 OUTPUT_FORMAT(elf32-bigarm)
8 #endif
9 OUTPUT_ARCH(arm)
10 STARTUP(target/arm/rk27xx/crt0.o)
12 #define DRAMORIG 0x60000000
13 #define DRAMSIZE (MEMORYSIZE * 0x100000)
15 #define IRAMORIG 0x00000000
16 #define IRAMSIZE 4K
18 MEMORY
20     DRAM  : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
21     IRAM  : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
24 SECTIONS
26   .intvect : {
27     _intvectstart = . ;
28     *(.intvect)
29     _intvectend = _newstart ;  
30   } > IRAM AT > DRAM
31   _intvectcopy = LOADADDR(.intvect) ;
33   .text : {
34     *(.init.text)
35     *(.text*)
36     *(.glue_7*)
37   } > DRAM
39   .data : {
40     *(.rodata*)
41     *(.data*)
42     *(.ncdata*);
43     . = ALIGN(0x4);
44   } > DRAM
46   .idata : {
47     _datastart = . ;
48     *(.irodata)
49     *(.icode)
50     *(.idata)
51     . = ALIGN(0x4);
52     _dataend = . ;
53    } > DRAM
54    _datacopy = LOADADDR(.idata) ;
56   .stack (NOLOAD) :
57   {
58      *(.stack)
59      _stackbegin = .;
60      stackbegin = .;
61      . += 0x2000;
62      _stackend = .;
63      stackend = .;
64      _irqstackbegin = .;
65      . += 0x400;
66      _irqstackend = .;
67      _fiqstackbegin = .;
68      . += 0x400;
69      _fiqstackend = .;
70   } > DRAM
72   .bss (NOLOAD) : {
73      _edata = .;
74      *(.bss*);
75      *(.ibss);
76      *(.ncbss*);
77      *(COMMON);
78     . = ALIGN(0x4);
79      _end = .;
80   } > DRAM