Index: embios/trunk/init.c |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | if (ucl_decompress(addr, size, &_initstart, (uint32_t*)&size)) goto dataflashfailed;
|
101 | 101 | }
|
102 | 102 | else if (read(fd, &_initstart, size) != size) goto dataflashfailed;
|
103 | | - if (execimage(&_initstart) < 0) return;
|
| 103 | + if (execimage(&_initstart) >= 0) return;
|
104 | 104 | }
|
105 | 105 | dataflashfailed:
|
106 | 106 | #endif
|
— | — | @@ -114,14 +114,14 @@ |
115 | 115 | if (bootinfo.bootflashflags & 1)
|
116 | 116 | {
|
117 | 117 | if (ucl_decompress(addr, size, &_initstart, (uint32_t*)&size)) goto bootflashfailed;
|
118 | | - if (execimage(&_initstart) < 0) return;
|
| 118 | + if (execimage(&_initstart) >= 0) return;
|
119 | 119 | }
|
120 | 120 | else if (bootinfo.bootflashflags & 2)
|
121 | 121 | {
|
122 | 122 | memcpy(&_initstart, addr, size);
|
123 | | - if (execimage(&_initstart) < 0) return;
|
| 123 | + if (execimage(&_initstart) >= 0) return;
|
124 | 124 | }
|
125 | | - else execimage(addr);
|
| 125 | + else if (execimage(addr) >= 0) return;
|
126 | 126 | #else
|
127 | 127 | if (bootinfo.bootflashflags & 1)
|
128 | 128 | {
|
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | }
|
134 | 134 | else if (bootflash_read(bootinfo.bootimagename, &_initstart, 0, size) != size)
|
135 | 135 | goto bootflashfailed;
|
136 | | - if (execimage(&_initstart) < 0) return;
|
| 136 | + if (execimage(&_initstart) >= 0) return;
|
137 | 137 | #endif
|
138 | 138 | }
|
139 | 139 | bootflashfailed:
|
— | — | @@ -140,18 +140,18 @@ |
141 | 141 | if (bootinfo.trymemmapped)
|
142 | 142 | {
|
143 | 143 | int size = bootinfo.memmappedsize;
|
144 | | - if (bootinfo.bootflashflags & 1)
|
| 144 | + if (bootinfo.memmappedflags & 1)
|
145 | 145 | {
|
146 | 146 | if (ucl_decompress(bootinfo.memmappedaddr, size, &_initstart, (uint32_t*)&size))
|
147 | 147 | goto memmappedfailed;
|
148 | | - if (execimage(&_initstart) < 0) return;
|
| 148 | + if (execimage(&_initstart) >= 0) return;
|
149 | 149 | }
|
150 | | - else if (bootinfo.bootflashflags & 2)
|
| 150 | + else if (bootinfo.memmappedflags & 2)
|
151 | 151 | {
|
152 | 152 | memcpy(&_initstart, bootinfo.memmappedaddr, size);
|
153 | | - if (execimage(&_initstart) < 0) return;
|
| 153 | + if (execimage(&_initstart) >= 0) return;
|
154 | 154 | }
|
155 | | - else if (execimage(bootinfo.memmappedaddr) < 0) return;
|
| 155 | + else if (execimage(bootinfo.memmappedaddr) >= 0) return;
|
156 | 156 | }
|
157 | 157 | memmappedfailed:
|
158 | 158 | if (bootinfo.trydataflash || bootinfo.trybootflash || bootinfo.trymemmapped)
|
Index: embios/trunk/target/ipodnano2g/ls.x |
— | — | @@ -6,9 +6,10 @@ |
7 | 7 | MEMORY
|
8 | 8 | {
|
9 | 9 | INIT : ORIGIN = 0x08000000, LENGTH = 0x01eff000
|
10 | | - INITSTACK : ORIGIN = 0x09eff000, LENGTH = 0x00001000
|
| 10 | + INITBSS : ORIGIN = 0x09e00000, LENGTH = 0x0017f000
|
| 11 | + INITSTACK : ORIGIN = 0x09f7f000, LENGTH = 0x00001000
|
11 | 12 | SRAM : ORIGIN = 0x22000000, LENGTH = 0x0002bdf0
|
12 | | - SDRAM : ORIGIN = 0x09f00000, LENGTH = 0x00100000
|
| 13 | + SDRAM : ORIGIN = 0x09f80000, LENGTH = 0x00100000
|
13 | 14 | }
|
14 | 15 |
|
15 | 16 | SECTIONS
|
— | — | @@ -61,7 +62,7 @@ |
62 | 63 | . += 0x400;
|
63 | 64 | _initstackend = .;
|
64 | 65 | _initbssend = .;
|
65 | | - } > INIT
|
| 66 | + } > INITBSS
|
66 | 67 |
|
67 | 68 | .ibss (NOLOAD) :
|
68 | 69 | {
|
Index: embios/trunk/target/ipodnano4g/ls.x |
— | — | @@ -6,9 +6,10 @@ |
7 | 7 | MEMORY
|
8 | 8 | {
|
9 | 9 | INIT : ORIGIN = 0x08000000, LENGTH = 0x01eff000
|
10 | | - INITSTACK : ORIGIN = 0x09eff000, LENGTH = 0x00001000
|
| 10 | + INITBSS : ORIGIN = 0x09e00000, LENGTH = 0x0017f000
|
| 11 | + INITSTACK : ORIGIN = 0x09f7f000, LENGTH = 0x00001000
|
11 | 12 | SRAM : ORIGIN = 0x22000000, LENGTH = 0x00030000
|
12 | | - SDRAM : ORIGIN = 0x09f00000, LENGTH = 0x00100000
|
| 13 | + SDRAM : ORIGIN = 0x09f80000, LENGTH = 0x00100000
|
13 | 14 | }
|
14 | 15 |
|
15 | 16 | SECTIONS
|
— | — | @@ -61,7 +62,7 @@ |
62 | 63 | . += 0x400;
|
63 | 64 | _initstackend = .;
|
64 | 65 | _initbssend = .;
|
65 | | - } > INIT
|
| 66 | + } > INITBSS
|
66 | 67 |
|
67 | 68 | .ibss (NOLOAD) :
|
68 | 69 | {
|