ROMBUILD Obey File Structure

A ROMBUILD obey file consists of a number of sections, each defining a ROM image:

  • a KernelRomSection that defines a bootable ROM image, and includes the Kernel

  • one or more ExtensionRomSections that define ROM images that extend the KernelRomSection.

Every section contains a list of obey statements that specify ROM configuration information or specifies the files to be included in the ROM image.

Extension ROM sections are marked by the extensionrom keyword, and can only contain those ROM information statements that are not related to the Kernel configuration.

The structure is defined as:

ObeyFile : KernelRomSection  [ ExtensionRomList ]
KernelRomSection : ObeyStatementList
ExtensionRomList : ExtensionRomSection | ExtensionRomSection ExtensionRomList
ExtensionRomSection : extensionrom = <RomFileName> ObeyStatementList
ObeyStatementList : ObeyStatement | ObeyStatement ObeyStatementList
ObeyStatement : RomStatement | FileStatement

RomStatement

A RomStatement is one of the following.

romname =

<rom-file-name>

bootbinary =

<boot-file-name>

demandpagingconfig =

<MinLivePages> <MaxLivePages> <YoungOldPageRatio> <NANDPageReadDelay> <NANDPageReadCPUOverhead>

kerneldataaddress =

<hex-address>

kernelheapmin =

<hex-size>

kernelheapmax =

<hex-size>

singlekernel =

multikernel =

kerneltrace =

<32 bit hex-number | decimal number> [<32 bit hex-number | decimal number>]{0,7}

The maximum number of bit mask is 8.

kernelromname =

<rom-file-name>

romnameodd =

<rom-file-name-odd>

romnameeven =

<rom-file-name-even>

srecordfilename =

<srec-file-name>

srecordbase =

<hex-address>

version =

[ <major> ] [ .<minor> ] [ (<build>) ]

romsize =

<hex-size>

romlinearbase =

<hex-address>

romalign =

<hex-alignment>

dataaddress =

<hex-address>

romchecksum =

<base-checksum>

time =

dd/mm/yyyy hh:mm:ss

trace =

<32bit-hex-number>

debugport =

<32bit-number>

collapse =

<cpu> <compiler> <mode>

ascii =

unicode =

epocwrapper =

externaltool=

<toolname>

coffwrapper =

filecompressnone =

filecompressinflate =

filecompressbytepair =

filecompressnone =

filecompressinflate =

filecompressbytepair =

defaultstackreserve =

default stack reserve

demandpagingconfig =

<MinLivePages> <MaxLivePages> <YoungOldPageRatio> <NANDPageReadDelay> <NANDPageReadCPUOverhead>

dlldatatop =

address of data region

memmodel =

moving | direct | multiple <chunk size> <page size>

nowrapper =

pagingoverride =

[NOPAGING | ALWAYSPAGE | DEFAULTUNPAGED | DEFAULTPAGED]

pagingpolicy =

[NOPAGING | ALWAYSPAGE | DEFAULTUNPAGED | DEFAULTPAGED]

platsecdiagnostics =

[on | off]

platsecdisabledcaps =

[on | off]

platsecenforcement =

[on | off]

platsecenforcesysbin =

[on | off]

platsecprocessisolation =

[on | off]

pagingoverride =

[NOPAGING | ALWAYSPAGE | DEFAULTUNPAGED | DEFAULTPAGED]

pagingpolicy =

[NOPAGING | ALWAYSPAGE | DEFAULTUNPAGED | DEFAULTPAGED]

patchdata =

<binary_name> ordinal <ordinal_no.> <size_bytes> <new_value>

OR

<binary_name> addr <symbol_address> <size_bytes> <new_value>

Where, <binary_name> is the name of the binary along with its complete path, <ordinal_no.> is the ordinal number of the symbol to be patched, <symbol_address> is the address of the data symbol to be patched, <size_bytes> is the size of the symbol in bytes, and <new_value> is the new value for the symbol.

Note: If you want to use the second version of patchdata, you must know the address of the data symbol to be patched.

BTrace =

N1 [N2 [N3 [N4 [N5 [N6 [N7 [N8]]]]]]]

BTraceBuffer =

N

BTraceMode =

N

FileStatement

FileStatement : ControlStatement | FileSpecificationStatement | RomDirectoryStatement

A ControlStatement is one of the following:

rem =

<comments>

section =

<section-offset>

extensionrom =

<rom-filename

align =

alignment

area =

<name> <run-address> <maxlength>

stop =

A FileSpecificationStatement is one of the following:

data[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList]

file[[HWVD]] =

<Source-file> <destination-file> [FileAttributeList] [OverrideAttributeList] [paged | unpaged]

primary[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

secondary =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

variant[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

device[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

extension[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

dll[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

filecompress[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

fileuncompress[[HWVD]] =

<source-file> <destination-image-file> [FileAttributeList][OverrideAttributeList]

A RomDirectoryStatement is one of the following:

hide[[HWVD]] =

<existing-file>

alias[[HWVD]] =

<existing-file> <destination-file> [FileAttributeList]

rename[[HWVD]] =

<existing-file> <destination-file> [ FileAttributeList] [OverrideAttributeList]

FileAttributeList

FileAttributeList : FileAttribute | FileAttribute  FileAttributeList

A FileAttribute is one of the following:

attrib =

[ s | S ][ h | H ][ r | R | w | W ] | hide

OverrideAttributeList

OverrideAttributeList : OverrideAttribute | OverrideAttribute  OverrideAttributeList

An overrideAttribute is one of the following:

stack =

<hex-size>

reloc =

<hex-address>

heapmin =

<hex-size>

heapmax =

<hex-size>

code-align =

<hex-number>

fixed

priority =

<hex-number> | <keyword>

patched

uid1 =

<uid value>

uid2 =

<uid value>

uid3 =

<uid value>

stackreserve =

<hex-size>

area =

<name>