summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-07 11:09:30 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-27 10:35:02 -0400
commit7243f6b343a88fa8f9929345edc80a81d1f6a3fe (patch)
tree1197004fab63951d625d05823a5079cbd50e1e9f
parentbcbb5a8b00770ac0d2794e59876d8187ccfea6af (diff)
downloadrockbox-7243f6b343a88fa8f9929345edc80a81d1f6a3fe.tar.gz
rockbox-7243f6b343a88fa8f9929345edc80a81d1f6a3fe.zip
x1000: Add multiboot support
Enables multiboot for the FiiO M3K, Shanling Q1, and Eros Q native port. Note this requires an up-to-date Rockbox _and_ bootloader. Usage instructions will (eventually) be found on the wiki: https://www.rockbox.org/wiki/MultibootBootloader Change-Id: Ia2da1ad6ef611e499d2fbafa93838387bc1023ba
-rw-r--r--firmware/export/config/erosqnative.h5
-rw-r--r--firmware/export/config/fiiom3k.h5
-rw-r--r--firmware/export/config/shanlingq1.h5
-rw-r--r--firmware/target/mips/ingenic_x1000/crt0.S6
4 files changed, 21 insertions, 0 deletions
diff --git a/firmware/export/config/erosqnative.h b/firmware/export/config/erosqnative.h
index 3b83d52c0e..c71f7ade49 100644
--- a/firmware/export/config/erosqnative.h
+++ b/firmware/export/config/erosqnative.h
@@ -78,6 +78,7 @@
78#define HAVE_HOTSWAP 78#define HAVE_HOTSWAP
79#define HAVE_HOTSWAP_STORAGE_AS_MAIN 79#define HAVE_HOTSWAP_STORAGE_AS_MAIN
80#define HAVE_MULTIDRIVE 80#define HAVE_MULTIDRIVE
81#define HAVE_MULTIVOLUME
81#define NUM_DRIVES 1 82#define NUM_DRIVES 1
82#define STORAGE_WANTS_ALIGN 83#define STORAGE_WANTS_ALIGN
83#define STORAGE_NEEDS_BOUNCE_BUFFER 84#define STORAGE_NEEDS_BOUNCE_BUFFER
@@ -103,6 +104,10 @@
103#define CURRENT_BACKLIGHT 180 104#define CURRENT_BACKLIGHT 180
104#define CURRENT_MAX_CHG 500 // bursts higher if needed 105#define CURRENT_MAX_CHG 500 // bursts higher if needed
105 106
107/* Multiboot */
108#define HAVE_BOOTDATA
109#define BOOT_REDIR "rockbox_main.aigo_erosqn"
110
106/* USB support */ 111/* USB support */
107#ifndef SIMULATOR 112#ifndef SIMULATOR
108#define CONFIG_USBOTG USBOTG_DESIGNWARE 113#define CONFIG_USBOTG USBOTG_DESIGNWARE
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h
index 27aefc374f..ab3e274243 100644
--- a/firmware/export/config/fiiom3k.h
+++ b/firmware/export/config/fiiom3k.h
@@ -84,6 +84,7 @@
84#define HAVE_HOTSWAP 84#define HAVE_HOTSWAP
85#define HAVE_HOTSWAP_STORAGE_AS_MAIN 85#define HAVE_HOTSWAP_STORAGE_AS_MAIN
86#define HAVE_MULTIDRIVE 86#define HAVE_MULTIDRIVE
87#define HAVE_MULTIVOLUME
87#define NUM_DRIVES 1 88#define NUM_DRIVES 1
88#define STORAGE_WANTS_ALIGN 89#define STORAGE_WANTS_ALIGN
89#define STORAGE_NEEDS_BOUNCE_BUFFER 90#define STORAGE_NEEDS_BOUNCE_BUFFER
@@ -109,6 +110,10 @@
109#define BATTERY_CAPACITY_INC 0 110#define BATTERY_CAPACITY_INC 0
110#define BATTERY_TYPES_COUNT 1 111#define BATTERY_TYPES_COUNT 1
111 112
113/* Multiboot */
114#define HAVE_BOOTDATA
115#define BOOT_REDIR "rockbox_main.fiio_m3k"
116
112/* USB support */ 117/* USB support */
113#ifndef SIMULATOR 118#ifndef SIMULATOR
114#define CONFIG_USBOTG USBOTG_DESIGNWARE 119#define CONFIG_USBOTG USBOTG_DESIGNWARE
diff --git a/firmware/export/config/shanlingq1.h b/firmware/export/config/shanlingq1.h
index 222427716f..6f5365a97e 100644
--- a/firmware/export/config/shanlingq1.h
+++ b/firmware/export/config/shanlingq1.h
@@ -67,6 +67,7 @@
67#define HAVE_HOTSWAP 67#define HAVE_HOTSWAP
68#define HAVE_HOTSWAP_STORAGE_AS_MAIN 68#define HAVE_HOTSWAP_STORAGE_AS_MAIN
69#define HAVE_MULTIDRIVE 69#define HAVE_MULTIDRIVE
70#define HAVE_MULTIVOLUME
70#define NUM_DRIVES 1 71#define NUM_DRIVES 1
71#define STORAGE_WANTS_ALIGN 72#define STORAGE_WANTS_ALIGN
72#define STORAGE_NEEDS_BOUNCE_BUFFER 73#define STORAGE_NEEDS_BOUNCE_BUFFER
@@ -94,6 +95,10 @@
94#define BATTERY_CAPACITY_INC 0 95#define BATTERY_CAPACITY_INC 0
95#define BATTERY_TYPES_COUNT 1 96#define BATTERY_TYPES_COUNT 1
96 97
98/* Multiboot */
99#define HAVE_BOOTDATA
100#define BOOT_REDIR "rockbox_main.shanling_q1"
101
97/* USB support */ 102/* USB support */
98#ifndef SIMULATOR 103#ifndef SIMULATOR
99#define CONFIG_USBOTG USBOTG_DESIGNWARE 104#define CONFIG_USBOTG USBOTG_DESIGNWARE
diff --git a/firmware/target/mips/ingenic_x1000/crt0.S b/firmware/target/mips/ingenic_x1000/crt0.S
index fbac12861d..d079b01e2a 100644
--- a/firmware/target/mips/ingenic_x1000/crt0.S
+++ b/firmware/target/mips/ingenic_x1000/crt0.S
@@ -21,6 +21,7 @@
21 21
22#include "config.h" 22#include "config.h"
23#include "mips.h" 23#include "mips.h"
24#include "bootdata.h"
24 25
25 .text 26 .text
26 .extern main 27 .extern main
@@ -48,6 +49,11 @@ _header:
48 .word _loadaddress 49 .word _loadaddress
49 .ascii "ENDH" /* end of header structure */ 50 .ascii "ENDH" /* end of header structure */
50 51
52#ifndef BOOTLOADER
53 /* Multiboot support header; this is not part of the above header. */
54 put_boot_data_here
55#endif
56
51_realstart: 57_realstart:
52 /* Copy IRAM from BSS to low memory. */ 58 /* Copy IRAM from BSS to low memory. */
53 la a0, _iramcopy 59 la a0, _iramcopy