History log of /optee_os/core/lib/zlib/sub.mk (Results 1 – 3 of 3)
Revision Date Author Comments
# 47d5e6cb 14-Jun-2024 Jerome Forissier <jerome.forissier@linaro.org>

libutils, zlib: fix Clang warnings

Clang 18.1.6 reports the following warnings:

CC out/arm/ldelf-lib/libutils/isoc/bget_malloc.o
In file included from lib/libutils/isoc/bget_malloc.c:127:

libutils, zlib: fix Clang warnings

Clang 18.1.6 reports the following warnings:

CC out/arm/ldelf-lib/libutils/isoc/bget_malloc.o
In file included from lib/libutils/isoc/bget_malloc.c:127:
lib/libutils/isoc/bget.c:607:7: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
607 | void *bget(requested_align, hdr_size, requested_size, poolset)
| ^

And same with lib/zlib/{adler32.c,inffast.c,inflate.c,zutil.c}.

In addition, zutil.c causes:

CC out/arm/core/lib/zlib/zutil.o
core/lib/zlib/zutil.c:28:33: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
28 | const char * ZEXPORT zlibVersion()
| ^
| void

Add -Wno-deprecated-non-prototype to libutils' bget_malloc.c to silence
the first series, and simply remove -Wstrict-prototypes (added by
default by mk/compile.mk) when building zlib.

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

show more ...


# 509a9802 01-Aug-2017 Jerome Forissier <jerome.forissier@linaro.org>

Add support for compressed early TAs

Add decompression code to the early TA loader and update the Python
script accordingly. The compression algorithm is "deflate", which is
used by zlib and gzip in

Add support for compressed early TAs

Add decompression code to the early TA loader and update the Python
script accordingly. The compression algorithm is "deflate", which is
used by zlib and gzip in particular. It allows for compression ratios
comprised between 3 (for bigger TAs) and 4.7 (for smaller ones). Those
numbers were observed with 32-bit TAs (QEMU).

On QEMU (armv7), the code size overhead when CFG_EARLY_TA=y, including
the decompressor, is 12K when DEBUG=0 or 20K when DEBUG=1. The
decompressor allocates about 39K of heap.

Another library compatible with zlib was tried for comparison [1].
The code size overhead with miniz was 8K (DEBUG=0) or 16K (DEBUG=1).
On the other hand, the dynamic allocation was about 43K, so the total
memory required was about same. Speed was not compared. In the end,
zlib was preferred for licensing reasons and because it is widely used.

Link: [1] https://github.com/richgel999/miniz
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMUv8, pager)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 32/64 bits)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 32/64 bits, pager)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# b3be2f66 02-Aug-2017 Jerome Forissier <jerome.forissier@linaro.org>

Import zlib v1.2.11

Import the decompression code from zlib v1.2.11. From the project's
README:

"zlib 1.2.11 is a general purpose data compression library. [...] The
data format used by the zlib li

Import zlib v1.2.11

Import the decompression code from zlib v1.2.11. From the project's
README:

"zlib 1.2.11 is a general purpose data compression library. [...] The
data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files rfc1950 (zlib format), rfc1951
(deflate format) and rfc1952 (gzip format)."

This code will be used in a later commit to decompress early TAs.
Only the inflate() function is needed, and the library is configured
without gzip support. The source files that are not required
for inflate() are left aside.

The library is licensed under a permissive license, see `zlib.h`.

Link: http://tools.ietf.org/html/rfc1950
Link: http://tools.ietf.org/html/rfc1951
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...