2 * File: EncoreBootImageGenerator.h
4 * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
5 * See included license file for license details.
7 #if !defined(_EncoreBootImageGenerator_h_)
8 #define _EncoreBootImageGenerator_h_
10 #include "BootImageGenerator.h"
11 #include "EncoreBootImage.h"
17 * \brief Generator for Encore boot images.
19 * Takes the abstract model of the output file and processes it into a
20 * concrete boot image for the STMP37xx.
22 * In order to enable full i.mx28 support, you must call the setSupportHAB() method and
25 class EncoreBootImageGenerator : public BootImageGenerator
28 //! \brief Default constructor.
29 EncoreBootImageGenerator() : BootImageGenerator() {}
31 //! \brief Builds the resulting boot image from previously added output sections.
32 virtual BootImage * generate();
34 //! \brief Enable or disable HAB support.
35 void setSupportHAB(bool supportHAB) { m_supportHAB = supportHAB; }
39 bool m_supportHAB; //!< True if HAB features are enabled.
41 void processOptions(EncoreBootImage * image);
42 void processSectionOptions(EncoreBootImage::Section * imageSection, OutputSection * modelSection);
44 void processOperationSection(OperationSequenceSection * section, EncoreBootImage * image);
45 void processDataSection(BinaryDataSection * section, EncoreBootImage * image);
47 void processLoadOperation(LoadOperation * op, EncoreBootImage::BootSection * section);
48 void processExecuteOperation(ExecuteOperation * op, EncoreBootImage::BootSection * section);
49 void processBootModeOperation(BootModeOperation * op, EncoreBootImage::BootSection * section);
51 void setFillPatternFromValue(EncoreBootImage::FillCommand & command, SizedIntegerValue & pattern);
54 }; // namespace elftosb
56 #endif // _EncoreBootImageGenerator_h_