diff --git a/bootimgtool/bootimgtool.cpp b/bootimgtool/bootimgtool.cpp index 6042d591a..5e12c7322 100644 --- a/bootimgtool/bootimgtool.cpp +++ b/bootimgtool/bootimgtool.cpp @@ -69,17 +69,6 @@ #define FIELD_ENTRYPOINT "entrypoint" #define FIELD_PAGE_SIZE "page_size" -#define IMAGE_KERNEL "kernel" -#define IMAGE_RAMDISK "ramdisk" -#define IMAGE_SECOND "second" -#define IMAGE_DT "dt" -#define IMAGE_ABOOT "aboot" -#define IMAGE_KERNEL_MTKHDR "kernel_mtkhdr" -#define IMAGE_RAMDISK_MTKHDR "ramdisk_mtkhdr" -#define IMAGE_IPL "ipl" -#define IMAGE_RPM "rpm" -#define IMAGE_APPSBL "appsbl" - #ifdef _WIN32 # define CLOEXEC_FLAG "N" #else @@ -152,8 +141,9 @@ typedef std::unique_ptr ScopedFILE; " (defaults to \"-\")\n" \ " -n, --noprefix Do not prepend a prefix to the item filenames\n" \ " -t, --type \n" \ - " Input type of the boot image (autodetect if unspecified)\n" \ + " Enable input format (all enabled if unspecified)\n" \ " (one of: android, bump, loki, mtk, sony_elf)\n" \ + " (can be specified multiple times)\n" \ " --output- \n" \ " Custom path for a particular item\n" \ "\n" \ @@ -721,7 +711,7 @@ static bool unpack_main(int argc, char *argv[]) std::string input_file; std::string output_dir; std::string prefix; - const char *type = nullptr; + Formats formats; PathMap paths; constexpr char source_arg_prefix[] = "input-"; @@ -739,7 +729,7 @@ static bool unpack_main(int argc, char *argv[]) SourceTypeArg(SourceType::SonyAppsbl, source_arg_prefix), }; - static const char short_options[] = "o:p:n" "h"; + static const char short_options[] = "o:p:nt:" "h"; std::vector