summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-07-23 11:14:08 +0200
committerStefan Roese <sr@denx.de>2021-07-31 09:49:31 +0200
commit6458fd4fb1f6dd24c053238386a1aa6bf50563c1 (patch)
treebe88dcc00a9d38a33d930a0cdf86e2ca97657a4a /api
parent6c7f152eefd760ceb71aabc36c0025814d645a83 (diff)
tools: kwbimage: Fix calculating size of binary header
Binary header consist of: * 1 byte for header type * 3 bytes for header size * 1 byte for number of arguments * 3 reserved bytes * N*4 bytes for arguments * M bytes (aligned to 4 bytes) for executable data * 1 byte for information about next header * 3 reserved bytes The first four bytes are specified as sizeof(struct opt_hdr_v1) and the remaining bytes as ALIGN(s.st_size, 4) + (binarye->binary.nargs + 2) * sizeof(uint32_t) Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions