diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-11 13:28:43 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-12 10:35:20 +0000 |
commit | 3f26fcf34001197ed267fa1ad549095aae49c88e (patch) | |
tree | c81ab3298a349d1156e905d467492b603236f74d /firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h | |
parent | cc22df198d0ccb64dfdfe0c2f247f7d86b7fd750 (diff) | |
download | rockbox-3f26fcf34001197ed267fa1ad549095aae49c88e.tar.gz rockbox-3f26fcf34001197ed267fa1ad549095aae49c88e.zip |
FiiO M3K: New bootloaderbootloader_fiiom3k_v1
SPL and UCL-compressed bootloader are now packed into one output,
bootloader.m3k, eliminating the separate SPL build phase.
The Rockbox bootloader now has a recovery menu, accessible by
holding VOL+ when booting, that lets you back up, restore, and
update the bootloader from the device.
Change-Id: I642c6e5fb83587a013ab2fbfd1adab439561ced2
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h b/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h new file mode 100644 index 0000000000..eb700e6689 --- /dev/null +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2021 Aidan MacDonald | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef __INSTALLER_FIIOM3K_H__ | ||
23 | #define __INSTALLER_FIIOM3K_H__ | ||
24 | |||
25 | #include <stddef.h> | ||
26 | |||
27 | #define INSTALL_SUCCESS 0 | ||
28 | #define INSTALL_ERR_OUT_OF_MEMORY (-1) | ||
29 | #define INSTALL_ERR_FILE_NOT_FOUND (-2) | ||
30 | #define INSTALL_ERR_FILE_IO (-3) | ||
31 | #define INSTALL_ERR_BAD_FORMAT (-4) | ||
32 | #define INSTALL_ERR_NAND_OPEN (-5) | ||
33 | #define INSTALL_ERR_NAND_IDENTIFY (-6) | ||
34 | #define INSTALL_ERR_NAND_READ (-7) | ||
35 | #define INSTALL_ERR_NAND_ENABLE_WRITES (-8) | ||
36 | #define INSTALL_ERR_NAND_ERASE (-9) | ||
37 | #define INSTALL_ERR_NAND_WRITE (-10) | ||
38 | #define INSTALL_ERR_TAR_OPEN (-11) | ||
39 | #define INSTALL_ERR_TAR_FIND (-12) | ||
40 | #define INSTALL_ERR_TAR_READ (-13) | ||
41 | #define INSTALL_ERR_MTAR(x,y) ((INSTALL_ERR_##x)*100 + (y)) | ||
42 | #define INSTALL_ERR_FLASH(x,y) ((INSTALL_ERR_##x)*100 + (y)) | ||
43 | |||
44 | /* Install the Rockbox bootloader from a bootloader.m3k image */ | ||
45 | extern int install_boot(const char* srcfile); | ||
46 | |||
47 | /* Backup or restore the bootloader from a raw NAND image */ | ||
48 | extern int backup_boot(const char* destfile); | ||
49 | extern int restore_boot(const char* srcfile); | ||
50 | |||
51 | #endif /* __INSTALLER_FIIOM3K_H__ */ | ||