diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/mi4-loader.h | 22 | ||||
-rw-r--r-- | firmware/export/multiboot.h | 30 |
2 files changed, 34 insertions, 18 deletions
diff --git a/firmware/export/mi4-loader.h b/firmware/export/mi4-loader.h index f66164ec2c..adc43ebf64 100644 --- a/firmware/export/mi4-loader.h +++ b/firmware/export/mi4-loader.h | |||
@@ -21,6 +21,9 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #ifndef __MI4_LOADER_H__ | ||
25 | #define __MI4_LOADER_H__ | ||
26 | |||
24 | #include <stdint.h> | 27 | #include <stdint.h> |
25 | 28 | ||
26 | #define MI4_HEADER_SIZE 0x200 | 29 | #define MI4_HEADER_SIZE 0x200 |
@@ -50,21 +53,4 @@ struct tea_key { | |||
50 | int load_mi4(unsigned char* buf, const char* firmware, unsigned int buffer_size); | 53 | int load_mi4(unsigned char* buf, const char* firmware, unsigned int buffer_size); |
51 | const char *mi4_strerror(int8_t errno); | 54 | const char *mi4_strerror(int8_t errno); |
52 | 55 | ||
53 | #ifdef HAVE_MULTIBOOT /* defined by config.h */ | 56 | #endif /* __MI4_LOADER_H__ */ |
54 | /* Check in root of this <volume> for rockbox_main.<playername> | ||
55 | * if this file empty or there is a single slash '/' | ||
56 | * buf = '<volume#>/<rootdir>/<firmware(name)>\0' | ||
57 | * If instead '/<*DIRECTORY*>' is supplied | ||
58 | * addpath will be set to this DIRECTORY buf = | ||
59 | * '/<volume#>/addpath/<rootdir>/<firmware(name)>\0' | ||
60 | * On error returns Negative number or 0 | ||
61 | * On success returns bytes from snprintf | ||
62 | * and generated path will be placed in buf | ||
63 | * note: if supplied buffer is too small return will be | ||
64 | * the number of bytes that would have been written | ||
65 | */ | ||
66 | |||
67 | /* TODO needs mapped back to debug_menu if root redirect ever becomes a reality */ | ||
68 | int get_redirect_dir(char* buf, int buffer_size, int volume, | ||
69 | const char* rootdir, const char* firmware); | ||
70 | #endif | ||
diff --git a/firmware/export/multiboot.h b/firmware/export/multiboot.h new file mode 100644 index 0000000000..0132b8531f --- /dev/null +++ b/firmware/export/multiboot.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2017, 2020 by William Wilgus | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #ifndef __MULTIBOOT_H__ | ||
22 | #define __MULTIBOOT_H__ | ||
23 | |||
24 | extern int write_bootdata(unsigned char* buf, int len, unsigned int boot_volume); | ||
25 | #ifdef HAVE_MULTIBOOT | ||
26 | extern int get_redirect_dir(char* buf, int buffer_size, int volume, | ||
27 | const char* rootdir, const char* firmware); | ||
28 | #endif | ||
29 | |||
30 | #endif /* __MULTIBOOT_H__ */ | ||