| Index: emcore/trunk/loader/ipodnano3g/main.S | 
| — | — | @@ -1,1210 +0,0 @@ | 
| 2 |  | -@
 | 
| 3 |  | -@
 | 
| 4 |  | -@    emBIOS Loader for iPod Nano 3G
 | 
| 5 |  | -@
 | 
| 6 |  | -@    Copyright 2010 TheSeven
 | 
| 7 |  | -@
 | 
| 8 |  | -@
 | 
| 9 |  | -@    This file is part of emBIOS.
 | 
| 10 |  | -@
 | 
| 11 |  | -@    emBIOS is free software: you can redistribute it and/or
 | 
| 12 |  | -@    modify it under the terms of the GNU General Public License as
 | 
| 13 |  | -@    published by the Free Software Foundation, either version 2 of the
 | 
| 14 |  | -@    License, or (at your option) any later version.
 | 
| 15 |  | -@
 | 
| 16 |  | -@    emBIOS is distributed in the hope that it will be useful,
 | 
| 17 |  | -@    but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
| 18 |  | -@    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 | 
| 19 |  | -@    See the GNU General Public License for more details.
 | 
| 20 |  | -@
 | 
| 21 |  | -@    You should have received a copy of the GNU General Public License along
 | 
| 22 |  | -@    with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
 | 
| 23 |  | -@
 | 
| 24 |  | -@
 | 
| 25 |  | -
 | 
| 26 |  | -
 | 
| 27 |  | -#include "build/version.h"
 | 
| 28 |  | -
 | 
| 29 |  | -
 | 
| 30 |  | -.global _start
 | 
| 31 |  | -_start:
 | 
| 32 |  | -
 | 
| 33 |  | -	msr	cpsr_c, #0xd3
 | 
| 34 |  | -	mrc	p15, 0, r0,c1,c0
 | 
| 35 |  | -	bic	r0, r0, #1
 | 
| 36 |  | -	mcr	p15, 0, r0,c1,c0
 | 
| 37 |  | -	mov	r0, #0
 | 
| 38 |  | -	mcr	p15, 0, r0,c7,c5
 | 
| 39 |  | -	mcr	p15, 0, r0,c8,c7
 | 
| 40 |  | -	mcr	p15, 0, r0,c13,c0
 | 
| 41 |  | -	adr	lr, cacheflush_done
 | 
| 42 |  | -flushcache:
 | 
| 43 |  | -	mrc	p15, 0, r15,c7,c14,3
 | 
| 44 |  | -	bne	flushcache
 | 
| 45 |  | -	mov	r0, #0
 | 
| 46 |  | -	mcr	p15, 0, r0,c7,c10,4
 | 
| 47 |  | -	bx	lr
 | 
| 48 |  | -cacheflush_done:
 | 
| 49 |  | -	adr	sp, values1
 | 
| 50 |  | -	ldmia	sp!, {r4-r12}
 | 
| 51 |  | -	mcr	p15, 0, r11,c2,c0
 | 
| 52 |  | -	mov	r0, #-1
 | 
| 53 |  | -	mcr	p15, 0, r0,c3,c0
 | 
| 54 |  | -mmuloop:
 | 
| 55 |  | -	str	r12, [r11], #4
 | 
| 56 |  | -	add	r12, r12, #0x00100000
 | 
| 57 |  | -	cmp	r12, #0x38000000
 | 
| 58 |  | -	biccs	r12, r12, #0xc
 | 
| 59 |  | -	tst	r12, #0x40000000
 | 
| 60 |  | -	beq	mmuloop
 | 
| 61 |  | -	mcr	p15, 0, r10,c1,c0
 | 
| 62 |  | -dmaloop:
 | 
| 63 |  | -	add	r8, r8, #0x10
 | 
| 64 |  | -	bic	r9, r9, r4
 | 
| 65 |  | -	cmp	r4, r5
 | 
| 66 |  | -	movcs	r4, r5
 | 
| 67 |  | -	movcs	r8, #0
 | 
| 68 |  | -	orr	r9, r9, r4
 | 
| 69 |  | -	stmia	r11!, {r6-r9}
 | 
| 70 |  | -	add	r6, r6, r4,lsl#1
 | 
| 71 |  | -	subs	r5, r5, r4
 | 
| 72 |  | -	bne	dmaloop
 | 
| 73 |  | -	ldmia	sp!, {r0-r12}        @ R0 = SYSCONBASE (temporary)
 | 
