Closed vladimiroltean closed 6 years ago
Needs https://review.lineageos.org/#/c/LineageOS/android_build/+/219445/ or https://review.lineageos.org/#/c/LineageOS/android_build/+/206396/ for proper compilation.
Thats cool. TWRP looks good on landscape mode. If it's not too much work, what do you think about create a working config which can be used without the patch. If the patch isn't applied, the touchscreen works in landscape mode and the display is set to portrait mode. Is it better to have a working config without further patches and change the config in another commit when the patch was accepted by upstream?
This is a bit chicken-and-egg.
I would have liked some review on my TW_HWROTATION patch before sending it to gerrit.twrp.me.
But no rush to merge this. We can keep this pull request open until at least the TW_HWROTATION patch is on the TWRP gerrit, and then I can remove it from here and resend the PR.
Anyway, it's not very hard to align the touchscreen with the display orientation, as I mentioned in twrp.mk
:
# If you change TW_HWROTATION, you'll have to either use:
# RECOVERY_TOUCHSCREEN_SWAP_XY := true
# RECOVERY_TOUCHSCREEN_FLIP_X := true
# Or make the same change in the DTS (preferable):
# synaptics,swap-axes;
# synaptics,y-flip;
TW_HWROTATION := 90
Patch related: From a quick overview, IMO the patch is alright. It handles the old behavior and introduces new options. I assume the notes in https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31454/1/minuitwrp/graphics_overlay.cpp
// If this worked, life would have been so much easier
//switch (TW_HWROTATION) {
//case 0: overlayL.flags = MDP_ROT_NOP; break;
//case 90: overlayL.flags = MDP_ROT_90; break;
//case 180: overlayL.flags = MDP_ROT_180; break;
//case 270: overlayL.flags = MDP_ROT_270; break;
//}
are for documentation ?
With the flasg
WITH_TWRP=true
I get the following errors when performing a full build via mka:
FAILED: /srv/src/out/target/product/YTX703L/obj/SHARED_LIBRARIES/libminui_intermediates/LINKED/libminui.so
/bin/bash -c "/usr/sbin/ccache /srv/src/prebuilts/snapdragon-llvm/toolchains/llvm-Snapdragon_LLVM_for_Android_4.0/prebuilt/linux-x86_64/bin/clang++ -nostdlib -Wl,-soname,libminui.so -Wl,--gc-sections -shared /srv/src/out/target/product/YTX703L/obj/lib/crtbegin_so.o -Wl,--whole-archive /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a -Wl,--no-whole-archive /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--no-undefined /srv/src/out/target/product/YTX703L/obj/lib/libpng.so /srv/src/out/target/product/YTX703L/obj/lib/libbase.so /srv/src/out/target/product/YTX703L/obj/lib/libc++.so /srv/src/out/target/product/YTX703L/obj/lib/libc.so /srv/src/out/target/product/YTX703L/obj/lib/libm.so /srv/src/out/target/product/YTX703L/obj/lib/libdl.so -o /srv/src/out/target/product/YTX703L/obj/SHARED_LIBRARIES/libminui_intermediates/LINKED/libminui.so /srv/src/out/target/product/YTX703L/obj/lib/crtend_so.o"
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::free_ion_mem()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::free_overlay(int)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::getLeftSplit()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::alloc_ion_mem(unsigned int)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::getRightSplit()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::isDisplaySplit()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::setDisplaySplit()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::allocate_overlay(int, GRSurface*)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::target_has_overlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::map_mdp_pixel_format()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::overlay_display_frame(int, void*, unsigned long)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::SetDisplayedFramebuffer(unsigned int)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::Flip()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::Init()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::Blank(bool)'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::MinuiBackendOverlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::MinuiBackendOverlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::~MinuiBackendOverlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::~MinuiBackendOverlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'MinuiBackendOverlay::~MinuiBackendOverlay()'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): multiple definition of 'vtable for MinuiBackendOverlay'
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: /srv/src/out/target/product/YTX703L/obj/STATIC_LIBRARIES/libminui_intermediates/libminui.a(graphics_overlay.o): previous definition here
It's strange that you get this error. libminui shouldn't be built by TWRP. That uses libminuitwrp. What do you mean by "full build" anyway? What make target? I don't think that anything rather than recoveryimage is supposed to work with WITH_TWRP=true. For one thing, you'd get permissive SELinux for everything, which isn't desirable.
Turns out this is also needed for mke2fs (ext4 formatting) to work: https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31630/
Also need the following to have the unzip program in TWRP when compiling in a lineage-15.1 tree: https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31662/