History log of /optee_os/scripts/bin_to_c.py (Results 1 – 4 of 4)
Revision Date Author Comments
# 3efc0997 09-Jul-2020 Dhananjay Phadke <dphadke@linux.microsoft.com>

scripts: use python's hex() in ta_bin_to_c.py

- Python has a built in function to turn a byte into its respective hex
value that can be used instead of string formatting the values
directly.
- U

scripts: use python's hex() in ta_bin_to_c.py

- Python has a built in function to turn a byte into its respective hex
value that can be used instead of string formatting the values
directly.
- Using the built in function instead of the previous string formatting
method fixed an issue where bytes were failing to be written when
we used an archaic yocto bsp from broadcom.
- The built in function also has the benefit of being easier to read and
understand.

Signed-off-by: Dhananjay Phadke <dphadke@linux.microsoft.com>
Signed-off-by: Andrew Mustea <andrew.mustea@microsoft.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# dfb96021 18-Sep-2019 Jerome Forissier <jerome@forissier.org>

scripts/bin_to_c.py: add support for text files

bin_to_c.py may be useful to generate a C file from a text file, not
only from a binary file. This patch adds the --text argument for that
purpose. Wi

scripts/bin_to_c.py: add support for text files

bin_to_c.py may be useful to generate a C file from a text file, not
only from a binary file. This patch adds the --text argument for that
purpose. With --text, the script will:
- define a "const char []" variable,
- error out if a null byte is encountered,
- terminate the input string with a null byte.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 9171d16c 30-Jan-2019 Jerome Forissier <jerome.forissier@linaro.org>

scripts: re-indent Python scripts

Fixes the following warnings:

$ pycodestyle --version
2.5.0

$ pycodestyle scripts/*.py
scripts/bin_to_c.py:15:9: E117 over-indented
scripts/bin_to_c.py:34:9:

scripts: re-indent Python scripts

Fixes the following warnings:

$ pycodestyle --version
2.5.0

$ pycodestyle scripts/*.py
scripts/bin_to_c.py:15:9: E117 over-indented
scripts/bin_to_c.py:34:9: E117 over-indented
scripts/bin_to_c.py:37:17: E117 over-indented
scripts/bin_to_c.py:49:17: E117 over-indented
scripts/bin_to_c.py:50:25: E117 over-indented
scripts/bin_to_c.py:54:25: E117 over-indented
scripts/bin_to_c.py:56:25: E117 over-indented
scripts/bin_to_c.py:62:9: E117 over-indented

$ cd core/arch/arm/plat-stm32mp1/scripts; \
pycodestyle stm32image.py
stm32image.py:21:9: E117 over-indented
stm32image.py:27:9: E117 over-indented
stm32image.py:29:17: E117 over-indented
stm32image.py:39:9: E117 over-indented
stm32image.py:77:9: E117 over-indented
stm32image.py:84:17: E117 over-indented
stm32image.py:96:9: E117 over-indented
stm32image.py:100:9: E117 over-indented
stm32image.py:125:9: E117 over-indented
stm32image.py:140:9: E117 over-indented

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# f0d19bd5 23-Nov-2018 Etienne Carriere <etienne.carriere@linaro.org>

scripts: bin_to_c.py

bin_to_c.py generates an ANSI-C source file from a binary image file.
The C source defines an unsigned byte array that stores the binary
data with a 64bit alignment constraint.

scripts: bin_to_c.py

bin_to_c.py generates an ANSI-C source file from a binary image file.
The C source defines an unsigned byte array that stores the binary
data with a 64bit alignment constraint.

The label of the array is provided as input argument to the script.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome.Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...