diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-03-05 09:42:25 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-03-12 18:25:10 +0000 |
commit | e6c2f26e8239a1d9e3db75fdb9d0fed05af992fa (patch) | |
tree | 9f03b97fd9d93a9879b4ccf23692ae21dd8075bc /bootloader/x1000/x1000bootloader.h | |
parent | b87f2ed851ef191f1bfff245b77add2ab8b65091 (diff) | |
download | rockbox-e6c2f26e8239a1d9e3db75fdb9d0fed05af992fa.tar.gz rockbox-e6c2f26e8239a1d9e3db75fdb9d0fed05af992fa.zip |
x1000: bootloader: add uImage loaders
Adds loaders for uImages on the SD card or on a raw flash partition.
These work similarily to load_rockbox() and return a buflib alloc
and size. Booting the image is left up to the caller.
Change-Id: I0d58e8c6a61d8349bc5223431cdd06dfdf2503fa
Diffstat (limited to 'bootloader/x1000/x1000bootloader.h')
-rw-r--r-- | bootloader/x1000/x1000bootloader.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bootloader/x1000/x1000bootloader.h b/bootloader/x1000/x1000bootloader.h index 84feded9b3..c5984c9a91 100644 --- a/bootloader/x1000/x1000bootloader.h +++ b/bootloader/x1000/x1000bootloader.h | |||
@@ -24,8 +24,11 @@ | |||
24 | 24 | ||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include <stddef.h> | 26 | #include <stddef.h> |
27 | #include <stdint.h> | ||
27 | #include <stdbool.h> | 28 | #include <stdbool.h> |
28 | 29 | ||
30 | struct uimage_header; | ||
31 | |||
29 | #if defined(FIIO_M3K) | 32 | #if defined(FIIO_M3K) |
30 | # define BL_RECOVERY BUTTON_VOL_UP | 33 | # define BL_RECOVERY BUTTON_VOL_UP |
31 | # define BL_UP BUTTON_VOL_UP | 34 | # define BL_UP BUTTON_VOL_UP |
@@ -108,6 +111,10 @@ int check_disk(bool wait); | |||
108 | void usb_mode(void); | 111 | void usb_mode(void); |
109 | 112 | ||
110 | int load_rockbox(const char* filename, size_t* sizep); | 113 | int load_rockbox(const char* filename, size_t* sizep); |
114 | int load_uimage_file(const char* filename, | ||
115 | struct uimage_header* uh, size_t* sizep); | ||
116 | int load_uimage_flash(uint32_t addr, uint32_t length, | ||
117 | struct uimage_header* uh, size_t* sizep); | ||
111 | 118 | ||
112 | void recovery_menu(void) __attribute__((noreturn)); | 119 | void recovery_menu(void) __attribute__((noreturn)); |
113 | 120 | ||