universal7885: Organize configs, add shim for hwcomposer

Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
roynatech2544 2021-11-20 21:56:34 +09:00
commit ece023aaed
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
17 changed files with 52 additions and 24 deletions

View file

@ -0,0 +1,27 @@
// board_platform must match TARGET_BOARD_PLATFORM
board_platform = "universal7884B"
cmd_and = " && "
hwc = "hwcomposer." + board_platform
hwcomposer = "$(productOut)/vendor/lib64/hw/" + hwc + ".so"
original_symbol = "_Z27exynos_acceptDisplayChangesP11hwc2_devicem"
custom_symbol = "_Z27exynos_acceptDisplayChangesP12hwc2_devicem"
cc_library_shared {
name: "libhwcomposer_shim",
srcs: [
"hwcomposer_shim.cpp"
],
required: ["libhwccomposer-patch"],
vendor: true,
}
7884B_build_command {
name: "libhwccomposer-patch",
cmd: "mkdir -p $(productOut)/vendor/lib64/hw" + cmd_and +
"sed -i s/" + original_symbol + "/" + custom_symbol + "/g " + hwcomposer + cmd_and +
"patchelf --add-needed libhwcomposer_shim.so" + hwcomposer,
required: [hwcomposer],
}

View file

@ -0,0 +1,2 @@
#include <hwcomposer2.h>
extern "C" void _Z27exynos_acceptDisplayChangesP12hwc2_devicem(hwc2_device*, unsigned long) {}