Fix include problem
[kugel-rb.git] / firmware / target / arm / imx31 / boot.lds
blob6030044c8541dc671d8615bc007736cfc13f0ace
1 #include "config.h"
2 #include "imx31l.h"
4 ENTRY(start)
5 OUTPUT_FORMAT(elf32-littlearm)
6 OUTPUT_ARCH(arm)
7 STARTUP(target/arm/imx31/crt0.o)
9 #define DRAMSIZE (1 << 20) /* Limit 1 MB for bootloader */
11 #define DRAMORIG  0x02000000
12 /* #define IRAMORIG 0x1FFFC000 */
13 #define IRAM      DRAM
14 #define IRAMSIZE  IRAM_SIZE
15 #define IRAMORIG  DRAMORIG
16 #define FLASHORIG 0x0000000
17 #define FLASHSIZE 1M
19 MEMORY
21    DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
22    QHARRAY : ORIGIN = QHARRAY_PHYS_ADDR, LENGTH = QHARRAY_SIZE
25 SECTIONS
27     . = DRAMORIG;
29     .text :
30     {
31         *(.init.text)
32         *(.text*)
33         *(.icode)
34         *(.glue_7)
35         *(.glue_7t)
36         . = ALIGN(0x4);
37     } > DRAM
39     .rodata :
40     {
41         *(.rodata)  /* problems without this, dunno why */
42         *(.rodata*)
43         *(.rodata.str1.1)
44         *(.rodata.str1.4)
45         . = ALIGN(0x4);
47         /* Pseudo-allocate the copies of the data sections */
48         _datacopy = .;
49     } > DRAM
51     .data :
52     {
53         *(.irodata)
54         *(.idata)
55         *(.data*)
56         . = ALIGN(0x4);
57         *(.sdmacode)
58         . = ALIGN(0x4);
59         _dataend = . ;
60     } > DRAM
62 #if 0 /* Unneeded at the moment */
63     /* .ncdata section is placed at uncached physical alias address and is
64      * loaded at the proper cached virtual address - no copying is
65      * performed in the init code */
66     .ncdata . + NOCACHE_BASE :
67     {
68         . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
69         *(.ncdata*)
70         . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
71     } AT> DRAM
72 #endif
73     
74     .vectors 0x0 :
75     {
76         _vectorsstart = .;
77         *(.vectors);
78         KEEP(*(.vectors));
79         _vectorsend = .;
80     } AT > DRAM
81     _vectorscopy = LOADADDR(.vectors);
83     .stack (NOLOAD) :
84     {
85         *(.stack)
86         _stackbegin = .;
87         stackbegin = .;
88         . += 0x2000;
89         _stackend = .;
90         stackend = .;
91     } > IRAM
93     /* .bss and .ncbss are treated as a single section to use one init loop to
94      * zero it - note "_edata" and "_end" */
95     .bss (NOLOAD) :
96     {
97          _edata = .;
98          *(.bss*);
99          *(.ibss);
100          *(COMMON)
101          . = ALIGN(0x4);
102     } > DRAM
103     
104     .ncbss . + NOCACHE_BASE (NOLOAD) :
105     {
106         . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
107         *(.ncbss*)
108         . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
109     } AT> DRAM
111     .endaddr . - NOCACHE_BASE (NOLOAD) :
112     {
113         _end = .;
114     } > DRAM
116     .qharray (NOLOAD) :
117     {
118         _qharray = .;
119         *(.qharray)
120         _qharrayend = .;
121     } > QHARRAY