summaryrefslogtreecommitdiffstats
path: root/rbutil/mks5lboot/dualboot/dualboot.lds
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2016-02-04 23:05:17 +0100
committerCástor Muñoz <cmvidal@gmail.com>2017-04-14 00:03:42 +0200
commit346423c040fe4ac31dae7c1afcb1d853cc80635c (patch)
treebd8dd4c55f083a1162f7019188977213a20dc41c /rbutil/mks5lboot/dualboot/dualboot.lds
parenteefc7c73e2495decdc6f242515696fe0e3f85609 (diff)
downloadrockbox-346423c040fe4ac31dae7c1afcb1d853cc80635c.tar.gz
rockbox-346423c040fe4ac31dae7c1afcb1d853cc80635c.zip
mks5lboot v1.0 - dualboot installer for s5l8702 targetsmks5lboot_1.0
A tool to install/uninstall a bootloader into a s5l8702 based device: - iPod Classic 6G - iPod Nano 3G (TODO) See mks5lboot/README for detailed info. Change-Id: I451d2aaff34509ebd356e4660647e5222c5d3409
Diffstat (limited to 'rbutil/mks5lboot/dualboot/dualboot.lds')
-rw-r--r--rbutil/mks5lboot/dualboot/dualboot.lds59
1 files changed, 59 insertions, 0 deletions
diff --git a/rbutil/mks5lboot/dualboot/dualboot.lds b/rbutil/mks5lboot/dualboot/dualboot.lds
new file mode 100644
index 0000000000..cb92e2a286
--- /dev/null
+++ b/rbutil/mks5lboot/dualboot/dualboot.lds
@@ -0,0 +1,59 @@
+#define ASM
+#include "config.h"
+#include "cpu.h"
+#include "mks5lboot.h"
+
+ENTRY(_start)
+OUTPUT_FORMAT(elf32-littlearm)
+OUTPUT_ARCH(arm)
+
+#define BIN_ORIG DFU_LOADADDR + BIN_OFFSET
+#define BIN_SIZE MAX_PAYLOAD
+
+MEMORY
+{
+ IRAM : ORIGIN = BIN_ORIG, LENGTH = BIN_SIZE
+}
+
+SECTIONS
+{
+ .text : {
+ *(.init.text*)
+ *(.text*)
+ *(.icode*)
+ . = ALIGN(4);
+ } > IRAM
+
+ /* include initialized BSS (if any) into DFU image */
+ .bss : {
+ *(.bss*)
+ *(.ibss*)
+ *(COMMON)
+ . = ALIGN(4);
+ } > IRAM
+
+#if 1
+ /* reuse pwnage as stack, 0x30c bytes available */
+ _exception_stack = BIN_ORIG;
+ _supervisor_stack = _exception_stack;
+#else
+ /* include stack into DFU image */
+ .stack : {
+ . += 0x400;
+ _supervisor_stack = .;
+ . += 0x200;
+ _exception_stack = .;
+ } > IRAM
+#endif
+
+ .data : {
+ *(.data*)
+ *(.rodata*)
+ *(.idata*)
+ *(.irodata*)
+ /* place bootloader IM3 header at the end, mkdfu
+ will concatenate the bootloader binary here */
+ . = ALIGN(16);
+ *(.im3info.data*)
+ } > IRAM
+}