diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/mks5lboot/dualboot/dualboot.lds | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip |
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/mks5lboot/dualboot/dualboot.lds')
-rw-r--r-- | utils/mks5lboot/dualboot/dualboot.lds | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/utils/mks5lboot/dualboot/dualboot.lds b/utils/mks5lboot/dualboot/dualboot.lds new file mode 100644 index 0000000000..cb92e2a286 --- /dev/null +++ b/utils/mks5lboot/dualboot/dualboot.lds | |||
@@ -0,0 +1,59 @@ | |||
1 | #define ASM | ||
2 | #include "config.h" | ||
3 | #include "cpu.h" | ||
4 | #include "mks5lboot.h" | ||
5 | |||
6 | ENTRY(_start) | ||
7 | OUTPUT_FORMAT(elf32-littlearm) | ||
8 | OUTPUT_ARCH(arm) | ||
9 | |||
10 | #define BIN_ORIG DFU_LOADADDR + BIN_OFFSET | ||
11 | #define BIN_SIZE MAX_PAYLOAD | ||
12 | |||
13 | MEMORY | ||
14 | { | ||
15 | IRAM : ORIGIN = BIN_ORIG, LENGTH = BIN_SIZE | ||
16 | } | ||
17 | |||
18 | SECTIONS | ||
19 | { | ||
20 | .text : { | ||
21 | *(.init.text*) | ||
22 | *(.text*) | ||
23 | *(.icode*) | ||
24 | . = ALIGN(4); | ||
25 | } > IRAM | ||
26 | |||
27 | /* include initialized BSS (if any) into DFU image */ | ||
28 | .bss : { | ||
29 | *(.bss*) | ||
30 | *(.ibss*) | ||
31 | *(COMMON) | ||
32 | . = ALIGN(4); | ||
33 | } > IRAM | ||
34 | |||
35 | #if 1 | ||
36 | /* reuse pwnage as stack, 0x30c bytes available */ | ||
37 | _exception_stack = BIN_ORIG; | ||
38 | _supervisor_stack = _exception_stack; | ||
39 | #else | ||
40 | /* include stack into DFU image */ | ||
41 | .stack : { | ||
42 | . += 0x400; | ||
43 | _supervisor_stack = .; | ||
44 | . += 0x200; | ||
45 | _exception_stack = .; | ||
46 | } > IRAM | ||
47 | #endif | ||
48 | |||
49 | .data : { | ||
50 | *(.data*) | ||
51 | *(.rodata*) | ||
52 | *(.idata*) | ||
53 | *(.irodata*) | ||
54 | /* place bootloader IM3 header at the end, mkdfu | ||
55 | will concatenate the bootloader binary here */ | ||
56 | . = ALIGN(16); | ||
57 | *(.im3info.data*) | ||
58 | } > IRAM | ||
59 | } | ||