From c876d3bbefe0dc00c27ca0c12d29da5874946962 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Wed, 15 Dec 2021 21:04:28 +0100 Subject: rbutil: Merge rbutil with utils folder. rbutil uses several components from the utils folder, and can be considered part of utils too. Having it in a separate folder is an arbitrary split that doesn't help anymore these days, so merge them. This also allows other utils to easily use libtools.make without the need to navigate to a different folder. Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21 --- utils/mkzenboot/mkzenboot.h | 86 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 utils/mkzenboot/mkzenboot.h (limited to 'utils/mkzenboot/mkzenboot.h') diff --git a/utils/mkzenboot/mkzenboot.h b/utils/mkzenboot/mkzenboot.h new file mode 100644 index 0000000000..8da3e25762 --- /dev/null +++ b/utils/mkzenboot/mkzenboot.h @@ -0,0 +1,86 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2013 by Amaury Pouly + * + * 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 MKZENBOOT_H +#define MKZENBOOT_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +enum zen_error_t +{ + ZEN_SUCCESS = 0, + ZEN_ERROR = -1, + ZEN_OPEN_ERROR = -2, + ZEN_READ_ERROR = -3, + ZEN_NO_MATCH = -4, + ZEN_BOOT_INVALID = -5, + ZEN_BOOT_MISMATCH = -6, + ZEN_BOOT_CHECKSUM_ERROR = -7, + ZEN_DONT_KNOW_HOW_TO_PATCH = -8, + ZEN_WRITE_ERROR = -9, + ZEN_UNSUPPORTED = 10, + ZEN_FW_INVALID = -11, + ZEN_FW_MISMATCH = -12, + ZEN_FIRST_ZENTOOLS_ERROR = -12, +}; + +enum zen_output_type_t +{ + ZEN_DUALBOOT = 0, /* keep all OF data and pack OF+RB into firmware for dualboot */ + ZEN_MIXEDBOOT, /* rename OF, keep data, put RB as firmware, use RB bootloader to dualboot */ + ZEN_RECOVERY, /* only put rockbox with recovery mode */ + ZEN_SINGLEBOOT, /* only put rockbox with recovery mode */ +}; + +/* Supported models */ +enum zen_model_t +{ + MODEL_UNKNOWN = 0, + MODEL_ZENMOZAIC, + MODEL_ZENV, + MODEL_ZENXFI, + MODEL_ZEN, + /* new models go here */ + + NUM_MODELS +}; + +struct zen_option_t +{ + bool debug; + enum zen_output_type_t output; + enum zen_model_t model; /* pass MODEL_UNKNOWN to use MD5 knowledge base */ +}; + +enum zen_error_t mkzenboot(const char *infile, const char *bootfile, + const char *outfile, struct zen_option_t opt); + +#ifdef __cplusplus +} +#endif +#endif + -- cgit v1.2.3