uuu
uuu (Universal Update Utility), mfgtools 3.0
Loading...
Searching...
No Matches
rominfo.cpp File Reference
#include "rominfo.h"
#include "buffer.h"
#include "config.h"
#include "libcomm.h"
#include <cstring>
#include <array>

Classes

struct  rom_container
struct  rom_bootimg

Macros

#define IV_MAX_LEN   32
#define HASH_MAX_LEN   64
#define CONTAINER_HDR_ALIGNMENT   0x400
#define CONTAINER_HDR_ALIGNMENT_V2   0x4000

Functions

const ROM_INFOsearch_rom_info (const std::string &s)
const ROM_INFOsearch_rom_info (const ConfigItem *item)
size_t GetContainerActualSize (shared_ptr< DataBuffer > p, size_t offset, bool bROMAPI, bool skipspl)
bool CheckHeader (uint32_t *p)
size_t GetFlashHeaderSize (shared_ptr< DataBuffer > p, size_t offset)
bool IsMBR (shared_ptr< DataBuffer > p)
size_t ScanTerm (std::shared_ptr< DataBuffer > p, size_t &pos, size_t offset, size_t limited)

Variables

static constexpr std::array< ROM_INFO, 16 > g_RomInfo
static constexpr uint8_t CONTAINER_TAG = 0x87
static constexpr uint8_t V2X_TAG = 0x82
static constexpr uint32_t IMG_FCB_COPY = 0x08
static constexpr uint32_t IMG_V2X = 0x0B

Macro Definition Documentation

◆ CONTAINER_HDR_ALIGNMENT

#define CONTAINER_HDR_ALIGNMENT   0x400

◆ CONTAINER_HDR_ALIGNMENT_V2

#define CONTAINER_HDR_ALIGNMENT_V2   0x4000

◆ HASH_MAX_LEN

#define HASH_MAX_LEN   64

◆ IV_MAX_LEN

#define IV_MAX_LEN   32

Function Documentation

◆ CheckHeader()

bool CheckHeader ( uint32_t * p)

◆ GetContainerActualSize()

size_t GetContainerActualSize ( shared_ptr< DataBuffer > p,
size_t offset,
bool bROMAPI,
bool skipspl )

◆ GetFlashHeaderSize()

size_t GetFlashHeaderSize ( shared_ptr< DataBuffer > p,
size_t offset )

◆ IsMBR()

bool IsMBR ( shared_ptr< DataBuffer > p)

◆ ScanTerm()

size_t ScanTerm ( std::shared_ptr< DataBuffer > p,
size_t & pos,
size_t offset,
size_t limited )

◆ search_rom_info() [1/2]

const ROM_INFO * search_rom_info ( const ConfigItem * item)

◆ search_rom_info() [2/2]

const ROM_INFO * search_rom_info ( const std::string & s)

Variable Documentation

◆ CONTAINER_TAG

uint8_t CONTAINER_TAG = 0x87
staticconstexpr

◆ g_RomInfo

std::array<ROM_INFO, 16> g_RomInfo
staticconstexpr
Initial value:
{
ROM_INFO{ "MX6Q", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6, 0},
ROM_INFO{ "MX6D", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6, 0},
ROM_INFO{ "MX6SL", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6, 0},
ROM_INFO{ "MX7D", 0x00911000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MX6UL", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MX6ULL", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MX6SLL", 0x00910000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MX7ULP", 0x2f018000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MXRT106X", 0x1000, ROM_INFO_HID | ROM_INFO_HID_MX6 | ROM_INFO_HID_SKIP_DCD, 0},
ROM_INFO{ "MX8QXP", 0x0, ROM_INFO_HID | ROM_INFO_HID_NO_CMD | ROM_INFO_HID_UID_STRING, 4},
ROM_INFO{ "MX28", 0x0, ROM_INFO_HID, 0},
}
constexpr uint32_t ROM_INFO_AUTO_SCAN_UBOOT_POS
Definition rominfo.h:57
constexpr uint32_t ROM_INFO_HID_PACK_SIZE_1020
Definition rominfo.h:55
constexpr uint32_t ROM_INFO_HID_SKIP_DCD
Definition rominfo.h:46
constexpr uint32_t ROM_INFO_HID_ROMAPI
Definition rominfo.h:58
constexpr uint32_t ROM_INFO_HID_SDP_NO_MAX_PER_TRANS
Definition rominfo.h:56
constexpr uint32_t ROM_INFO_HID
Definition rominfo.h:42
constexpr uint32_t ROM_INFO_NEED_BAREBOX_FULL_IMAGE
Definition rominfo.h:59
constexpr uint32_t ROM_INFO_HID_NO_CMD
Definition rominfo.h:52
constexpr uint32_t ROM_INFO_SPL_JUMP
Definition rominfo.h:53
constexpr uint32_t ROM_INFO_HID_MX6
Definition rominfo.h:45
constexpr uint32_t ROM_INFO_HID_EP1
Definition rominfo.h:54
constexpr uint32_t ROM_INFO_HID_UID_STRING
Definition rominfo.h:49
Definition rominfo.h:62

◆ IMG_FCB_COPY

uint32_t IMG_FCB_COPY = 0x08
staticconstexpr

◆ IMG_V2X

uint32_t IMG_V2X = 0x0B
staticconstexpr

◆ V2X_TAG

uint8_t V2X_TAG = 0x82
staticconstexpr