resize-dynparts: Make binary fully static 15/318915/3
authorAntoni <a.adaszkiewi@samsung.com>
Wed, 29 Jan 2025 16:49:56 +0000 (17:49 +0100)
committerMateusz Moscicki <m.moscicki2@samsung.com>
Wed, 19 Feb 2025 13:43:09 +0000 (14:43 +0100)
commit35f77db9699ddffeb81813bd4e49430a747a8913
treec3ea0772630addcb391e5a0a9c3afab104b906e3
parent2ff978d0c02a7b30c3e431debff2f41eaaf35b05
resize-dynparts: Make binary fully static

This change ensures that `resize-dynparts` binary provided in a delta
will run on a system with an older GLib version.

OpenSSL dependency of liblp is removed. Linking statically to libcrypto
proved to be to difficult. The only functionality that was used was
calculating sha256 hashes. This is now implemented in source of
liblp.

sha256 functionality taken from:
https://android.googlesource.com/platform/system/core/+/515e1639ef0ab5e3149fafeffce826cf654d616f
files:
src/dynamic-partitions/liblp/sha256/hash-internal.h
src/dynamic-partitions/liblp/sha256/sha256.c
src/dynamic-partitions/liblp/sha256/sha256.h

Change-Id: Ifde513404d1d63ec3a99fe4e29c3ef4a852f0dbe
src/dynamic-partitions/liblp/CMakeLists.txt
src/dynamic-partitions/liblp/sha256/hash-internal.h [new file with mode: 0644]
src/dynamic-partitions/liblp/sha256/sha256.c [new file with mode: 0644]
src/dynamic-partitions/liblp/sha256/sha256.h [new file with mode: 0644]
src/dynamic-partitions/liblp/utility.cpp
src/dynamic-partitions/resize-dynparts/CMakeLists.txt