summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h')
-rw-r--r--firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h51
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 */
45extern int install_boot(const char* srcfile);
46
47/* Backup or restore the bootloader from a raw NAND image */
48extern int backup_boot(const char* destfile);
49extern int restore_boot(const char* srcfile);
50
51#endif /* __INSTALLER_FIIOM3K_H__ */