EncoreBootImageGenerator.h
/*
* File: EncoreBootImageGenerator.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_EncoreBootImageGenerator_h_)
#define _EncoreBootImageGenerator_h_
#include "BootImageGenerator.h"
#include "EncoreBootImage.h"
#include "Keyblob.h"
namespace elftosb
{
class EncoreBootImageGenerator : public BootImageGenerator
{
public:
EncoreBootImageGenerator()
: BootImageGenerator()
, m_encryptKeyBlob(NULL)
{
}
virtual BootImage *generate();
void setSupportHAB(bool supportHAB) { m_supportHAB = supportHAB; }
protected:
bool m_supportHAB;
Keyblob *m_encryptKeyBlob;
void processOptions(EncoreBootImage *image);
void processSectionOptions(EncoreBootImage::Section *imageSection, OutputSection *modelSection);
void processOperationSection(OperationSequenceSection *section, EncoreBootImage *image);
void processDataSection(BinaryDataSection *section, EncoreBootImage *image);
void processLoadOperation(LoadOperation *op, EncoreBootImage::BootSection *section);
void processExecuteOperation(ExecuteOperation *op, EncoreBootImage::BootSection *section);
void processBootModeOperation(BootModeOperation *op, EncoreBootImage::BootSection *section);
void processFlashEraseOperation(FlashEraseOperation *op, EncoreBootImage::BootSection *section);
void processResetOperation(ResetOperation *op, EncoreBootImage::BootSection *section);
void processMemEnableOperation(MemEnableOperation *op, EncoreBootImage::BootSection *section);
void processProgramOperation(ProgramOperation *op, EncoreBootImage::BootSection *section);
void processKeywrapOperation(KeywrapOperation *op, EncoreBootImage::BootSection *section);
void processEncryptOperation(EncryptOperation *op, EncoreBootImage::BootSection *section);
void setFillPatternFromValue(EncoreBootImage::FillCommand &command, SizedIntegerValue &pattern);
};
}; // namespace elftosb
#endif // _EncoreBootImageGenerator_h_
elftosb::EncryptOperation
Operation to encrypt data for OTFAD.
Definition: Operation.h:293
elftosb::EncoreBootImageGenerator::m_supportHAB
bool m_supportHAB
True if HAB features are enabled.
Definition: EncoreBootImageGenerator.h:41
elftosb::ProgramOperation
Operation to program persistent bits.
Definition: Operation.h:241
elftosb::EncoreBootImage::Section
Base class for a section of an Encore boot image.
Definition: EncoreBootImage.h:989
elftosb::EncoreBootImage::BootSection
A bootable section of an Encore boot image.
Definition: EncoreBootImage.h:1072
elftosb::OperationSequenceSection
A section of the output that contains boot operations.
Definition: OutputSection.h:51
elftosb::ResetOperation
Operation to reset the device.
Definition: Operation.h:133
elftosb::ExecuteOperation
Operation to execute code at a certain address.
Definition: Operation.h:58
elftosb::MemEnableOperation
Operation to enable external memory access.
Definition: Operation.h:212
elftosb::EncoreBootImage
Class to manage Encore boot image files.
Definition: EncoreBootImage.h:101
elftosb::FlashEraseOperation
Operation to erase flash memory.
Definition: Operation.h:145
elftosb::KeywrapOperation
Operation to wrap and program keys.
Definition: Operation.h:267
elftosb::SizedIntegerValue
Adds a word size attribute to IntegerValue.
Definition: apps/elftosb/common/Value.h:72
elftosb::BinaryDataSection
A section of the output file that contains arbitrary binary data.
Definition: OutputSection.h:71
elftosb::EncoreBootImageGenerator
Generator for Encore boot images.
Definition: EncoreBootImageGenerator.h:25
elftosb
Definition: BootImage.h:13
elftosb::EncoreBootImageGenerator::generate
virtual BootImage * generate()
Builds the resulting boot image from previously added output sections.
Definition: EncoreBootImageGenerator.cpp:22
elftosb::Keyblob
Keyblob specification.
Definition: Keyblob.h:27
elftosb::EncoreBootImageGenerator::EncoreBootImageGenerator
EncoreBootImageGenerator()
Default constructor.
Definition: EncoreBootImageGenerator.h:29
elftosb::BootModeOperation
Operation to switch boot modes.
Definition: Operation.h:115
elftosb::BootImage
Abstract base class for all boot image format classes.
Definition: BootImage.h:25
elftosb::EncoreBootImage::FillCommand
Pattern fill bootloader command.
Definition: EncoreBootImage.h:617
elftosb::EncoreBootImageGenerator::setSupportHAB
void setSupportHAB(bool supportHAB)
Enable or disable HAB support.
Definition: EncoreBootImageGenerator.h:39
elftosb::BootImageGenerator
Abstract base class for generators of specific boot image formats.
Definition: BootImageGenerator.h:33
elftosb::EncoreBootImageGenerator::m_encryptKeyBlob
Keyblob * m_encryptKeyBlob
Keyblob to use during load if encrypting for OTFAD.
Definition: EncoreBootImageGenerator.h:42
elftosb::LoadOperation
Load data into memory operation.
Definition: Operation.h:32
elftosb::OutputSection
Base class for data model of sections of the output file.
Definition: OutputSection.h:20