| 74 |  | -	str	r1, [r0,#0x48]
 | 
| 75 |  | -	str	r2, [r0,#0x4c]
 | 
| 76 |  | -	mov	r2, #0               @ R2 = 0
 | 
| 77 |  | -	str	r2, [r0]
 | 
| 78 |  | -	str	r2, [r0,#0x4]
 | 
| 79 |  | -	mov	r1, #7
 | 
| 80 |  | -	str	r1, [r0,#0x44]
 | 
| 81 |  | -	mov	r1, #0x30
 | 
| 82 |  | -	str	r1, [r0,#0x44]
 | 
| 83 |  | -	str	r2, [r0,#0x60]
 | 
| 84 |  | -	str	r3, [r0,#0x28]
 | 
| 85 |  | -	str	r4, [r0,#0x38]
 | 
| 86 |  | -	mov	r1, #0x34
 | 
| 87 |  | -	str	r1, [r0,#0x44]
 | 
| 88 |  | -	orr	r1, r1, #0x40000
 | 
| 89 |  | -	str	r1, [r0,#0x44]
 | 
| 90 |  | -waitpll:
 | 
| 91 |  | -	ldr	r1, [r0,#0x40]
 | 
| 92 |  | -	tst	r1, #4
 | 
| 93 |  | -	beq	waitpll
 | 
| 94 |  | -	str	r5, [r0,#0x04]
 | 
| 95 |  | -	mov	r1, #0x3000
 | 
| 96 |  | -	str	r1, [r0]
 | 
| 97 |  | -	mov	r1, #0x8000
 | 
| 98 |  | -	orr	r3, r1, #0x80000000
 | 
| 99 |  | -	str	r3, [r0,#0x8]
 | 
| 100 |  | -	str	r3, [r0,#0xc]
 | 
| 101 |  | -	str	r1, [r0,#0x10]
 | 
| 102 |  | -	str	r1, [r0,#0x14]
 | 
| 103 |  | -	mov	r3, #3
 | 
| 104 |  | -	str	r3, [r6]
 | 
| 105 |  | -	orr	r1, r0, #0x00200000  @ R1 = TIMERBASE
 | 
| 106 |  | -	mov	r4, #0x440
 | 
| 107 |  | -	str	r4, [r1,#0xa0]
 | 
| 108 |  | -	mov	r4, #0xb
 | 
| 109 |  | -	str	r4, [r1,#0xb0]
 | 
| 110 |  | -	mvn	r4, r2
 | 
| 111 |  | -	str	r4, [r1,#0xa8]
 | 
| 112 |  | -	str	r3, [r1,#0xa4]
 | 
| 113 |  | -	orr	r3, r1, #0x00800000  @ R3 = GPIOBASE (temporary)
 | 
| 114 |  | -gpioloop:
 | 
| 115 |  | -	ldr	r4, [sp], #4
 | 
| 116 |  | -	str	r4, [r3], #0xc
 | 
| 117 |  | -	str	r2, [r3], #0x4
 | 
| 118 |  | -	str	r2, [r3], #0x10
 | 
| 119 |  | -	tst	r3, #0x200
 | 
| 120 |  | -	beq	gpioloop
 | 
| 121 |  | -	str	r7, [r3]
 | 
| 122 |  | -	add	r7, r7, #0x100
 | 
| 123 |  | -	str	r7, [r3]
 | 
| 124 |  | -	add	r5, r0, #0x00100000  @ R5 = I2CBASE
 | 
| 125 |  | -	bl	i2cwaitrdy           @ R3 = I2C address (temporary)
 | 
| 126 |  | -	mov	r7, #0x40            @ R4 = I2C data (temporary)
 | 
| 127 |  | -	str	r7, [r5,#8]          @ R6 = I2C scratch register (temporary)
 | 
| 128 |  | -	bl	i2cwaitrdy           @ R7 = I2C return address (temporary)
 | 
| 129 |  | -	str	r2, [r5,#0x14]       @ R0 = coldboot flag (temporary)
 | 
| 130 |  | -	bl	i2cwaitrdy
 | 
| 131 |  | -	str	r2, [r5,#0x18]
 | 
| 132 |  | -	bl	i2cwaitrdy
 | 
| 133 |  | -	mov	r6, #0x80
 | 
| 134 |  | -	str	r6, [r5,#0x4]
 | 
| 135 |  | -	bl	i2cwaitrdy
 | 
| 136 |  | -	str	r2, [r5]
 | 
| 137 |  | -	bl	i2cwaitrdy
 | 
| 138 |  | -	str	r2, [r5,#0x4]
 | 
| 139 |  | -	bl	i2cwaitrdy
 | 
| 140 |  | -	str	r7, [r5,#0xc]
 | 
| 141 |  | -	bl	i2cwaitrdy
 | 
| 142 |  | -	mov	r6, #0x184
 | 
| 143 |  | -	str	r6, [r5]
 | 
| 144 |  | -	bl	i2cwaitrdy
 | 
| 145 |  | -	mov	r6, #0x10
 | 
| 146 |  | -	str	r6, [r5,#0x4]
 | 
| 147 |  | -	bl	i2cwaitrdy
 | 
| 148 |  | -	mov	r3, #0x16
 | 
| 149 |  | -	mvn	r4, r2
 | 
| 150 |  | -	bl	pmutransfer
 | 
| 151 |  | -	and	r0, r4, #7
 | 
| 152 |  | -	mov	r3, #0xc
 | 
| 153 |  | -	mvn	r4, r2
 | 
| 154 |  | -	bl	pmutransfer
 | 
| 155 |  | -	and	r4, r4, #8
 | 
| 156 |  | -	orr	r0, r0, r4
 | 
| 157 |  | -pmuloop:
 | 
| 158 |  | -	ldrb	r3, [sp], #1
 | 
| 159 |  | -	ldrb	r4, [sp], #1
 | 
| 160 |  | -	cmp	r3, #0xff
 | 
| 161 |  | -	adrne	lr, pmuloop
 | 
| 162 |  | -	bne	pmutransfer
 | 
| 163 |  | -	mov	r3, #0x19
 | 
| 164 |  | -	mvn	r4, r2
 | 
| 165 |  | -	bl	pmutransfer
 | 
| 166 |  | -	tst	r4, #1
 | 
| 167 |  | -	beq	pwrok
 | 
| 168 |  | -	mov	r3, #0x4b
 | 
| 169 |  | -	mvn	r4, r2
 | 
| 170 |  | -	bl	pmutransfer
 | 
| 171 |  | -	tst	r4, #4
 | 
| 172 |  | -	bne	pwrok
 | 
| 173 |  | -	mov	r3, #0x12
 | 
| 174 |  | -	mvn	r4, r2
 | 
| 175 |  | -	bl	pmutransfer
 | 
| 176 |  | -	tst	r4, #4
 | 
| 177 |  | -	bne	pwrok
 | 
| 178 |  | -poweroff:
 | 
| 179 |  | -	mov	r3, #0xc
 | 
| 180 |  | -	mov	r4, #1
 | 
| 181 |  | -	bl	pmutransfer
 | 
| 182 |  | -	b	poweroff
 | 
| 183 |  | -
 | 
| 184 |  | -values1:
 | 
| 185 |  | -	.word 0x00000FFF @ R4 - DMA maximum transfer size
 | 
| 186 |  | -	.word 0x00012C00 @ R5 - LCD framebuffer pixel count
 | 
| 187 |  | -	.word 0x22010000 @ R6 - LCD framebuffer address
 | 
| 188 |  | -	.word 0x38300040 @ R7 - LCD data port address
 | 
| 189 |  | -	.word 0x2203D000 @ R8 - LCD DMA linked list address
 | 
| 190 |  | -	.word 0x74240000 @ R9 - LCD DMA channel settings
 | 
| 191 |  | -	.word 0x0005107D @ R10 - CP15r1
 | 
| 192 |  | -	.word 0x2203C000 @ R11 - First level page table
 | 
| 193 |  | -	.word 0x00000C1E @ R12 - Default segment flags
 | 
| 194 |  | -	.word 0x3C500000 @ R0 - SYSCON base
 | 
| 195 |  | -	.word 0x2007CE65 @ R1 - PWRCON(0)
 | 
| 196 |  | -	.word 0x0003EFC9 @ R2 - PWRCON(1)
 | 
| 197 |  | -	.word 0x01002401 @ R3
 | 
| 198 |  | -	.word 0x00007E90 @ R4
 | 
| 199 |  | -	.word 0x00404101 @ R5
 | 
| 200 |  | -	.word 0x38501000 @ R6
 | 
| 201 |  | -	.word 0x00060400 @ R7
 | 
| 202 |  | -	.word 0x0000080D @ R8
 | 
| 203 |  | -	.word 0x0006105D @ R9
 | 
| 204 |  | -	.word 0x001FB621 @ R10
 | 
| 205 |  | -	.word 0x0790682B @ R11
 | 
| 206 |  | -	.word 0x00008040 @ R12
 | 
| 207 |  | -
 | 
| 208 |  | -	.word 0x5322222F @ PCON0
 | 
| 209 |  | -	.word 0xEEEEEE00 @ PCON1
 | 
| 210 |  | -	.word 0x2332EEEE @ PCON2
 | 
| 211 |  | -	.word 0x3333E222 @ PCON3
 | 
| 212 |  | -	.word 0x33333333 @ PCON4
 | 
| 213 |  | -	.word 0x33333333 @ PCON5
 | 
| 214 |  | -	.word 0x3F000E33 @ PCON6
 | 
| 215 |  | -	.word 0xEEEEEEEE @ PCON7
 | 
| 216 |  | -	.word 0xEEEEEEEE @ PCON8
 | 
| 217 |  | -	.word 0xEEEEEEEE @ PCON9
 | 
| 218 |  | -	.word 0xEEEEEEEE @ PCONA
 | 
| 219 |  | -	.word 0xEE00EE0E @ PCONB
 | 
| 220 |  | -	.word 0xEEEE0EEE @ PCONC
 | 
| 221 |  | -	.word 0xEEEEEEEE @ PCOND
 | 
| 222 |  | -	.word 0x2F2222EE @ PCONE
 | 
| 223 |  | -	.word 0xEEEE0E22 @ PCONF
 | 
| 224 |  | -
 | 
| 225 |  | -	.byte 0x0c, 0    @ PMU init address-data pairs
 | 
| 226 |  | -	.byte 0x2d, 0x15
 | 
| 227 |  | -	.byte 0x2e, 1
 | 
| 228 |  | -	.byte 0x37, 0x15
 | 
| 229 |  | -	.byte 0x38, 4
 | 
| 230 |  | -	.byte 0x2f, 0x15
 | 
| 231 |  | -	.byte 0x30, 1
 | 
| 232 |  | -	.byte 0x3b, 0
 | 
| 233 |  | -	.byte 0x3c, 0x8c
 | 
| 234 |  | -	.byte 0x13, 3
 | 
| 235 |  | -	.byte 0x14, 0
 | 
| 236 |  | -	.byte 0x15, 0
 | 
| 237 |  | -	.byte 0x22, 0x2f
 | 
| 238 |  | -	.byte 0x23, 1
 | 
| 239 |  | -	.byte 0x24, 0
 | 
| 240 |  | -	.byte 0x25, 0x10
 | 
| 241 |  | -	.byte 0x26, 9
 | 
| 242 |  | -	.byte 0x27, 1
 | 
| 243 |  | -	.byte 0x1a, 0x6f
 | 
| 244 |  | -	.byte 0x1b, 0
 | 
| 245 |  | -	.byte 0x1c, 0
 | 
| 246 |  | -	.byte 0x1d, 0x59
 | 
| 247 |  | -	.byte 0x33, 9
 | 
| 248 |  | -	.byte 0x34, 1
 | 
| 249 |  | -	.byte 0x39, 0x18
 | 
| 250 |  | -	.byte 0x3a, 0
 | 
| 251 |  | -	.byte 0x18, 0xa
 | 
| 252 |  | -	.byte 0x19, 4
 | 
| 253 |  | -	.byte 0x58, 0
 | 
| 254 |  | -	.byte 0x07, 0xb0
 | 
| 255 |  | -	.byte 0x08, 3
 | 
| 256 |  | -	.byte 0x09, 0xfe
 | 
| 257 |  | -	.byte 0x0a, 0xfc
 | 
| 258 |  | -	.byte 0x0b, 0xff
 | 
| 259 |  | -	.byte 0x86, 0xfd
 | 
| 260 |  | -	.byte 0x0d, 0xdf
 | 
| 261 |  | -	.byte 0x0e, 0xaa
 | 
| 262 |  | -	.byte 0x0f, 0x4a
 | 
| 263 |  | -	.byte 0x10, 5
 | 
| 264 |  | -	.byte 0x11, 0x27
 | 
| 265 |  | -	.byte 0x17, 1
 | 
| 266 |  | -	.byte 0x2a, 5
 | 
| 267 |  | -	.byte 0xff, 0xff @ PMU init terminator
 | 
| 268 |  | -
 | 
| 269 |  | -lcddata_ref:
 | 
| 270 |  | -	.hword lcddata_0 - lcddata_ref
 | 
| 271 |  | -	.hword lcddata_1 - lcddata_ref - 2
 | 
| 272 |  | -	.hword lcddata_2 - lcddata_ref - 4
 | 
| 273 |  | -	.hword lcddata_3 - lcddata_ref - 6
 | 
| 274 |  | -lcddata_0:
 | 
| 275 |  | -	.hword 0x4011
 | 
| 276 |  | -	.hword 0xc78f
 | 
| 277 |  | -	.hword 0x8135
 | 
| 278 |  | -	.byte 0x00
 | 
| 279 |  | -	.hword 0x813a
 | 
| 280 |  | -	.byte 0x06
 | 
| 281 |  | -	.hword 0x8136
 | 
| 282 |  | -	.byte 0x00
 | 
| 283 |  | -	.hword 0x4013
 | 
| 284 |  | -	.hword 0x4029
 | 
| 285 |  | -	.hword 0xc000
 | 
| 286 |  | -lcddata_1:
 | 
| 287 |  | -	.hword 0x95b0
 | 
| 288 |  | -	.byte 0x3a
 | 
| 289 |  | -	.byte 0x3a
 | 
| 290 |  | -	.byte 0x80
 | 
| 291 |  | -	.byte 0x80
 | 
| 292 |  | -	.byte 0x0a
 | 
| 293 |  | -	.byte 0x0a
 | 
| 294 |  | -	.byte 0x0a
 | 
| 295 |  | -	.byte 0x0a
 | 
| 296 |  | -	.byte 0x0a
 | 
| 297 |  | -	.byte 0x0a
 | 
| 298 |  | -	.byte 0x0a
 | 
| 299 |  | -	.byte 0x0a
 | 
| 300 |  | -	.byte 0x3c
 | 
| 301 |  | -	.byte 0x30
 | 
| 302 |  | -	.byte 0x0f
 | 
| 303 |  | -	.byte 0x00
 | 
| 304 |  | -	.byte 0x01
 | 
| 305 |  | -	.byte 0x54
 | 
| 306 |  | -	.byte 0x06
 | 
| 307 |  | -	.byte 0x66
 | 
| 308 |  | -	.byte 0x66
 | 
| 309 |  | -	.hword 0x81b8
 | 
| 310 |  | -	.byte 0xd8
 | 
| 311 |  | -	.hword 0x9eb1
 | 
| 312 |  | -	.byte 0x14
 | 
| 313 |  | -	.byte 0x59
 | 
| 314 |  | -	.byte 0x00
 | 
| 315 |  | -	.byte 0x15
 | 
| 316 |  | -	.byte 0x57
 | 
| 317 |  | -	.byte 0x27
 | 
| 318 |  | -	.byte 0x04
 | 
| 319 |  | -	.byte 0x85
 | 
| 320 |  | -	.byte 0x14
 | 
| 321 |  | -	.byte 0x59
 | 
| 322 |  | -	.byte 0x00
 | 
| 323 |  | -	.byte 0x15
 | 
| 324 |  | -	.byte 0x57
 | 
| 325 |  | -	.byte 0x27
 | 
| 326 |  | -	.byte 0x04
 | 
| 327 |  | -	.byte 0x85
 | 
| 328 |  | -	.byte 0x14
 | 
| 329 |  | -	.byte 0x09
 | 
| 330 |  | -	.byte 0x15
 | 
| 331 |  | -	.byte 0x57
 | 
| 332 |  | -	.byte 0x27
 | 
| 333 |  | -	.byte 0x04
 | 
| 334 |  | -	.byte 0x05
 | 
| 335 |  | -	.byte 0x14
 | 
| 336 |  | -	.byte 0x09
 | 
| 337 |  | -	.byte 0x15
 | 
| 338 |  | -	.byte 0x57
 | 
| 339 |  | -	.byte 0x27
 | 
| 340 |  | -	.byte 0x04
 | 
| 341 |  | -	.byte 0x05
 | 
| 342 |  | -	.hword 0x40d2
 | 
| 343 |  | -	.hword 0x0101
 | 
| 344 |  | -	.hword 0x8de0
 | 
| 345 |  | -	.byte 0x00
 | 
| 346 |  | -	.byte 0x00
 | 
| 347 |  | -	.byte 0x00
 | 
| 348 |  | -	.byte 0x05
 | 
| 349 |  | -	.byte 0x0b
 | 
| 350 |  | -	.byte 0x12
 | 
| 351 |  | -	.byte 0x16
 | 
| 352 |  | -	.byte 0x1f
 | 
| 353 |  | -	.byte 0x25
 | 
| 354 |  | -	.byte 0x22
 | 
| 355 |  | -	.byte 0x24
 | 
| 356 |  | -	.byte 0x29
 | 
| 357 |  | -	.byte 0x1c
 | 
| 358 |  | -	.hword 0x8de1
 | 
| 359 |  | -	.byte 0x08
 | 
| 360 |  | -	.byte 0x01
 | 
| 361 |  | -	.byte 0x01
 | 
| 362 |  | -	.byte 0x06
 | 
| 363 |  | -	.byte 0x0b
 | 
| 364 |  | -	.byte 0x11
 | 
| 365 |  | -	.byte 0x15
 | 
| 366 |  | -	.byte 0x1f
 | 
| 367 |  | -	.byte 0x27
 | 
| 368 |  | -	.byte 0x26
 | 
| 369 |  | -	.byte 0x29
 | 
| 370 |  | -	.byte 0x2f
 | 
| 371 |  | -	.byte 0x1e
 | 
| 372 |  | -	.hword 0x8de2
 | 
| 373 |  | -	.byte 0x07
 | 
| 374 |  | -	.byte 0x01
 | 
| 375 |  | -	.byte 0x01
 | 
| 376 |  | -	.byte 0x05
 | 
| 377 |  | -	.byte 0x09
 | 
| 378 |  | -	.byte 0x0f
 | 
| 379 |  | -	.byte 0x13
 | 
| 380 |  | -	.byte 0x1e
 | 
| 381 |  | -	.byte 0x26
 | 
| 382 |  | -	.byte 0x25
 | 
| 383 |  | -	.byte 0x28
 | 
| 384 |  | -	.byte 0x2e
 | 
| 385 |  | -	.byte 0x1e
 | 
| 386 |  | -	.hword 0x8de3
 | 
| 387 |  | -	.byte 0x0d
 | 
| 388 |  | -	.byte 0x00
 | 
| 389 |  | -	.byte 0x00
 | 
| 390 |  | -	.byte 0x00
 | 
| 391 |  | -	.byte 0x05
 | 
| 392 |  | -	.byte 0x0b
 | 
| 393 |  | -	.byte 0x12
 | 
| 394 |  | -	.byte 0x16
 | 
| 395 |  | -	.byte 0x1f
 | 
| 396 |  | -	.byte 0x25
 | 
| 397 |  | -	.byte 0x22
 | 
| 398 |  | -	.byte 0x24
 | 
| 399 |  | -	.byte 0x29
 | 
| 400 |  | -	.byte 0x1c
 | 
| 401 |  | -	.hword 0x8de4
 | 
| 402 |  | -	.byte 0x08
 | 
| 403 |  | -	.byte 0x01
 | 
| 404 |  | -	.byte 0x01
 | 
| 405 |  | -	.byte 0x06
 | 
| 406 |  | -	.byte 0x0b
 | 
| 407 |  | -	.byte 0x11
 | 
| 408 |  | -	.byte 0x15
 | 
| 409 |  | -	.byte 0x1f
 | 
| 410 |  | -	.byte 0x27
 | 
| 411 |  | -	.byte 0x26
 | 
| 412 |  | -	.byte 0x29
 | 
| 413 |  | -	.byte 0x2f
 | 
| 414 |  | -	.byte 0x1e
 | 
| 415 |  | -	.hword 0x8de5
 | 
| 416 |  | -	.byte 0x07
 | 
| 417 |  | -	.byte 0x01
 | 
| 418 |  | -	.byte 0x01
 | 
| 419 |  | -	.byte 0x05
 | 
| 420 |  | -	.byte 0x09
 | 
| 421 |  | -	.byte 0x0f
 | 
| 422 |  | -	.byte 0x13
 | 
| 423 |  | -	.byte 0x1e
 | 
| 424 |  | -	.byte 0x26
 | 
| 425 |  | -	.byte 0x25
 | 
| 426 |  | -	.byte 0x28
 | 
| 427 |  | -	.byte 0x2e
 | 
| 428 |  | -	.byte 0x1e
 | 
| 429 |  | -	.hword 0x813a
 | 
| 430 |  | -	.byte 0x06
 | 
| 431 |  | -	.hword 0x81c2
 | 
| 432 |  | -	.byte 0x00
 | 
| 433 |  | -	.hword 0x8135
 | 
| 434 |  | -	.byte 0x00
 | 
| 435 |  | -	.hword 0x4011
 | 
| 436 |  | -	.hword 0xce88
 | 
| 437 |  | -	.hword 0x4013
 | 
| 438 |  | -	.hword 0x4029
 | 
| 439 |  | -lcddata_2:
 | 
| 440 |  | -	.hword 0xc000
 | 
| 441 |  | -lcddata_3:
 | 
| 442 |  | -	.hword 0x4008
 | 
| 443 |  | -	.hword 0x0808
 | 
| 444 |  | -	.hword 0x8110
 | 
| 445 |  | -	.byte 0x13
 | 
| 446 |  | -	.hword 0x4011
 | 
| 447 |  | -	.hword 0x0300
 | 
| 448 |  | -	.hword 0x4012
 | 
| 449 |  | -	.hword 0x0101
 | 
| 450 |  | -	.hword 0x4013
 | 
| 451 |  | -	.hword 0x0a03
 | 
| 452 |  | -	.hword 0x4014
 | 
| 453 |  | -	.hword 0x0a0e
 | 
| 454 |  | -	.hword 0x4015
 | 
| 455 |  | -	.hword 0x0a19
 | 
| 456 |  | -	.hword 0x4016
 | 
| 457 |  | -	.hword 0x2402
 | 
| 458 |  | -	.hword 0x8118
 | 
| 459 |  | -	.byte 0x01
 | 
| 460 |  | -	.hword 0x8190
 | 
| 461 |  | -	.byte 0x21
 | 
| 462 |  | -	.hword 0x4300
 | 
| 463 |  | -	.hword 0x0506
 | 
| 464 |  | -	.hword 0x4301
 | 
| 465 |  | -	.hword 0x0402
 | 
| 466 |  | -	.hword 0x4302
 | 
| 467 |  | -	.hword 0x0706
 | 
| 468 |  | -	.hword 0x4303
 | 
| 469 |  | -	.hword 0x0303
 | 
| 470 |  | -	.hword 0x4304
 | 
| 471 |  | -	.hword 0x0100
 | 
| 472 |  | -	.hword 0x4305
 | 
| 473 |  | -	.hword 0x0207
 | 
| 474 |  | -	.hword 0x4306
 | 
| 475 |  | -	.hword 0x170e
 | 
| 476 |  | -	.hword 0x4307
 | 
| 477 |  | -	.hword 0x0506
 | 
| 478 |  | -	.hword 0x4308
 | 
| 479 |  | -	.hword 0x0402
 | 
| 480 |  | -	.hword 0x4309
 | 
| 481 |  | -	.hword 0x0706
 | 
| 482 |  | -	.hword 0x430a
 | 
| 483 |  | -	.hword 0x0303
 | 
| 484 |  | -	.hword 0x430b
 | 
| 485 |  | -	.hword 0x0100
 | 
| 486 |  | -	.hword 0x430c
 | 
| 487 |  | -	.hword 0x0207
 | 
| 488 |  | -	.hword 0x430d
 | 
| 489 |  | -	.hword 0x170e
 | 
| 490 |  | -	.hword 0x4310
 | 
| 491 |  | -	.hword 0x0606
 | 
| 492 |  | -	.hword 0x4311
 | 
| 493 |  | -	.hword 0x0506
 | 
| 494 |  | -	.hword 0x4312
 | 
| 495 |  | -	.hword 0x0707
 | 
| 496 |  | -	.hword 0x4313
 | 
| 497 |  | -	.hword 0x0303
 | 
| 498 |  | -	.hword 0x4314
 | 
| 499 |  | -	.hword 0x0200
 | 
| 500 |  | -	.hword 0x4315
 | 
| 501 |  | -	.hword 0x0307
 | 
| 502 |  | -	.hword 0x4316
 | 
| 503 |  | -	.hword 0x170e
 | 
| 504 |  | -	.hword 0x4317
 | 
| 505 |  | -	.hword 0x0606
 | 
| 506 |  | -	.hword 0x4318
 | 
| 507 |  | -	.hword 0x0506
 | 
| 508 |  | -	.hword 0x4319
 | 
| 509 |  | -	.hword 0x0707
 | 
| 510 |  | -	.hword 0x431a
 | 
| 511 |  | -	.hword 0x0303
 | 
| 512 |  | -	.hword 0x431b
 | 
| 513 |  | -	.hword 0x0200
 | 
| 514 |  | -	.hword 0x431c
 | 
| 515 |  | -	.hword 0x0307
 | 
| 516 |  | -	.hword 0x431d
 | 
| 517 |  | -	.hword 0x170e
 | 
| 518 |  | -	.hword 0x4320
 | 
| 519 |  | -	.hword 0x0707
 | 
| 520 |  | -	.hword 0x4321
 | 
| 521 |  | -	.hword 0x0005
 | 
| 522 |  | -	.hword 0x4322
 | 
| 523 |  | -	.hword 0x0705
 | 
| 524 |  | -	.hword 0x4323
 | 
| 525 |  | -	.hword 0x0303
 | 
| 526 |  | -	.hword 0x4324
 | 
| 527 |  | -	.hword 0x0300
 | 
| 528 |  | -	.hword 0x4325
 | 
| 529 |  | -	.hword 0x0707
 | 
| 530 |  | -	.hword 0x4326
 | 
| 531 |  | -	.hword 0x1f16
 | 
| 532 |  | -	.hword 0x4327
 | 
| 533 |  | -	.hword 0x0707
 | 
| 534 |  | -	.hword 0x4328
 | 
| 535 |  | -	.hword 0x0005
 | 
| 536 |  | -	.hword 0x4329
 | 
| 537 |  | -	.hword 0x0705
 | 
| 538 |  | -	.hword 0x432a
 | 
| 539 |  | -	.hword 0x0303
 | 
| 540 |  | -	.hword 0x432b
 | 
| 541 |  | -	.hword 0x0300
 | 
| 542 |  | -	.hword 0x432c
 | 
| 543 |  | -	.hword 0x0707
 | 
| 544 |  | -	.hword 0x432d
 | 
| 545 |  | -	.hword 0x1f16
 | 
| 546 |  | -	.hword 0x4400
 | 
| 547 |  | -	.hword 0x001d
 | 
| 548 |  | -	.hword 0x4401
 | 
| 549 |  | -	.hword 0x0001
 | 
| 550 |  | -	.hword 0x4205
 | 
| 551 |  | -	.hword 0x0060
 | 
| 552 |  | -	.hword 0x8107
 | 
| 553 |  | -	.byte 0x01
 | 
| 554 |  | -	.hword 0x8131
 | 
| 555 |  | -	.byte 0x71
 | 
| 556 |  | -	.hword 0x4110
 | 
| 557 |  | -	.hword 0x0001
 | 
| 558 |  | -	.hword 0x4100
 | 
| 559 |  | -	.hword 0x17b0
 | 
| 560 |  | -	.hword 0x4101
 | 
| 561 |  | -	.hword 0x0220
 | 
| 562 |  | -	.hword 0x4102
 | 
| 563 |  | -	.hword 0x009b
 | 
| 564 |  | -	.hword 0x4103
 | 
| 565 |  | -	.hword 0x1200
 | 
| 566 |  | -	.hword 0x4105
 | 
| 567 |  | -	.hword 0x0103
 | 
| 568 |  | -	.hword 0x4106
 | 
| 569 |  | -	.hword 0x0105
 | 
| 570 |  | -	.hword 0x8107
 | 
| 571 |  | -	.byte 0x21
 | 
| 572 |  | -	.hword 0x4102
 | 
| 573 |  | -	.hword 0x00bd
 | 
| 574 |  | -	.hword 0x4001
 | 
| 575 |  | -	.hword 0x0110
 | 
| 576 |  | -	.hword 0x4003
 | 
| 577 |  | -	.hword 0x0230
 | 
| 578 |  | -	.hword 0x4002
 | 
| 579 |  | -	.hword 0x0500
 | 
| 580 |  | -	.hword 0x8107
 | 
| 581 |  | -	.byte 0x31
 | 
| 582 |  | -	.hword 0x4130
 | 
| 583 |  | -	.byte 0x07
 | 
| 584 |  | -	.hword 0xc744
 | 
| 585 |  | -	.hword 0x4030
 | 
| 586 |  | -	.hword 0x03ff
 | 
| 587 |  | -	.hword 0xce88
 | 
| 588 |  | -	.hword 0x8107
 | 
| 589 |  | -	.byte 0x72
 | 
| 590 |  | -	.hword 0xe454
 | 
| 591 |  | -	.hword 0x4007
 | 
| 592 |  | -	.hword 0x0173
 | 
| 593 |  | -	.hword 0xc000
 | 
| 594 |  | -
 | 
| 595 |  | -font:
 | 
| 596 |  | -	.byte 0, 0, 0, 0, 0
 | 
| 597 |  | -	.byte 0, 0, 95, 0, 0
 | 
| 598 |  | -	.byte 0, 7, 0, 7, 0
 | 
| 599 |  | -	.byte 20, 127, 20, 127, 20
 | 
| 600 |  | -	.byte 36, 42, 127, 42, 18
 | 
| 601 |  | -	.byte 35, 19, 8, 100, 98
 | 
| 602 |  | -	.byte 54, 73, 85, 34, 80
 | 
| 603 |  | -	.byte 5, 3, 0, 0, 0
 | 
| 604 |  | -	.byte 28, 34, 65, 0, 0
 | 
| 605 |  | -	.byte 0, 0, 65, 34, 28
 | 
| 606 |  | -	.byte 20, 8, 62, 8, 20
 | 
| 607 |  | -	.byte 8, 8, 62, 8, 8
 | 
| 608 |  | -	.byte 0, -96, 96, 0, 0
 | 
| 609 |  | -	.byte 8, 8, 8, 8, 8
 | 
| 610 |  | -	.byte 0, 96, 96, 0, 0
 | 
| 611 |  | -	.byte 32, 16, 8, 4, 2
 | 
| 612 |  | -	.byte 62, 81, 73, 69, 62
 | 
| 613 |  | -	.byte 0, 66, 127, 64, 0
 | 
| 614 |  | -	.byte 66, 97, 81, 73, 70
 | 
| 615 |  | -	.byte 33, 65, 69, 75, 49
 | 
| 616 |  | -	.byte 24, 20, 18, 127, 16
 | 
| 617 |  | -	.byte 39, 69, 69, 69, 57
 | 
| 618 |  | -	.byte 60, 74, 73, 73, 48
 | 
| 619 |  | -	.byte 1, 113, 9, 5, 3
 | 
| 620 |  | -	.byte 54, 73, 73, 73, 54
 | 
| 621 |  | -	.byte 6, 73, 73, 41, 30
 | 
| 622 |  | -	.byte 0, 54, 54, 0, 0
 | 
| 623 |  | -	.byte 0, 86, 54, 0, 0
 | 
| 624 |  | -	.byte 8, 20, 34, 65, 0
 | 
| 625 |  | -	.byte 20, 20, 20, 20, 20
 | 
| 626 |  | -	.byte 0, 65, 34, 20, 8
 | 
| 627 |  | -	.byte 2, 1, 81, 9, 6
 | 
| 628 |  | -	.byte 50, 73, 121, 65, 62
 | 
| 629 |  | -	.byte 124, 18, 17, 18, 124
 | 
| 630 |  | -	.byte 127, 73, 73, 73, 62
 | 
| 631 |  | -	.byte 62, 65, 65, 65, 34
 | 
| 632 |  | -	.byte 127, 65, 65, 34, 28
 | 
| 633 |  | -	.byte 127, 73, 73, 73, 65
 | 
| 634 |  | -	.byte 127, 9, 9, 9, 1
 | 
| 635 |  | -	.byte 62, 65, 73, 73, 58
 | 
| 636 |  | -	.byte 127, 8, 8, 8, 127
 | 
| 637 |  | -	.byte 0, 65, 127, 65, 0
 | 
| 638 |  | -	.byte 32, 64, 65, 63, 1
 | 
| 639 |  | -	.byte 127, 8, 20, 34, 65
 | 
| 640 |  | -	.byte 127, 64, 64, 64, 64
 | 
| 641 |  | -	.byte 127, 2, 12, 2, 127
 | 
| 642 |  | -	.byte 127, 4, 8, 16, 127
 | 
| 643 |  | -	.byte 62, 65, 65, 65, 62
 | 
| 644 |  | -	.byte 127, 9, 9, 9, 6
 | 
| 645 |  | -	.byte 62, 65, 81, 33, 94
 | 
| 646 |  | -	.byte 127, 9, 25, 41, 70
 | 
| 647 |  | -	.byte 38, 73, 73, 73, 50
 | 
| 648 |  | -	.byte 1, 1, 127, 1, 1
 | 
| 649 |  | -	.byte 63, 64, 64, 64, 63
 | 
| 650 |  | -	.byte 31, 32, 64, 32, 31
 | 
| 651 |  | -	.byte 127, 32, 24, 32, 127
 | 
| 652 |  | -	.byte 99, 20, 8, 20, 99
 | 
| 653 |  | -	.byte 3, 4, 120, 4, 3
 | 
| 654 |  | -	.byte 97, 81, 73, 69, 67
 | 
| 655 |  | -	.byte 0, 127, 65, 65, 0
 | 
| 656 |  | -	.byte 2, 4, 8, 16, 32
 | 
| 657 |  | -	.byte 0, 65, 65, 127, 0
 | 
| 658 |  | -	.byte 4, 2, 1, 2, 4
 | 
| 659 |  | -	.byte 64, 64, 64, 64, 64
 | 
| 660 |  | -	.byte 1, 2, 4, 0, 0
 | 
| 661 |  | -	.byte 32, 84, 84, 84, 120
 | 
| 662 |  | -	.byte 127, 68, 68, 68, 56
 | 
| 663 |  | -	.byte 56, 68, 68, 68, 40
 | 
| 664 |  | -	.byte 56, 68, 68, 68, 127
 | 
| 665 |  | -	.byte 56, 84, 84, 84, 24
 | 
| 666 |  | -	.byte 8, 126, 9, 1, 2
 | 
| 667 |  | -	.byte 8, 84, 84, 84, 60
 | 
| 668 |  | -	.byte 127, 4, 4, 4, 120
 | 
| 669 |  | -	.byte 0, 68, 125, 64, 0
 | 
| 670 |  | -	.byte 32, 64, 64, 61, 0
 | 
| 671 |  | -	.byte 127, 16, 40, 68, 0
 | 
| 672 |  | -	.byte 0, 65, 127, 64, 0
 | 
| 673 |  | -	.byte 124, 4, 24, 4, 120
 | 
| 674 |  | -	.byte 124, 8, 4, 4, 120
 | 
| 675 |  | -	.byte 56, 68, 68, 68, 56
 | 
| 676 |  | -	.byte 124, 20, 20, 20, 24
 | 
| 677 |  | -	.byte 8, 20, 20, 20, 124
 | 
| 678 |  | -	.byte 124, 8, 4, 4, 8
 | 
| 679 |  | -	.byte 72, 84, 84, 84, 32
 | 
| 680 |  | -	.byte 4, 63, 68, 64, 32
 | 
| 681 |  | -	.byte 60, 64, 64, 32, 124
 | 
| 682 |  | -	.byte 28, 32, 64, 32, 28
 | 
| 683 |  | -	.byte 60, 64, 56, 64, 60
 | 
| 684 |  | -	.byte 68, 40, 16, 40, 68
 | 
| 685 |  | -	.byte 12, 80, 80, 80, 60
 | 
| 686 |  | -	.byte 68, 100, 84, 76, 68
 | 
| 687 |  | -	.byte 0, 8, 54, 65, 0
 | 
| 688 |  | -	.byte 0, 0, 119, 0, 0
 | 
| 689 |  | -	.byte 0, 65, 54, 8, 0
 | 
| 690 |  | -	.byte 2, 1, 2, 4, 2
 | 
| 691 |  | -
 | 
| 692 |  | -	.code 16
 | 
| 693 |  | -	.align 1
 | 
| 694 |  | -
 | 
| 695 |  | -thumb_nrv2e_d8:
 | 
| 696 |  | -	mov r7,r2
 | 
| 697 |  | -        mov r4,#1; neg r5,r4 @ r5= -1 initial condition
 | 
| 698 |  | -        lsl r4,#31 @ 1<<31: refill next time
 | 
| 699 |  | -        mov r6,#5
 | 
| 700 |  | -        lsl r6,#8 @ 0x500 @ nrv2e M2_MAX_OFFSET
 | 
| 701 |  | -        b top_n2e
 | 
| 702 |  | -
 | 
| 703 |  | -nrv2e_done:
 | 
| 704 |  | -	blx flushcache
 | 
| 705 |  | -	bx r7
 | 
| 706 |  | -
 | 
| 707 |  | -get1_n2e: @ In: Carry set [from adding 0x80000000 (1<<31) to itself]
 | 
| 708 |  | -        ldrb r4,[r0] @ zero-extend next byte
 | 
| 709 |  | -        adc r4,r4 @ double and insert CarryIn as low bit
 | 
| 710 |  | -        add r0,#1
 | 
| 711 |  | -        lsl r4,#24 @ move to top byte, and set CarryOut from old bit 8
 | 
| 712 |  | -        mov pc,lr @ return, stay in current (THUMB) mode
 | 
| 713 |  | -
 | 
| 714 |  | -lit_n2e:
 | 
| 715 |  | -        ldrb r3,[r0]; add r0,#1
 | 
| 716 |  | -        strb r3,[r2]; add r2,#1
 | 
| 717 |  | -top_n2e:
 | 
| 718 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; bcs lit_n2e
 | 
| 719 |  | -        mov r1,#1; b getoff_n2e
 | 
| 720 |  | -
 | 
| 721 |  | -off_n2e:
 | 
| 722 |  | -        sub r1,#1
 | 
| 723 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; adc r1,r1
 | 
| 724 |  | -getoff_n2e:
 | 
| 725 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; adc r1,r1
 | 
| 726 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; bcc off_n2e
 | 
| 727 |  | -
 | 
| 728 |  | -        sub r3,r1,#3 @ set Carry
 | 
| 729 |  | -        mov r1,#0 @ Carry unaffected
 | 
| 730 |  | -        blo offprev_n2e @ r1 was 2; tests Carry only
 | 
| 731 |  | -        lsl r3,#8
 | 
| 732 |  | -        ldrb r5,[r0]; add r0,#1 @ low 7+1 r4
 | 
| 733 |  | -        orr r5,r3
 | 
| 734 |  | -        mvn r5,r5; beq nrv2e_done @ r5= ~r5
 | 
| 735 |  | -        asr r5,#1; bcs lenlast_n2e
 | 
| 736 |  | -        b lenmore_n2e
 | 
| 737 |  | -
 | 
| 738 |  | -offprev_n2e:
 | 
| 739 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; bcs lenlast_n2e
 | 
| 740 |  | -lenmore_n2e:
 | 
| 741 |  | -        mov r1,#1
 | 
| 742 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; bcs lenlast_n2e
 | 
| 743 |  | -len_n2e:
 | 
| 744 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; adc r1,r1
 | 
| 745 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; bcc len_n2e
 | 
| 746 |  | -        add r1,#6-2
 | 
| 747 |  | -        b gotlen_n2e
 | 
| 748 |  | -
 | 
| 749 |  | -lenlast_n2e:
 | 
| 750 |  | -        add r4,r4; mov lr,pc; beq get1_n2e; adc r1,r1 @ 0,1,2,3
 | 
| 751 |  | -        add r1,#2
 | 
| 752 |  | -gotlen_n2e: @ 'cmn': add the inputs, set condition codes, discard the sum
 | 
| 753 |  | -        cmn r6,r5; bcs near_n2e @ within M2_MAX_OFFSET
 | 
| 754 |  | -        add r1,#1 @ too far away, so minimum match length is 3
 | 
| 755 |  | -near_n2e:
 | 
| 756 |  | -        ldrb r3,[r2] @ force cacheline allocate
 | 
| 757 |  | -copy_n2e:
 | 
| 758 |  | -        ldrb r3,[r2,r5]
 | 
| 759 |  | -        strb r3,[r2]; add r2,#1
 | 
| 760 |  | -        sub r1,#1; bne copy_n2e
 | 
| 761 |  | -        b top_n2e
 | 
| 762 |  | -
 | 
| 763 |  | -	.code 32
 | 
| 764 |  | -	.align 2
 | 
| 765 |  | -
 | 
| 766 |  | -foundfile:
 | 
| 767 |  | -	ldr	r12, [r11,#0xc]
 | 
| 768 |  | -	ldr	r11, [r11,#0x8]
 | 
| 769 |  | -	tst	r12, #0x80000000
 | 
| 770 |  | -	bic	r12, r12, #0xff000000
 | 
| 771 |  | -	bic	r12, r12, #0xf00000
 | 
| 772 |  | -	bne	compressed
 | 
| 773 |  | -    	mov	r1, #0x08000000
 | 
| 774 |  | -	bl	bootflash_read
 | 
| 775 |  | -	mov	lr, #0x08000000
 | 
| 776 |  | -	b	flushcache
 | 
| 777 |  | -compressed:
 | 
| 778 |  | -    	mov	r1, #0x09000000
 | 
| 779 |  | -	bl	bootflash_read
 | 
| 780 |  | -	mov	r0, #0x09000000
 | 
| 781 |  | -	mov	r2, #0x08000000
 | 
| 782 |  | -	blx	thumb_nrv2e_d8
 | 
| 783 |  | -
 | 
| 784 |  | -
 | 
| 785 |  | -rendertext:
 | 
| 786 |  | -	ldrb	r3, [r0], #1
 | 
| 787 |  | -	cmp	r3, #0
 | 
| 788 |  | -	moveq	pc, lr
 | 
| 789 |  | -	adr	r6, font
 | 
| 790 |  | -	sub	r3, r3, #0x20
 | 
| 791 |  | -	cmp	r3, #0x5f
 | 
| 792 |  | -	addcc	r6, r3,lsl#2
 | 
| 793 |  | -	addcc	r6, r3
 | 
| 794 |  | -	mov	r3, #5
 | 
| 795 |  | -rendertext_col:
 | 
| 796 |  | -	mov	r7, r1
 | 
| 797 |  | -	ldrb	r9, [r6], #1
 | 
| 798 |  | -rendertext_row:
 | 
| 799 |  | -	tst	r9, #1
 | 
| 800 |  | -	strneh	r2, [r7]
 | 
| 801 |  | -	add	r7, r7, #640
 | 
| 802 |  | -	movs	r9, r9,lsr#1
 | 
| 803 |  | -	bne	rendertext_row
 | 
| 804 |  | -	add	r1, r1, #2
 | 
| 805 |  | -	subs	r3, r3, #1
 | 
| 806 |  | -	bne	rendertext_col
 | 
| 807 |  | -	add	r1, r1, #2
 | 
| 808 |  | -	b	rendertext
 | 
| 809 |  | -
 | 
| 810 |  | -spisend:
 | 
| 811 |  | -	mov	r6, #1
 | 
| 812 |  | -	str	r6, [r7,#0x34]
 | 
| 813 |  | -spisend_wait:
 | 
| 814 |  | -	ldr	r6, [r7,#0x8]
 | 
| 815 |  | -	and	r6, r6, #0x1f0
 | 
| 816 |  | -	cmp	r6, #0x100
 | 
| 817 |  | -	beq	spisend_wait
 | 
| 818 |  | -	str	r0, [r7,#0x10]
 | 
| 819 |  | -spisend_wait2:
 | 
| 820 |  | -	ldr	r6, [r7,#0x8]
 | 
| 821 |  | -	ands	r6, r6, #0x3e00
 | 
| 822 |  | -	beq	spisend_wait2
 | 
| 823 |  | -	ldr	r0, [r7,#0x20]
 | 
| 824 |  | -	mov	pc, lr
 | 
| 825 |  | -    	
 | 
| 826 |  | -spirecv:
 | 
| 827 |  | -	str	r0, [r7,#0x34]
 | 
| 828 |  | -	ldr	r6, [r7,#0x4]
 | 
| 829 |  | -	orr	r6, r6, #1
 | 
| 830 |  | -	str	r6, [r7,#0x4]
 | 
| 831 |  | -spirecv_loop:
 | 
| 832 |  | -	ldr	r6, [r7,#0x8]
 | 
| 833 |  | -	ands	r6, r6, #0x3e00
 | 
| 834 |  | -	beq	spirecv_loop
 | 
| 835 |  | -	ldr	r6, [r7,#0x20]
 | 
| 836 |  | -	strb	r6, [r1], #1
 | 
| 837 |  | -	subs	r0, r0, #1
 | 
| 838 |  | -	bne	spirecv_loop
 | 
| 839 |  | -	ldr	r6, [r7,#0x4]
 | 
| 840 |  | -	bic	r6, r6, #1
 | 
| 841 |  | -	str	r6, [r7,#0x4]
 | 
| 842 |  | -	mov	pc, lr
 | 
| 843 |  | -
 | 
| 844 |  | -bootflash_read:
 | 
| 845 |  | -	mov	sp, lr
 | 
| 846 |  | -bootflash_wait:
 | 
| 847 |  | -	ldr	r0, [r3,#0x4]
 | 
| 848 |  | -	bic	r0, r0, #1
 | 
| 849 |  | -	str	r0, [r3,#0x4]
 | 
| 850 |  | -	mov	r0, #5
 | 
| 851 |  | -	bl	spisend
 | 
| 852 |  | -	mov	r0, #0xff
 | 
| 853 |  | -	bl	spisend
 | 
| 854 |  | -	tst	r0, #1
 | 
| 855 |  | -	ldr	r0, [r3,#0x4]
 | 
| 856 |  | -	orr	r0, r0, #1
 | 
| 857 |  | -	str	r0, [r3,#0x4]
 | 
| 858 |  | -	bne	bootflash_wait
 | 
| 859 |  | -	ldr	r0, [r3,#0x4]
 | 
| 860 |  | -	bic	r0, r0, #1
 | 
| 861 |  | -	str	r0, [r3,#0x4]
 | 
| 862 |  | -	mov	r0, #3
 | 
| 863 |  | -	bl	spisend
 | 
| 864 |  | -	mov	r0, r11,lsr#16
 | 
| 865 |  | -	bl	spisend
 | 
| 866 |  | -	mov	r0, r11,lsr#8
 | 
| 867 |  | -	and	r0, r0, #0xff
 | 
| 868 |  | -	bl	spisend
 | 
| 869 |  | -	and	r0, r11, #0xff
 | 
| 870 |  | -	bl	spisend
 | 
| 871 |  | -	mov	r0, r12
 | 
| 872 |  | -	bl	spirecv
 | 
| 873 |  | -	ldr	r0, [r3,#0x4]
 | 
| 874 |  | -	orr	r0, r0, #1
 | 
| 875 |  | -	str	r0, [r3,#0x4]
 | 
| 876 |  | -	mov	pc, sp
 | 
| 877 |  | -
 | 
| 878 |  | -lcdbyteseq:
 | 
| 879 |  | -	mov	r9, r0,lsr#8
 | 
| 880 |  | -	and	r0, r0, #0xff
 | 
| 881 |  | -	bl	sendlcdc
 | 
| 882 |  | -lcdbyteseqloop:
 | 
| 883 |  | -	ldrb	r0, [sp], #1
 | 
| 884 |  | -	bl	sendlcdd
 | 
| 885 |  | -	subs	r9, r9, #1
 | 
| 886 |  | -	bne	lcdbyteseqloop
 | 
| 887 |  | -	b	lcdloop
 | 
| 888 |  | -
 | 
| 889 |  | -sendlcdc:
 | 
| 890 |  | -	ldr	r6, [r4,#0x1c]
 | 
| 891 |  | -	ands	r6, r6, #0x10
 | 
| 892 |  | -	bne	sendlcdc
 | 
| 893 |  | -	str	r0, [r4,#0x04]
 | 
| 894 |  | -	mov	pc, lr
 | 
| 895 |  | -
 | 
| 896 |  | -sendlcdd:
 | 
| 897 |  | -	ldr	r6, [r4,#0x1c]
 | 
| 898 |  | -	ands	r6, r6, #0x10
 | 
| 899 |  | -	bne	sendlcdd
 | 
| 900 |  | -	str	r0, [r4,#0x40]
 | 
| 901 |  | -	mov	pc, lr
 | 
| 902 |  | -
 | 
| 903 |  | -i2cwaitrdy:
 | 
| 904 |  | -	ldr	r6, [r5,#0x10]
 | 
| 905 |  | -	cmp	r6, #0
 | 
| 906 |  | -	bne	i2cwaitrdy
 | 
| 907 |  | -	mov	pc, lr
 | 
| 908 |  | -
 | 
| 909 |  | -i2cwait:
 | 
| 910 |  | -	ldr	r6, [r5]
 | 
| 911 |  | -	tst	r6, #0x10
 | 
| 912 |  | -	beq	i2cwait
 | 
| 913 |  | -	mov	pc, lr
 | 
| 914 |  | -
 | 
| 915 |  | -pmutransfer:
 | 
| 916 |  | -	mov	r7, lr
 | 
| 917 |  | -	mov	lr, #0xb7
 | 
| 918 |  | -	str	lr, [r5]
 | 
| 919 |  | -	mov	lr, #0xe6
 | 
| 920 |  | -	str	lr, [r5,#0xc]
 | 
| 921 |  | -	mov	lr, #0xf0
 | 
| 922 |  | -	str	lr, [r5,#0x4]
 | 
| 923 |  | -	bl	i2cwait
 | 
| 924 |  | -	str	r3, [r5,#0xc]
 | 
| 925 |  | -	mov	lr, #0xb7
 | 
| 926 |  | -	str	lr, [r5]
 | 
| 927 |  | -	bl	i2cwait
 | 
| 928 |  | -	cmn	r4, #1
 | 
| 929 |  | -	beq	pmuskip
 | 
| 930 |  | -	str	r4, [r5,#0xc]
 | 
| 931 |  | -	mov	lr, #0xb7
 | 
| 932 |  | -	str	lr, [r5]
 | 
| 933 |  | -	bl	i2cwait
 | 
| 934 |  | -	mov	lr, #0xd0
 | 
| 935 |  | -	b	pmudone
 | 
| 936 |  | -pmuskip:
 | 
| 937 |  | -	mov	lr, #0xe7
 | 
| 938 |  | -	str	lr, [r5,#0xc]
 | 
| 939 |  | -	mov	lr, #0xb0
 | 
| 940 |  | -	str	lr, [r5,#0x4]
 | 
| 941 |  | -	mov	lr, #0xb7
 | 
| 942 |  | -	str	lr, [r5]
 | 
| 943 |  | -	bl	i2cwait
 | 
| 944 |  | -	mov	lr, #0x37
 | 
| 945 |  | -	str	lr, [r5]
 | 
| 946 |  | -	bl	i2cwait
 | 
| 947 |  | -	ldr	r3, [r5,#0xc]
 | 
| 948 |  | -	mov	lr, #0x90
 | 
| 949 |  | -pmudone:
 | 
| 950 |  | -	str	lr, [r5,#0x4]
 | 
| 951 |  | -	mov	lr, #0xb7
 | 
| 952 |  | -	str	lr, [r5]
 | 
| 953 |  | -pmuwait:
 | 
| 954 |  | -	ldr	lr, [r5,#0x4]
 | 
| 955 |  | -	tst	lr, #0x20
 | 
| 956 |  | -	bne	pmuwait
 | 
| 957 |  | -	mov	pc, r7
 | 
| 958 |  | -
 | 
| 959 |  | -udelay:
 | 
| 960 |  | -	ldr	r6, [r1,#0xb4]
 | 
| 961 |  | -	add	r0, r0, r6
 | 
| 962 |  | -udelayloop:
 | 
| 963 |  | -	ldr	r6, [r1,#0xb4]
 | 
| 964 |  | -	cmp	r6, r0
 | 
| 965 |  | -	bmi	udelayloop
 | 
| 966 |  | -	mov	pc, lr
 | 
| 967 |  | -
 | 
| 968 |  | -
 | 
| 969 |  | -pwrok:
 | 
| 970 |  | -	sub	r7, r5, #0x04500000  @ R7 = MIUBASE (temporary)
 | 
| 971 |  | -	cmp	r0, #0
 | 
| 972 |  | -	moveq	r6, #0x11
 | 
| 973 |  | -	streq	r6, [r7]
 | 
| 974 |  | -	str	r8, [r7]
 | 
| 975 |  | -	str	r2, [r7,#0xf0]
 | 
| 976 |  | -	str	r9, [r7,#0x8]
 | 
| 977 |  | -	str	r10, [r7,#0x10]
 | 
| 978 |  | -	mov	r8, #0x1800
 | 
| 979 |  | -	orr	r6, r8, #0x45
 | 
| 980 |  | -	str	r6, [r7,#0x200]
 | 
| 981 |  | -	str	r6, [r7,#0x204]
 | 
| 982 |  | -	str	r8, [r7,#0x210]
 | 
| 983 |  | -	str	r8, [r7,#0x214]
 | 
| 984 |  | -	str	r6, [r7,#0x220]
 | 
| 985 |  | -	str	r6, [r7,#0x224]
 | 
| 986 |  | -	add	r6, r6, #0x40
 | 
| 987 |  | -	str	r6, [r7,#0x230]
 | 
| 988 |  | -	str	r6, [r7,#0x234]
 | 
| 989 |  | -	mov	r6, #0x19
 | 
| 990 |  | -	str	r6, [r7,#0x14]
 | 
| 991 |  | -	str	r6, [r7,#0x18]
 | 
| 992 |  | -	str	r11, [r7,#0x1c]
 | 
| 993 |  | -	ldr	r6, [r7,#0x314]
 | 
| 994 |  | -	bic	r6, r6, #0x10
 | 
| 995 |  | -	str	r6, [r7,#0x314]
 | 
| 996 |  | -	add	r8, r7, #0x2c
 | 
| 997 |  | -	mov	r9, #0x24
 | 
| 998 |  | -sdramloop:
 | 
| 999 |  | -	ldr	r6, [r8]
 | 
| 1000 |  | -	bic	r6, r6, #0x01000000
 | 
| 1001 |  | -	str	r6, [r8], #4
 | 
| 1002 |  | -	subs	r9, r9, #1
 | 
| 1003 |  | -	bne	sdramloop
 | 
| 1004 |  | -	mov	r6, #0x540
 | 
| 1005 |  | -	str	r6, [r7,#0x1cc]
 | 
| 1006 |  | -	ldr	r6, [r7,#0x1d4]
 | 
| 1007 |  | -	orr	r6, r6, #0x80
 | 
| 1008 |  | -	str	r6, [r7,#0x1d4]
 | 
| 1009 |  | -	mov	r6, #0x33
 | 
| 1010 |  | -	str	r6, [r7,#0x4]
 | 
| 1011 |  | -	str	r6, [r7,#0x4]
 | 
| 1012 |  | -	orr	r8, r6, #0x200
 | 
| 1013 |  | -	str	r8, [r7,#0x4]
 | 
| 1014 |  | -	str	r6, [r7,#0x4]
 | 
| 1015 |  | -	str	r6, [r7,#0x4]
 | 
| 1016 |  | -	str	r6, [r7,#0x4]
 | 
| 1017 |  | -	orr	r8, r8, #0x100
 | 
| 1018 |  | -	str	r8, [r7,#0x4]
 | 
| 1019 |  | -	str	r6, [r7,#0x4]
 | 
| 1020 |  | -	str	r6, [r7,#0x4]
 | 
| 1021 |  | -	str	r6, [r7,#0x4]
 | 
| 1022 |  | -	str	r8, [r7,#0x4]
 | 
| 1023 |  | -	str	r6, [r7,#0x4]
 | 
| 1024 |  | -	str	r6, [r7,#0x4]
 | 
| 1025 |  | -	str	r6, [r7,#0x4]
 | 
| 1026 |  | -	cmp	r0, #0
 | 
| 1027 |  | -	strne	r6, [r7,#0xc]
 | 
| 1028 |  | -	bicne	r8, r8, #0x200
 | 
| 1029 |  | -	strne	r8, [r7,#0x4]
 | 
| 1030 |  | -	strne	r6, [r7,#0x4]
 | 
| 1031 |  | -	strne	r6, [r7,#0x4]
 | 
| 1032 |  | -	strne	r6, [r7,#0x4]
 | 
| 1033 |  | -	strne	r12, [r7,#0xc]
 | 
| 1034 |  | -	strne	r8, [r7,#0x4]
 | 
| 1035 |  | -	strne	r6, [r7,#0x4]
 | 
| 1036 |  | -	strne	r6, [r7,#0x4]
 | 
| 1037 |  | -	strne	r6, [r7,#0x4]
 | 
| 1038 |  | -	ldr	r6, [r7,#0x8]
 | 
| 1039 |  | -	orr	r6, r6, #0x61000
 | 
| 1040 |  | -	str	r6, [r7,#0x8]
 | 
| 1041 |  | -	orr	r3, r1, #0x00800000  @ R3 = GPIOBASE
 | 
| 1042 |  | -	sub	r4, r1, #0x04400000  @ R4 = LCDBASE
 | 
| 1043 |  | -	ldr	r0, [r3,#0xc4]
 | 
| 1044 |  | -	and	r8, r0, #0x30        @ R8 = LCD type GPIO bits << 4
 | 
| 1045 |  | -	add	sp, sp, r8,lsr#3
 | 
| 1046 |  | -	ldrh	r0, [sp]
 | 
| 1047 |  | -	add	sp, sp, r0
 | 
| 1048 |  | -	ldr	r0, val_80100db0
 | 
| 1049 |  | -	str	r0, [r4]
 | 
| 1050 |  | -	mov	r0, #0x33
 | 
| 1051 |  | -	str	r0, [r4,#0x20]
 | 
| 1052 |  | -lcdloop:
 | 
| 1053 |  | -	adr	lr, lcdloop
 | 
| 1054 |  | -	ldrb	r6, [sp], #1
 | 
| 1055 |  | -	ldrb	r7, [sp], #1
 | 
| 1056 |  | -	orr	r6, r6, r7,lsl#8
 | 
| 1057 |  | -	mov	r7, r6,lsr#14
 | 
| 1058 |  | -	bics	r0, r6, #0xc000
 | 
| 1059 |  | -	add	pc, pc, r7,lsl#2
 | 
| 1060 |  | -val_80100db0:
 | 
| 1061 |  | -	.word 0x80100db0
 | 
| 1062 |  | -	b	sendlcdd
 | 
| 1063 |  | -	b	sendlcdc
 | 
| 1064 |  | -	bne	lcdbyteseq
 | 
| 1065 |  | -	movne	r0, r0,lsl#4
 | 
| 1066 |  | -	bne	udelay
 | 
| 1067 |  | -	mov	r10, #0x22000000
 | 
| 1068 |  | -	orr	r10, r10, #0x10000
 | 
| 1069 |  | -	add	r11, r10, #0x25800
 | 
| 1070 |  | -	mov	r0, #-1
 | 
| 1071 |  | -fillbuff:
 | 
| 1072 |  | -	str	r0, [r11,#-4]!
 | 
| 1073 |  | -	cmp	r10, r11
 | 
| 1074 |  | -	bne	fillbuff
 | 
| 1075 |  | -	mov	r1, r11
 | 
| 1076 |  | -	adr	r0, text
 | 
| 1077 |  | -	bl	rendertext
 | 
| 1078 |  | -	add	r1, r11, #0x2800
 | 
| 1079 |  | -printerror:
 | 
| 1080 |  | -	bl	rendertext
 | 
| 1081 |  | -	bl	flushcache
 | 
| 1082 |  | -	cmp	r8, #0x30
 | 
| 1083 |  | -	bne	leadisprotocol
 | 
| 1084 |  | -	mov	r9, #0x200
 | 
| 1085 |  | -	add	r0, r9, #0x10
 | 
| 1086 |  | -	bl	sendlcdc
 | 
| 1087 |  | -	mov	r0, #0
 | 
| 1088 |  | -	bl	sendlcdd
 | 
| 1089 |  | -	add	r0, r9, #0x11
 | 
| 1090 |  | -	bl	sendlcdc
 | 
| 1091 |  | -	sub	r0, r9, #0xc1
 | 
| 1092 |  | -	bl	sendlcdd
 | 
| 1093 |  | -	add	r0, r9, #0x12
 | 
| 1094 |  | -	bl	sendlcdc
 | 
| 1095 |  | -	mov	r0, #0
 | 
| 1096 |  | -	bl	sendlcdd
 | 
| 1097 |  | -	add	r0, r9, #0x13
 | 
| 1098 |  | -	bl	sendlcdc
 | 
| 1099 |  | -	mov	r0, #0xef
 | 
| 1100 |  | -	bl	sendlcdd
 | 
| 1101 |  | -	mov	r0, r9
 | 
| 1102 |  | -	bl	sendlcdc
 | 
| 1103 |  | -	mov	r0, #0
 | 
| 1104 |  | -	bl	sendlcdd
 | 
| 1105 |  | -	add	r0, r9, #1
 | 
| 1106 |  | -	bl	sendlcdc
 | 
| 1107 |  | -	mov	r0, #0
 | 
| 1108 |  | -	bl	sendlcdd
 | 
| 1109 |  | -	add	r0, r9, #2
 | 
| 1110 |  | -	bl	sendlcdc
 | 
| 1111 |  | -	b	blit
 | 
| 1112 |  | -leadisprotocol:
 | 
| 1113 |  | -	mov	r0, #0x2a
 | 
| 1114 |  | -	bl	sendlcdc
 | 
| 1115 |  | -	mov	r0, #0
 | 
| 1116 |  | -	bl	sendlcdd
 | 
| 1117 |  | -	mov	r0, #0
 | 
| 1118 |  | -	bl	sendlcdd
 | 
| 1119 |  | -	mov	r0, #1
 | 
| 1120 |  | -	bl	sendlcdd
 | 
| 1121 |  | -	mov	r0, #0x3f
 | 
| 1122 |  | -	bl	sendlcdd
 | 
| 1123 |  | -	mov	r0, #0x2b
 | 
| 1124 |  | -	bl	sendlcdc
 | 
| 1125 |  | -	mov	r0, #0
 | 
| 1126 |  | -	bl	sendlcdd
 | 
| 1127 |  | -	mov	r0, #0
 | 
| 1128 |  | -	bl	sendlcdd
 | 
| 1129 |  | -	mov	r0, #0
 | 
| 1130 |  | -	bl	sendlcdd
 | 
| 1131 |  | -	mov	r0, #0xef
 | 
| 1132 |  | -	bl	sendlcdd
 | 
| 1133 |  | -	mov	r0, #0x2c
 | 
| 1134 |  | -	bl	sendlcdc
 | 
| 1135 |  | -blit:
 | 
| 1136 |  | -	sub	r7, r4, #0x00100000  @ R7 = DMA0BASE (temporary)
 | 
| 1137 |  | -	mov	r0, #1
 | 
| 1138 |  | -	str	r0, [r7,#0x30]
 | 
| 1139 |  | -	mov	r0, #0x22000000
 | 
| 1140 |  | -	orr	r0, r0, #0x3d000
 | 
| 1141 |  | -	add	r1, r7, #0x100
 | 
| 1142 |  | -	mov	r13, #0x8800
 | 
| 1143 |  | -	orr	r13, r13, #0xc1
 | 
| 1144 |  | -	ldmia	r0, {r9-r12}
 | 
| 1145 |  | -	stmia	r1, {r9-r13}
 | 
| 1146 |  | -	tst	r5, #0xff
 | 
| 1147 |  | -failed:
 | 
| 1148 |  | -	bne	failed
 | 
| 1149 |  | -	mov	r3, #0x2b
 | 
| 1150 |  | -	mov	r4, #4
 | 
| 1151 |  | -	bl	pmutransfer
 | 
| 1152 |  | -	mov	r3, #0x28
 | 
| 1153 |  | -	mov	r4, #14
 | 
| 1154 |  | -	bl	pmutransfer
 | 
| 1155 |  | -	mov	r3, #0x29
 | 
| 1156 |  | -	mov	r4, #1
 | 
| 1157 |  | -	bl	pmutransfer
 | 
| 1158 |  | -	sub	r7, r5, #0x00300000  @ R7 = SPIBASE
 | 
| 1159 |  | -	orr	r3, r5, #0x00900000  @ R3 = GPIOBASE
 | 
| 1160 |  | -	mov	r0, #0xf
 | 
| 1161 |  | -	str	r0, [r7,#0x8]
 | 
| 1162 |  | -	ldr	r0, [r7]
 | 
| 1163 |  | -	orr	r0, r0, #0xc
 | 
| 1164 |  | -	str	r0, [r7]
 | 
| 1165 |  | -	mov	r0, #4
 | 
| 1166 |  | -	str	r0, [r7,#0x30]
 | 
| 1167 |  | -	mov	r0, #6
 | 
| 1168 |  | -	str	r0, [r7,#0xc]
 | 
| 1169 |  | -	ldr	r0, val_00010618
 | 
| 1170 |  | -	str	r0, [r7,#0x4]
 | 
| 1171 |  | -	ldr	r0, [r7]
 | 
| 1172 |  | -	orr	r0, r0, #0xc
 | 
| 1173 |  | -	str	r0, [r7]
 | 
| 1174 |  | -	mov	r0, #1
 | 
| 1175 |  | -	str	r0, [r7]
 | 
| 1176 |  | -    	sub	r1, r9, #0x1000
 | 
| 1177 |  | -	mov	r11, #0
 | 
| 1178 |  | -	mov	r12, #0x1000
 | 
| 1179 |  | -	bl	bootflash_read
 | 
| 1180 |  | -    	sub	r11, r9, #0x1000
 | 
| 1181 |  | -	ldrd	r4, bootfilename
 | 
| 1182 |  | -searchfile:
 | 
| 1183 |  | -	ldrd	r12, [r11]
 | 
| 1184 |  | -	cmp	r4, r12
 | 
| 1185 |  | -	cmpeq	r5, r13
 | 
| 1186 |  | -	beq	foundfile
 | 
| 1187 |  | -	add	r11, r11, #0x10
 | 
| 1188 |  | -	tst	r11, #0x10000
 | 
| 1189 |  | -	beq	searchfile
 | 
| 1190 |  | -	adr	r0, errormessage
 | 
| 1191 |  | -	sub	r4, r3, #0x04c00000  @ R4 = LCDBASE
 | 
| 1192 |  | -	mov	r1, #0x22000000
 | 
| 1193 |  | -	orr	r1, r1, #0x13c00
 | 
| 1194 |  | -	b	printerror
 | 
| 1195 |  | -
 | 
| 1196 |  | -val_00010618:
 | 
| 1197 |  | -	.word 0x00010618
 | 
| 1198 |  | -
 | 
| 1199 |  | -bootfilename:
 | 
| 1200 |  | -	.ascii "embios  "
 | 
| 1201 |  | -
 | 
| 1202 |  | -text:
 | 
| 1203 |  | -	.ascii "emBIOS Loader v"
 | 
| 1204 |  | -	.ascii VERSION
 | 
| 1205 |  | -	.ascii " r"
 | 
| 1206 |  | -	.ascii VERSION_SVN
 | 
| 1207 |  | -	.ascii "\0"
 | 
| 1208 |  | -	.ascii "Loading emBIOS...\0"
 | 
| 1209 |  | -
 | 
| 1210 |  | -errormessage:
 | 
| 1211 |  | -	.ascii "File not found!\0"
 | 
| Index: emcore/trunk/loader/ipodnano3g/ls.x | 
| — | — | @@ -1,21 +0,0 @@ | 
| 2 |  | -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
 | 
| 3 |  | -	      "elf32-littlearm")
 | 
| 4 |  | -OUTPUT_ARCH(arm)
 | 
| 5 |  | -ENTRY(_start)
 | 
| 6 |  | -
 | 
| 7 |  | -SECTIONS
 | 
| 8 |  | -{
 | 
| 9 |  | -  . = 0x22000000;
 | 
| 10 |  | -
 | 
| 11 |  | -  .text : { *(.text) } 
 | 
| 12 |  | -
 | 
| 13 |  | -  __data_start__ = . ;
 | 
| 14 |  | -  .data : { *(.data) *(.rodata) }
 | 
| 15 |  | -
 | 
| 16 |  | -  __bss_start__ = .;
 | 
| 17 |  | -  .bss : {
 | 
| 18 |  | -    *(.bss) *(COMMON);
 | 
| 19 |  | -    __bss_end__ = . ;
 | 
| 20 |  | -  }
 | 
| 21 |  | -
 | 
| 22 |  | -} | 
| \ No newline at end of file | 
| Index: emcore/trunk/loader/ipodnano3g/version.h | 
| — | — | @@ -1,36 +0,0 @@ | 
| 2 |  | -//
 | 
| 3 |  | -//
 | 
| 4 |  | -//    Copyright 2010 TheSeven
 | 
| 5 |  | -//
 | 
| 6 |  | -//
 | 
| 7 |  | -//    This file is part of emBIOS.
 | 
| 8 |  | -//
 | 
| 9 |  | -//    emBIOS is free software: you can redistribute it and/or
 | 
| 10 |  | -//    modify it under the terms of the GNU General Public License as
 | 
| 11 |  | -//    published by the Free Software Foundation, either version 2 of the
 | 
| 12 |  | -//    License, or (at your option) any later version.
 | 
| 13 |  | -//
 | 
| 14 |  | -//    emBIOS is distributed in the hope that it will be useful,
 | 
| 15 |  | -//    but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
| 16 |  | -//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 | 
| 17 |  | -//    See the GNU General Public License for more details.
 | 
| 18 |  | -//
 | 
| 19 |  | -//    You should have received a copy of the GNU General Public License along
 | 
| 20 |  | -//    with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
 | 
| 21 |  | -//
 | 
| 22 |  | -//
 | 
| 23 |  | -
 | 
| 24 |  | -
 | 
| 25 |  | -#ifndef __VERSION_H__
 | 
| 26 |  | -#define __VERSION_H__
 | 
| 27 |  | -
 | 
| 28 |  | -
 | 
| 29 |  | -#define VERSION "0.1.1"
 | 
| 30 |  | -#define VERSION_MAJOR 0
 | 
| 31 |  | -#define VERSION_MINOR 1
 | 
| 32 |  | -#define VERSION_PATCH 1
 | 
| 33 |  | -#define VERSION_SVN "$REVISION$"
 | 
| 34 |  | -#define VERSION_SVN_INT $REVISIONINT$
 | 
| 35 |  | -
 | 
| 36 |  | -
 | 
| 37 |  | -#endif | 
| \ No newline at end of file | 
| Index: emcore/trunk/loader/ipodnano3g/SOURCES | 
| — | — | @@ -1 +0,0 @@ | 
| 2 |  | -main.c
 | 
| Index: emcore/trunk/loader/ipodnano3g/Makefile | 
| — | — | @@ -1,101 +0,0 @@ | 
| 2 |  | -NAME := embiosldr-ipodnano3g
 | 
| 3 |  | -
 | 
| 4 |  | -EMBIOSDIR ?= ../../
 | 
| 5 |  | -
 | 
| 6 |  | -CROSS   ?= arm-none-eabi-
 | 
| 7 |  | -CC      := $(CROSS)gcc
 | 
| 8 |  | -AS      := $(CROSS)as
 | 
| 9 |  | -LD      := $(CROSS)ld
 | 
| 10 |  | -OBJCOPY := $(CROSS)objcopy
 | 
| 11 |  | -UCLPACK := ucl2e10singleblk
 | 
| 12 |  | -CRYPTNOR := python $(EMBIOSDIR)/tools/ipodcrypt.py s5l8702-cryptnor
 | 
| 13 |  | -
 | 
| 14 |  | -CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -ffunction-sections -fdata-sections -mcpu=arm926ej-s
 | 
| 15 |  | -LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
 | 
| 16 |  | -
 | 
| 17 |  | -preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
 | 
| 18 |  | -preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
 | 
| 19 |  | -
 | 
| 20 |  | -REVISION := $(shell svnversion .)
 | 
| 21 |  | -REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//")
 | 
| 22 |  | -
 | 
| 23 |  | -SRC := $(call preprocesspaths,SOURCES,-I. -I..)
 | 
| 24 |  | -OBJ := $(SRC:%.c=build/%.o)
 | 
| 25 |  | -OBJ := $(OBJ:%.S=build/%.o) $(HELPERS)
 | 
| 26 |  | -
 | 
| 27 |  | -all: $(NAME)
 | 
| 28 |  | -
 | 
| 29 |  | --include $(OBJ:%=%.dep)
 | 
| 30 |  | -
 | 
| 31 |  | -$(NAME): build/$(NAME).8702
 | 
| 32 |  | -
 | 
| 33 |  | -build/$(NAME).8702: build/$(NAME).bin
 | 
| 34 |  | -	@echo [CNOR]   $<
 | 
| 35 |  | -	@$(CRYPTNOR) $^ $@
 | 
| 36 |  | -
 | 
| 37 |  | -build/$(NAME).bin: build/$(NAME).elf
 | 
| 38 |  | -	@echo [OC]     $<
 | 
| 39 |  | -	@$(OBJCOPY) -O binary $^ $@
 | 
| 40 |  | -
 | 
| 41 |  | -build/$(NAME).elf: ls.x $(OBJ)
 | 
| 42 |  | -	@echo [LD]     $@
 | 
| 43 |  | -	@$(LD) $(LDFLAGS) -o $@ -T ls.x $(OBJ)
 | 
| 44 |  | -
 | 
| 45 |  | -build/%.o: %.c build/version.h
 | 
| 46 |  | -	@echo [CC]     $<
 | 
| 47 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 48 |  | -	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
 | 
| 49 |  | -else
 | 
| 50 |  | -	@-mkdir -p $(dir $@)
 | 
| 51 |  | -endif
 | 
| 52 |  | -	@$(CC) -c $(CFLAGS) -o $@ $<
 | 
| 53 |  | -	@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp
 | 
| 54 |  | -	@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.dep
 | 
| 55 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 56 |  | -	@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.dep
 | 
| 57 |  | -else
 | 
| 58 |  | -	@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dep
 | 
| 59 |  | -endif
 | 
| 60 |  | -	@rm -f $@.dep.tmp
 | 
| 61 |  | -
 | 
| 62 |  | -build/%.o: %.S build/version.h
 | 
| 63 |  | -	@echo [CC]     $<
 | 
| 64 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 65 |  | -	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
 | 
| 66 |  | -else
 | 
| 67 |  | -	@-mkdir -p $(dir $@)
 | 
| 68 |  | -endif
 | 
| 69 |  | -	@$(CC) -c $(CFLAGS) -o $@ $<
 | 
| 70 |  | -	@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp
 | 
| 71 |  | -	@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.dep
 | 
| 72 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 73 |  | -	@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.dep
 | 
| 74 |  | -else
 | 
| 75 |  | -	@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dep
 | 
| 76 |  | -endif
 | 
| 77 |  | -	@rm -f $@.dep.tmp
 | 
| 78 |  | -
 | 
| 79 |  | -build/__embios_%.o: $(EMBIOSDIR)/export/%.S
 | 
| 80 |  | -	@echo [CC]     $<
 | 
| 81 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 82 |  | -	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
 | 
| 83 |  | -else
 | 
| 84 |  | -	@-mkdir -p $(dir $@)
 | 
| 85 |  | -endif
 | 
| 86 |  | -	@$(CC) -c $(CFLAGS) -o $@ $<
 | 
| 87 |  | -
 | 
| 88 |  | -build/version.h: version.h .svn/entries build
 | 
| 89 |  | -	@echo [PP]     $<
 | 
| 90 |  | -ifeq ($(shell uname),WindowsNT)
 | 
| 91 |  | -	@sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@
 | 
| 92 |  | -else
 | 
| 93 |  | -	@sed -e 's/\$$REVISION\$$/$(REVISION)/' -e 's/\$$REVISIONINT\$$/$(REVISIONINT)/' < $< > $@
 | 
| 94 |  | -endif
 | 
| 95 |  | -
 | 
| 96 |  | -build:
 | 
| 97 |  | -	@mkdir $@
 | 
| 98 |  | -
 | 
| 99 |  | -clean:
 | 
| 100 |  | -	rm -rf build
 | 
| 101 |  | -
 | 
| 102 |  | -.PHONY: all clean $(NAME)
 | 
| Index: emcore/trunk/loader/ipodnano3g | 
| Property changes on: emcore/trunk/loader/ipodnano3g | 
| ___________________________________________________________________ | 
| Deleted: svn:ignore | 
| ## -1 +0,0 ## | 
| 103 |  | -build |