arm-trusted-firmware/tools
Nicolas Le Bayon 8d0036d3d8 fix(tools/stm32image): improve the tool
Add parameters to fill header version:
Two new options are added (m and n) to fill header version major and minor.
The default is v1.0 (major = 1, minor = 0)

Fix image header on big endian hosts:
Three header fields are not properly converted to little endian
before assignment, resulting in incorrect header while executing
stm32image on big endian hosts.

Convert the value of the header fields version_number,
image_checksum and edcsa_algorithm to little endian before the
assignment.

Don't force the base of strtol, since it's able to select the base
automatically depending on the prefix of the value.
This does not breaks the current build script that extracts the
addresses, including the 0x prefix, from the map file.
This change helps using stm32image in shell scripts where the
addresses can be computed using the shell arithmetic expansion
"$((...))", that produces a value in base decimal.

The variable stm32image_header is declared with global visibility
but is use in one function only, move it as local variable in the function.

Fix error message on destination file:
The error message on mmap() failure of destination file reports
incorrectly information about the source file.
Change the error message to match the file that causes the error.

Change-Id: Iebc8c915297306845b3847b32f9516443a515c97
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
2021-06-22 14:10:27 +02:00
..
amlogic meson: Rename platform directory to amlogic 2019-09-05 10:39:25 +01:00
cert_create cert_create: updated tool for platform defined certs, keys & extensions 2021-03-24 09:49:31 +05:30
encrypt_fw tools: don't clean when building 2021-01-13 16:35:03 +00:00
fiptool fiptool: Do not call 'make clean' in 'all' target 2021-04-07 19:36:20 +02:00
marvell/doimage tools: doimage: change the binary image alignment to 16 2020-07-10 10:54:44 +00:00
memory tools: Small improvement to print_memory_map script 2020-02-14 16:31:19 +00:00
nxp nxp-tool: for creating pbl file from bl2 2021-03-24 09:49:32 +05:30
renesas tools: renesas: Add tool support for RZ/G2 platforms 2021-01-13 19:15:57 +00:00
sptool tools: Set the tool's default binary name 2020-09-07 12:58:24 +01:00
stm32image fix(tools/stm32image): improve the tool 2021-06-22 14:10:27 +02:00