summaryrefslogtreecommitdiff
path: root/utils/hwstub/stub/jz4760b/hwstub.lds
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-24 15:22:27 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-24 15:22:27 +0100
commitcc2389b7a61784c229b42da4abbc238a42e5173d (patch)
tree0aa51262daad31017d8ec19124f05638469b5270 /utils/hwstub/stub/jz4760b/hwstub.lds
parentd7c71a3fe80150ecc1196e34b55d1fdd1323057a (diff)
downloadrockbox-cc2389b7a61784c229b42da4abbc238a42e5173d.tar.gz
rockbox-cc2389b7a61784c229b42da4abbc238a42e5173d.zip
hwstub: add jz4760b stub
The stub is quite versatile: it can be loaded using bootrom or another other means (like factory boot on Fiio X1). It relocates itself to TCSM0 and provides basic functionality (it does not recover from failed read/writes at the moment). Change-Id: Ib646a4b43fba9358d6f93f0f73a5c2e9bcd775a7
Diffstat (limited to 'utils/hwstub/stub/jz4760b/hwstub.lds')
-rw-r--r--utils/hwstub/stub/jz4760b/hwstub.lds55
1 files changed, 55 insertions, 0 deletions
diff --git a/utils/hwstub/stub/jz4760b/hwstub.lds b/utils/hwstub/stub/jz4760b/hwstub.lds
new file mode 100644
index 0000000000..33aad51ebd
--- /dev/null
+++ b/utils/hwstub/stub/jz4760b/hwstub.lds
@@ -0,0 +1,55 @@
1#include "config.h"
2ENTRY(main)
3OUTPUT_ARCH(mips)
4STARTUP(jz4760b/crt0.o)
5
6MEMORY
7{
8 /* see crt0.S from an an explanation of why TCSM0 is the best choice */
9 TCSM0 : ORIGIN = TCSM0_ORIG, LENGTH = TCSM0_SIZE
10}
11
12SECTIONS
13{
14 .itext :
15 {
16 relocstart = .;
17 oc_codestart = .;
18 *(.init.text*)
19 *(.text*)
20 *(.icode*)
21 *(.data*)
22 *(.rodata*)
23 . = ALIGN(4);
24 relocend = .;
25 } > TCSM0
26
27 .bss (NOLOAD) :
28 {
29 bssbegin = .;
30 *(.bss)
31 . = ALIGN(4);
32 bssend = .;
33 } > TCSM0
34
35 .stack (NOLOAD) :
36 {
37 oc_codeend = .;
38 oc_stackstart = .;
39 . += STACK_SIZE;
40 oc_stackend = .;
41 oc_bufferstart = .;
42 } > TCSM0
43
44 .ocend TCSM0_ORIG + TCSM0_SIZE (NOLOAD) :
45 {
46 oc_bufferend = .;
47 } > TCSM0
48
49 /DISCARD/ :
50 {
51 *(.note.*)
52 *(.reginfo*)
53 *(.MIPS*)
54 }
55}