From 3f26fcf34001197ed267fa1ad549095aae49c88e Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 11 May 2021 13:28:43 +0100 Subject: FiiO M3K: New bootloader 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 --- .../mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.h') 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 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2021 Aidan MacDonald + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef __INSTALLER_FIIOM3K_H__ +#define __INSTALLER_FIIOM3K_H__ + +#include + +#define INSTALL_SUCCESS 0 +#define INSTALL_ERR_OUT_OF_MEMORY (-1) +#define INSTALL_ERR_FILE_NOT_FOUND (-2) +#define INSTALL_ERR_FILE_IO (-3) +#define INSTALL_ERR_BAD_FORMAT (-4) +#define INSTALL_ERR_NAND_OPEN (-5) +#define INSTALL_ERR_NAND_IDENTIFY (-6) +#define INSTALL_ERR_NAND_READ (-7) +#define INSTALL_ERR_NAND_ENABLE_WRITES (-8) +#define INSTALL_ERR_NAND_ERASE (-9) +#define INSTALL_ERR_NAND_WRITE (-10) +#define INSTALL_ERR_TAR_OPEN (-11) +#define INSTALL_ERR_TAR_FIND (-12) +#define INSTALL_ERR_TAR_READ (-13) +#define INSTALL_ERR_MTAR(x,y) ((INSTALL_ERR_##x)*100 + (y)) +#define INSTALL_ERR_FLASH(x,y) ((INSTALL_ERR_##x)*100 + (y)) + +/* Install the Rockbox bootloader from a bootloader.m3k image */ +extern int install_boot(const char* srcfile); + +/* Backup or restore the bootloader from a raw NAND image */ +extern int backup_boot(const char* destfile); +extern int restore_boot(const char* srcfile); + +#endif /* __INSTALLER_FIIOM3K_H__ */ -- cgit v1.2.3