From e6c2f26e8239a1d9e3db75fdb9d0fed05af992fa Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 5 Mar 2022 09:42:25 +0000 Subject: 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 --- bootloader/x1000/x1000bootloader.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootloader/x1000/x1000bootloader.h') 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 @@ #include "config.h" #include +#include #include +struct uimage_header; + #if defined(FIIO_M3K) # define BL_RECOVERY BUTTON_VOL_UP # define BL_UP BUTTON_VOL_UP @@ -108,6 +111,10 @@ int check_disk(bool wait); void usb_mode(void); int load_rockbox(const char* filename, size_t* sizep); +int load_uimage_file(const char* filename, + struct uimage_header* uh, size_t* sizep); +int load_uimage_flash(uint32_t addr, uint32_t length, + struct uimage_header* uh, size_t* sizep); void recovery_menu(void) __attribute__((noreturn)); -- cgit v1.2.3