summaryrefslogtreecommitdiff
path: root/bootloader/x1000/x1000bootloader.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-05 09:42:25 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-12 18:25:10 +0000
commite6c2f26e8239a1d9e3db75fdb9d0fed05af992fa (patch)
tree9f03b97fd9d93a9879b4ccf23692ae21dd8075bc /bootloader/x1000/x1000bootloader.h
parentb87f2ed851ef191f1bfff245b77add2ab8b65091 (diff)
downloadrockbox-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.h7
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
30struct 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);
108void usb_mode(void); 111void usb_mode(void);
109 112
110int load_rockbox(const char* filename, size_t* sizep); 113int load_rockbox(const char* filename, size_t* sizep);
114int load_uimage_file(const char* filename,
115 struct uimage_header* uh, size_t* sizep);
116int load_uimage_flash(uint32_t addr, uint32_t length,
117 struct uimage_header* uh, size_t* sizep);
111 118
112void recovery_menu(void) __attribute__((noreturn)); 119void recovery_menu(void) __attribute__((noreturn));
113 120