[WIP] Building a custom ROM for the LeapFrog Epic (CM/LOS)

Search This thread

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
So, uh, I decided to spin this off to a new thread to keep the other ones from being bloated.

A few days ago I started work on getting at least CyanogenMod to work on the LeapFrog Epic, which runs off the same MT8127 SoC as certain variants of the Amazon Fire tablet amongst other things. CM11 was first on my agenda since it is close to the KitKat build that came from the factory, but compiler issues kept me from pushing on with this one. I then moved on to CM12.1, which was far less of a pain build-wise, but I then faced a number of issues that kept me from getting this to run. Fixed the MTK headers, and added a shim to get rid of that missing function error with the Mali drivers, but now I am stuck with this if I use the stock 1.1.95 libs that came with the Epic Academy Edition. Boot animation does not start at all:

Code:
I/SurfaceFlinger( 2317): SurfaceFlinger is starting
I/SurfaceFlinger( 2317): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  ( 2317): loaded /system/lib/egl/libEGL_mali.so
D/libEGL  ( 2317): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL  ( 2317): loaded /system/lib/egl/libGLESv2_mali.so
W/libEGL  ( 2317): eglInitialize(0x1) failed (EGL_BAD_ALLOC)
I/[MALI][Gralloc]( 2317): gralloc UREE_CreateSession recount = 0
I/[MALI][Gralloc]( 2317): gralloc call UREE_CreateSession
I/[MALI][Gralloc]( 2317): UREE_CreateSession fail, ret = -65536
I/gralloc ( 2317): [Gralloc] refreshRate = 0, info.pixclock = ffffffff
I/gralloc ( 2317): [Gralloc] info.upper_margin = ffffffff, info.lower_margin = ffffffff
I/gralloc ( 2317): [Gralloc] info.yres = 258, info.hsync_len = ffffffff
I/gralloc ( 2317): [Gralloc] info.left_margin = ffffffff, info.right_margin = ffffffff
I/[MALI][Gralloc]( 2317): ro_dpi: 160.000000
I/[MALI][Gralloc]( 2317): using (fd=13)
I/[MALI][Gralloc]( 2317): id           = mtkfb
I/[MALI][Gralloc]( 2317): xres         = 1024 px
I/[MALI][Gralloc]( 2317): yres         = 600 px
I/[MALI][Gralloc]( 2317): xres_virtual = 1024 px
I/[MALI][Gralloc]( 2317): yres_virtual = 1800 px
I/[MALI][Gralloc]( 2317): bpp          = 32
I/[MALI][Gralloc]( 2317): r            = 16:8
I/[MALI][Gralloc]( 2317): g            =  8:8
I/[MALI][Gralloc]( 2317): b            =  0:8
I/[MALI][Gralloc]( 2317): width        = 163 mm (159.568100 dpi)
I/[MALI][Gralloc]( 2317): height       = 95 mm (160.421051 dpi)
I/[MALI][Gralloc]( 2317): refresh rate = 60.00 Hz
I/[MALI][Gralloc]( 2317): init_framebuffer va: 0xb50f8000 mva: 0xb3700000
E/hwcomposer( 2317): [BLIT] sw_sync_timeline_create failed, aborting
F/libc    ( 2317): Fatal signal 6 (SIGABRT), code -6 in tid 2317 (surfaceflinger)
I/DEBUG   (  129): property debug.db.uid not set; NOT waiting for gdb.
I/DEBUG   (  129): HINT: adb shell setprop debug.db.uid 100000
I/DEBUG   (  129): HINT: adb forward tcp:5039 tcp:5039
I/DEBUG   (  129): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  129): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/e2909bc29b:eng/test-keys'
I/DEBUG   (  129): Revision: '0'
I/DEBUG   (  129): ABI: 'arm'
I/DEBUG   (  129): pid: 2317, tid: 2317, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  129): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG   (  129):     r0 00000000  r1 0000090d  r2 00000006  r3 00000000
I/DEBUG   (  129):     r4 b6f34e38  r5 00000006  r6 0000000d  r7 0000010c
I/DEBUG   (  129):     r8 ffffffb4  r9 b5e01d8c  sl b608f158  fp bec93a6c
I/DEBUG   (  129):     ip 0000090d  sp bec937e0  lr b6e8d8f5  pc b6eb08d0  cpsr 60010010
I/DEBUG   (  129): 
I/DEBUG   (  129): backtrace:
I/DEBUG   (  129):     #00 pc 000378d0  /system/lib/libc.so (tgkill+12)
I/DEBUG   (  129):     #01 pc 000148f1  /system/lib/libc.so (pthread_kill+52)
I/DEBUG   (  129):     #02 pc 0001564b  /system/lib/libc.so (raise+10)
I/DEBUG   (  129):     #03 pc 00011cc5  /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG   (  129):     #04 pc 0001005c  /system/lib/libc.so (abort+4)
I/DEBUG   (  129):     #05 pc 00010af9  /system/lib/hw/hwcomposer.mt8127.so (_ZN11BlitManagerC1Ev+140)
I/DEBUG   (  129):     #06 pc 0000b8d9  /system/lib/hw/hwcomposer.mt8127.so (_ZN11HWCMediatorC2Ev+12)
I/DEBUG   (  129):     #07 pc 0000ba5d  /system/lib/hw/hwcomposer.mt8127.so (_ZN7android9SingletonI11HWCMediatorE11getInstanceEv+28)
I/DEBUG   (  129):     #08 pc 0000bbfd  /system/lib/hw/hwcomposer.mt8127.so
I/DEBUG   (  129):     #09 pc 00023d17  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #10 pc 00023a0b  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #11 pc 000195bb  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger4initEv+130)
I/DEBUG   (  129):     #12 pc 00000af1  /system/bin/surfaceflinger
I/DEBUG   (  129):     #13 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  129):     #14 pc 00000c08  /system/bin/surfaceflinger
I/DEBUG   (  129): 
I/DEBUG   (  129): Tombstone written to: /data/tombstones/tombstone_08

If I use hwcomposer.mt8127.so, libgralloc_extra.so, libion_mtk.so and libtz_uree.so from @pix106's Lenovo Tab 2 A7-10F vendor tree, I get this additional message:
Code:
E/hwcomposer(  290): [BLIT] UREE_CreateSession failed (Non-specific cause.), aborting

I know there's probably only a few developers here who own a LeapFrog Epic, but I am at a loss here and any help would be very much appreciated. Yes I've read the Lenovo thread here before, but this one is a bit of a clincher, more so as I don't have complete kernel sources and I'm only building against a 3.4.67 kernel. My device tree's here, if anyone is interested: https://github.com/huckleberrypie/android_device_quanta_narnia
 

Attachments

  • logcat.zip
    149.1 KB · Views: 33
Last edited:

pix106

Senior Member
Oct 16, 2010
1,113
594
Xiaomi Mi Pad 4
Xiaomi Mi Pad 4 Plus
If I use hwcomposer.mt8127.so, libgralloc_extra.so, libion_mtk.so and libtz_uree.so from @pix106's Lenovo Tab 2 A7-10F vendor tree]
Tab2 has 3.10.54 kernel, I don't know if you can use these libs with a 3.4 kernel.

When missing a symbol, you can grep it in your device stock rom to find what lib provides it.
From a running device using adv, or using a stock room dumping your computer.

grep -r _Zazertyuiopqsdfghjklmwxcvbn /path/to/libs
 
Last edited:
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Tab2 has 3.10.54 kernel, I don't know if you can use these libs with a 3.4 kernel.

When missing a symbol, you can grep it in your device stock rom to find what lib provides it.
From a running device using adv, or using a stock room dumping your computer.

grep -r _Zazertyuiopqsdfghjklmwxcvbn /path/to/libs
Good call on the grep stuff. And I wonder if I could kang libs off another MT8127 device running KitKat which is a little tiny bit of a stretch to hunt for.
 

pix106

Senior Member
Oct 16, 2010
1,113
594
Xiaomi Mi Pad 4
Xiaomi Mi Pad 4 Plus
And I wonder if I could kang libs off another MT8127 device running KitKat which is a little tiny bit of a stretch to hunt for.
My "mistake", in a way :) : Tab2 also had KitKat with a 3.4 kernel, but I used kernel 3.10 and vendor from Lollipop stock rom to build cm-12.1.

You can try to download and extract lenovo's kk rom, or I can search my archives later and try to upload a KitKat stock rom dump somewhere, but I'm not home and have slow internet for now.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
My "mistake", in a way :) : Tab2 also had KitKat with a 3.4 kernel, but I used kernel 3.10 and vendor from Lollipop stock rom to build cm-12.1.

You can try to download and extract lenovo's kk rom, or I can search my archives later and try to upload a KitKat stock rom dump somewhere, but I'm not home and have slow internet for now.

3.4.67 I presume? I do have kernel sources for the Epic but it's missing a few things from what I've been told. The ROM dump does however have what appears to be a build config used by Quanta/LeapFrog to customise the board support package they used, or so I assume.
 

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
So I kanged hwcomposer from @pix106's dump of the A7-10F KitKat ROM, and it looks like I got something else other than the usual sw_sync_timeline failure:

Code:
I/SurfaceFlinger(  512): SurfaceFlinger is starting
I/SurfaceFlinger(  512): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  (  512): loaded /system/lib/egl/libEGL_mali.so
D/libEGL  (  512): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL  (  512): loaded /system/lib/egl/libGLESv2_mali.so
W/libEGL  (  512): eglInitialize(0x1) failed (EGL_BAD_ALLOC)
I/[MALI][Gralloc](  512): gralloc UREE_CreateSession recount = 0
I/[MALI][Gralloc](  512): gralloc call UREE_CreateSession
I/[MALI][Gralloc](  512): UREE_CreateSession fail, ret = -65536
I/gralloc (  512): [Gralloc] refreshRate = 0, info.pixclock = ffffffff
I/gralloc (  512): [Gralloc] info.upper_margin = ffffffff, info.lower_margin = ffffffff
I/gralloc (  512): [Gralloc] info.yres = 258, info.hsync_len = ffffffff
I/gralloc (  512): [Gralloc] info.left_margin = ffffffff, info.right_margin = ffffffff
I/[MALI][Gralloc](  512): ro_dpi: 160.000000
I/[MALI][Gralloc](  512): using (fd=13)
I/[MALI][Gralloc](  512): id           = mtkfb
I/[MALI][Gralloc](  512): xres         = 1024 px
I/[MALI][Gralloc](  512): yres         = 600 px
I/[MALI][Gralloc](  512): xres_virtual = 1024 px
I/[MALI][Gralloc](  512): yres_virtual = 1800 px
I/[MALI][Gralloc](  512): bpp          = 32
I/[MALI][Gralloc](  512): r            = 16:8
I/[MALI][Gralloc](  512): g            =  8:8
I/[MALI][Gralloc](  512): b            =  0:8
I/[MALI][Gralloc](  512): width        = 163 mm (159.568100 dpi)
I/[MALI][Gralloc](  512): height       = 95 mm (160.421051 dpi)
I/[MALI][Gralloc](  512): refresh rate = 60.00 Hz
I/[MALI][Gralloc](  512): init_framebuffer va: 0xb50f8000 mva: 0xb3700000
I/hwcomposer(  512): [DPY] Display Information:
I/hwcomposer(  512): [DPY] # fo devices : 1
I/hwcomposer(  512): [DPY] -----------------------------
I/hwcomposer(  512): [DPY] Device id   : 0
I/hwcomposer(  512): [DPY] Width       : 1024
I/hwcomposer(  512): [DPY] Height      : 600
I/hwcomposer(  512): [DPY] xdpi        : 160.000000
I/hwcomposer(  512): [DPY] ydpi        : 160.000000
I/hwcomposer(  512): [DPY] vsync       : 1
I/hwcomposer(  512): [DPY] refresh     : 17179179
I/hwcomposer(  512): [DPY] connected   : 1
I/hwcomposer(  512): [DPY] subtype     : 0
W/hwcomposer(  512): [EVENT] Failed to open vsync device (Permission denied)
W/hwcomposer(  512): [EVENT] HW VSync State(0)
W/hwcomposer(  512): [EVENT] Start to listen uevent, addr.nl_pid(512)
I/6620_launcher(  124): Can't open device node(/dev/stpwmt)
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/SurfaceFlinger(  512): Using composer version 1.2
I/hwcomposer(  512): [HWC] getConfigs Display(0)
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/hwcomposer(  512): [HWC] getAttributes Display(0)
I/hwcomposer(  512): [HWC] getConfigs Display(1)
I/hwcomposer(  512): [HWC] getAttributes Display(1)
E/hwcomposer(  512): [HWC] Failed to get display attributes (dpy=1 is not connected)
W/SurfaceFlinger(  512): no suitable EGLConfig found, trying a simpler query
F/SurfaceFlinger(  512): no suitable EGLConfig found, giving up
F/libc    (  512): Fatal signal 6 (SIGABRT), code -6 in tid 512 (surfaceflinger)
I/DEBUG   (  129): property debug.db.uid not set; NOT waiting for gdb.
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/DEBUG   (  129): HINT: adb shell setprop debug.db.uid 100000
I/DEBUG   (  129): HINT: adb forward tcp:5039 tcp:5039
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/DEBUG   (  129): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  129): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/e2909bc29b:eng/test-keys'
I/DEBUG   (  129): Revision: '0'
I/DEBUG   (  129): ABI: 'arm'
I/DEBUG   (  129): pid: 512, tid: 512, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  129): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG   (  129): Abort message: 'no suitable EGLConfig found, giving up'
I/DEBUG   (  129):     r0 00000000  r1 00000200  r2 00000006  r3 00000000
I/DEBUG   (  129):     r4 b6fc1e38  r5 00000006  r6 00000000  r7 0000010c
I/DEBUG   (  129):     r8 b6482000  r9 00000000  sl 00000000  fp 00000001
I/DEBUG   (  129):     ip 00000200  sp be8d34a0  lr b6f1a8f5  pc b6f3d8d0  cpsr 60070010
I/DEBUG   (  129):
I/DEBUG   (  129): backtrace:
I/DEBUG   (  129):     #00 pc 000378d0  /system/lib/libc.so (tgkill+12)
I/DEBUG   (  129):     #01 pc 000148f1  /system/lib/libc.so (pthread_kill+52)
I/DEBUG   (  129):     #02 pc 0001564b  /system/lib/libc.so (raise+10)
I/DEBUG   (  129):     #03 pc 00011cc5  /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG   (  129):     #04 pc 0001005c  /system/lib/libc.so (abort+4)
I/DEBUG   (  129):     #05 pc 00007a41  /system/lib/libcutils.so (__android_log_assert+88)
I/DEBUG   (  129):     #06 pc 0002930d  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #07 pc 00028f09  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #08 pc 000195e7  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger4initEv+174)
I/DEBUG   (  129):     #09 pc 00000af1  /system/bin/surfaceflinger
I/DEBUG   (  129):     #10 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  129):     #11 pc 00000c08  /system/bin/surfaceflinger
 

Attachments

  • logcat_UYT2_7.zip
    34.2 KB · Views: 5

Rortiz2

Senior Member
So I kanged hwcomposer from @pix106's dump of the A7-10F KitKat ROM, and it looks like I got something else other than the usual sw_sync_timeline failure:

Code:
I/SurfaceFlinger(  512): SurfaceFlinger is starting
I/SurfaceFlinger(  512): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  (  512): loaded /system/lib/egl/libEGL_mali.so
D/libEGL  (  512): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL  (  512): loaded /system/lib/egl/libGLESv2_mali.so
W/libEGL  (  512): eglInitialize(0x1) failed (EGL_BAD_ALLOC)
I/[MALI][Gralloc](  512): gralloc UREE_CreateSession recount = 0
I/[MALI][Gralloc](  512): gralloc call UREE_CreateSession
I/[MALI][Gralloc](  512): UREE_CreateSession fail, ret = -65536
I/gralloc (  512): [Gralloc] refreshRate = 0, info.pixclock = ffffffff
I/gralloc (  512): [Gralloc] info.upper_margin = ffffffff, info.lower_margin = ffffffff
I/gralloc (  512): [Gralloc] info.yres = 258, info.hsync_len = ffffffff
I/gralloc (  512): [Gralloc] info.left_margin = ffffffff, info.right_margin = ffffffff
I/[MALI][Gralloc](  512): ro_dpi: 160.000000
I/[MALI][Gralloc](  512): using (fd=13)
I/[MALI][Gralloc](  512): id           = mtkfb
I/[MALI][Gralloc](  512): xres         = 1024 px
I/[MALI][Gralloc](  512): yres         = 600 px
I/[MALI][Gralloc](  512): xres_virtual = 1024 px
I/[MALI][Gralloc](  512): yres_virtual = 1800 px
I/[MALI][Gralloc](  512): bpp          = 32
I/[MALI][Gralloc](  512): r            = 16:8
I/[MALI][Gralloc](  512): g            =  8:8
I/[MALI][Gralloc](  512): b            =  0:8
I/[MALI][Gralloc](  512): width        = 163 mm (159.568100 dpi)
I/[MALI][Gralloc](  512): height       = 95 mm (160.421051 dpi)
I/[MALI][Gralloc](  512): refresh rate = 60.00 Hz
I/[MALI][Gralloc](  512): init_framebuffer va: 0xb50f8000 mva: 0xb3700000
I/hwcomposer(  512): [DPY] Display Information:
I/hwcomposer(  512): [DPY] # fo devices : 1
I/hwcomposer(  512): [DPY] -----------------------------
I/hwcomposer(  512): [DPY] Device id   : 0
I/hwcomposer(  512): [DPY] Width       : 1024
I/hwcomposer(  512): [DPY] Height      : 600
I/hwcomposer(  512): [DPY] xdpi        : 160.000000
I/hwcomposer(  512): [DPY] ydpi        : 160.000000
I/hwcomposer(  512): [DPY] vsync       : 1
I/hwcomposer(  512): [DPY] refresh     : 17179179
I/hwcomposer(  512): [DPY] connected   : 1
I/hwcomposer(  512): [DPY] subtype     : 0
W/hwcomposer(  512): [EVENT] Failed to open vsync device (Permission denied)
W/hwcomposer(  512): [EVENT] HW VSync State(0)
W/hwcomposer(  512): [EVENT] Start to listen uevent, addr.nl_pid(512)
I/6620_launcher(  124): Can't open device node(/dev/stpwmt)
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/SurfaceFlinger(  512): Using composer version 1.2
I/hwcomposer(  512): [HWC] getConfigs Display(0)
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/hwcomposer(  512): [HWC] getAttributes Display(0)
I/hwcomposer(  512): [HWC] getConfigs Display(1)
I/hwcomposer(  512): [HWC] getAttributes Display(1)
E/hwcomposer(  512): [HWC] Failed to get display attributes (dpy=1 is not connected)
W/SurfaceFlinger(  512): no suitable EGLConfig found, trying a simpler query
F/SurfaceFlinger(  512): no suitable EGLConfig found, giving up
F/libc    (  512): Fatal signal 6 (SIGABRT), code -6 in tid 512 (surfaceflinger)
I/DEBUG   (  129): property debug.db.uid not set; NOT waiting for gdb.
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/DEBUG   (  129): HINT: adb shell setprop debug.db.uid 100000
I/DEBUG   (  129): HINT: adb forward tcp:5039 tcp:5039
W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
I/DEBUG   (  129): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  129): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/e2909bc29b:eng/test-keys'
I/DEBUG   (  129): Revision: '0'
I/DEBUG   (  129): ABI: 'arm'
I/DEBUG   (  129): pid: 512, tid: 512, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  129): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG   (  129): Abort message: 'no suitable EGLConfig found, giving up'
I/DEBUG   (  129):     r0 00000000  r1 00000200  r2 00000006  r3 00000000
I/DEBUG   (  129):     r4 b6fc1e38  r5 00000006  r6 00000000  r7 0000010c
I/DEBUG   (  129):     r8 b6482000  r9 00000000  sl 00000000  fp 00000001
I/DEBUG   (  129):     ip 00000200  sp be8d34a0  lr b6f1a8f5  pc b6f3d8d0  cpsr 60070010
I/DEBUG   (  129):
I/DEBUG   (  129): backtrace:
I/DEBUG   (  129):     #00 pc 000378d0  /system/lib/libc.so (tgkill+12)
I/DEBUG   (  129):     #01 pc 000148f1  /system/lib/libc.so (pthread_kill+52)
I/DEBUG   (  129):     #02 pc 0001564b  /system/lib/libc.so (raise+10)
I/DEBUG   (  129):     #03 pc 00011cc5  /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG   (  129):     #04 pc 0001005c  /system/lib/libc.so (abort+4)
I/DEBUG   (  129):     #05 pc 00007a41  /system/lib/libcutils.so (__android_log_assert+88)
I/DEBUG   (  129):     #06 pc 0002930d  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #07 pc 00028f09  /system/lib/libsurfaceflinger.so
I/DEBUG   (  129):     #08 pc 000195e7  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger4initEv+174)
I/DEBUG   (  129):     #09 pc 00000af1  /system/bin/surfaceflinger
I/DEBUG   (  129):     #10 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  129):     #11 pc 00000c08  /system/bin/surfaceflinger

I would not know how to help you but maybe ggow who has compiled lineage 12.1 for amazon fire mt8127 can help you.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
I would not know how to help you but maybe ggow who has compiled lineage 12.1 for amazon fire mt8127 can help you.
Does that one run on Kitkat originally? If anything, both the Epic and the MT8127 Amazon Fire tablets are made by the same ODM iirc. I might also try updating the blobs and kernel to version 1.8.45 to see if it helps any, but hwcomposer is apparently still the same.
 

Rortiz2

Senior Member
Does that one run on Kitkat originally? If anything, both the Epic and the MT8127 Amazon Fire tablets are made by the same ODM iirc. I might also try updating the blobs and kernel to version 1.8.45 to see if it helps any, but hwcomposer is apparently still the same.

Amazon Fire tablets came with lollipop 5.1.
Have you tried to port the Rom instead of compiling? It is easier :/ . If you send me the stock bootimg and the stock system.img I can port you some ROM.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Amazon Fire tablets came with lollipop 5.1.
Have you tried to port the Rom instead of compiling? It is easier :/ . If you send me the stock bootimg and the stock system.img I can port you some ROM.
You sure you're able to port a ROM built for newer (prebuilt) kernel on a 3.4.67 device? The only sticking point so far with the LeapFrog CM12 port is hwcomposer/surfaceflinger refusing to cooperate. As of late I recompiled the ROM with no blobs kanged off other devices with the following flags added to BoardConfig:

Code:
TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
BOARD_EGL_WORKAROUND_BUG_10194508 := true

...and ran logcat on it. Still the same sw_sync issues though it apparently has something to do with SELinux denying those requests as what the attached log seems to imply. It might be a red herring though, and I've read that @pix106 also ran into similar issues before with him trying a myriad of build flags in an attempt to fix this. Any ideas on what to use to get rid of this once and for all and finally get the damn GUI to boot? I'm thinking about using "BOARD_NEEDS_OLD_HWC_API := true" given how the blobs were for KitKat but what do you guys think? If only there were developers here who just happen to own an Epic lol.
 

Attachments

  • logcat_UYT2_11.zip
    38 KB · Views: 9

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
...and I got a tiny bit further with the SELinux whitelist applied, though it's still the same "stuck on LeapFrog logo" moment with no sign of the boot animation springing to life. The backtrace mentions something along the lines of "buffer" in the functions called. Could it be that "BOARD_EGL_NEEDS_LEGACY_FB := true" is at fault here?

Also, there's an error in the log saying:
Code:
File size of 0 bytes not large enough to contain ELF header of 52 bytes: '/data/dalvik-cache/arm/system@framework@boot.oat'
 

Attachments

  • logcat_UYT2_13.zip
    23.7 KB · Views: 7

pix106

Senior Member
Oct 16, 2010
1,113
594
Xiaomi Mi Pad 4
Xiaomi Mi Pad 4 Plus
...and I got a tiny bit further with the SELinux whitelist applied, though it's still the same "stuck on LeapFrog logo" moment with no sign of the boot animation springing to life. The backtrace mentions something along the lines of "buffer" in the functions called. Could it be that "BOARD_EGL_NEEDS_LEGACY_FB := true" is at fault here?

Also, there's an error in the log saying:
I'd first check permission issues (/dev/stpwmt : iirc I had a few permission errors at early boot, but quick after it should be working fine), and nvram.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
I'd first check permission issues (/dev/stpwmt : iirc I had a few permission errors at early boot, but quick after it should be working fine), and nvram.

Care to explain even further? I'll have to check things on my other Epic to see if I got the permissions right (I have three Epics actually, one for development, one which I keep as stock for reference purposes and another as a parts unit).

Also, any ideas on why ART appears to be failing? Permissions issues as well I presume?
 
Last edited:

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
ART does seem to work, but for some reason /dev/stpwmt isn't being loaded properly despite it being declared on the init files. I can however load it manually through ADB shell. Also, even if I did seem to set the right permissions to the display drivers surfaceflinger crashes for a few times until the crash logs cease to show up, and I then get spammed with the following:

Code:
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll return 1
I/hwcomposer( 2058): [DPY] UEventThread::threadLoop recv change@/devices/platform/battery/power_supply/ac
D/hwcomposer( 2058): [DPY] handle_uevents : s = 0xb5ce2138, len = 191
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll wait
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll return 1
I/hwcomposer( 2058): [DPY] UEventThread::threadLoop recv change@/devices/platform/battery/power_supply/usb
D/hwcomposer( 2058): [DPY] handle_uevents : s = 0xb5ce2138, len = 194
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll wait
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll return 1
I/hwcomposer( 2058): [DPY] UEventThread::threadLoop recv change@/devices/platform/battery/power_supply/battery
D/hwcomposer( 2058): [DPY] handle_uevents : s = 0xb5ce2138, len = 794
D/hwcomposer( 2058): [DPY] UEventThread::threadLoop poll wait

I think the surfaceflinger crash may have something to do with the permissions being loaded a bit too late. Can anyone look into this?
 

Attachments

  • logcat_UYT2_15.zip
    35.5 KB · Views: 4

pix106

Senior Member
Oct 16, 2010
1,113
594
Xiaomi Mi Pad 4
Xiaomi Mi Pad 4 Plus
Care to explain even further? I'll have to check things on my other Epic to see if I got the permissions right (I have three Epics actually, one for development, one which I keep as stock for reference purposes and another as a parts unit).

Also, any ideas on why ART appears to be failing? Permissions issues as well I presume?
I remember I had issues with this permission too, and maybe had to modify it from init.mt8127, among other permissions. Check my GitHub, check cm-12.1 branch, which was used as base for the CyanogenMod for Lenovo Tab2A710F repository ; you'll find the commits before cm finally booted.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
I remember I had issues with this permission too, and maybe had to modify it from init.mt8127, among other permissions. Check my GitHub, check cm-12.1 branch, which was used as base for the CyanogenMod for Lenovo Tab2A710F repository ; you'll find the commits before cm finally booted.

I'll check that one out. Permissions seem to be the thing that's keeping CM from booting up at all lol. If only LeapFrog did a Lollipop update for the Epic (like seriously, KitKat in 2019 wtf?) that would've saved me the trouble of hacking up fixes and whatnot.
 

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Strange, I applied your edits to init.mt8127 yet /dev/stpwmt isn't being loaded automatically. And HWC/surfaceflinger still spazzes out with complaints about buffers or something along the lines of it. I don't know if I should just suck it up and throw the towel for now, but I've gone too far into this project that it would be a shame to just let it go.

That being said, is it possible to decompile sepolicy and kang whatever it is in there so I don't have to compile a whole list of things to whitelist? And I really do need people who own a LeapFrog Epic and are also interested in porting CM to this damn thing. It's a shot in the dark but I could use all the help I could muster right now.
 

Attachments

  • logcat_cm12.zip
    84.3 KB · Views: 4

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Seems like we need to adapt what I saw on this repo as the MediatekHacks.cpp I threw in to fix the missing symbols issue may have accounted for why SurfaceFlinger isn't cooperating.

@pix106 - Did you by any chance use the repo I mentioned above when you built your ROM? I've used the vanilla CM android_frameworks_native repo for one and that may have accounted for why my ROM is spazzing out. Also, I saw a commit by thp1997 (along with a patch of similar intent by @Kirito96) which appears to be a patch/shim set for the MT6572 that seems to tackle the same issue as what I've been experiencing with the Epic. The crash log...

Code:
--------- beginning of crash

F/libc    (  127): Fatal signal 7 (SIGBUS), code 1, fault addr 0xb6400189 in tid 127 (surfaceflinger)
I/DEBUG   (  133): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  133): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/ad8cbe2f60:eng/test-keys'
I/DEBUG   (  133): Revision: '0'
I/DEBUG   (  133): ABI: 'arm'
I/DEBUG   (  133): pid: 127, tid: 127, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  133): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb6400189
I/DEBUG   (  133):     r0 ffffffff  r1 b6400189  r2 00000005  r3 00000000
I/DEBUG   (  133):     r4 b6400189  r5 ffffffff  r6 be827298  r7 b60b30d0
I/DEBUG   (  133):     r8 b6d6dc2c  r9 be826db4  sl 00000000  fp 00000000
I/DEBUG   (  133):     ip b6e02f38  sp be826d60  lr b6e68dbc  pc b6e68dbc  cpsr 80000010
I/DEBUG   (  133): 
I/DEBUG   (  133): backtrace:
I/DEBUG   (  133):     #00 pc 00003dbc  /system/lib/libcutils.so (android_atomic_add+16)
I/DEBUG   (  133):     #01 pc 0000d61f  /system/lib/libutils.so (_ZNK7android7RefBase9decStrongEPKv+10)
I/DEBUG   (  133):     #02 pc 00028f7b  /system/lib/libgui.so (_ZN7android2spINS_13GraphicBufferEEaSERKS2_+22)
I/DEBUG   (  133):     #03 pc 000290af  /system/lib/libgui.so (_ZN7android19BufferQueueConsumer13acquireBufferEPNS_22IGraphicBufferConsumer10BufferItemEx+270)
I/DEBUG   (  133):     #04 pc 0002c411  /system/lib/libgui.so (_ZN7android12ConsumerBase19acquireBufferLockedEPNS_22IGraphicBufferConsumer10BufferItemEx+16)
I/DEBUG   (  133):     #05 pc 00023571  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #06 pc 00023679  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #07 pc 0002849b  /system/lib/libgui.so (_ZN7android11BufferQueue21ProxyConsumerListener16onFrameAvailableERKNS_10BufferItemE+26)
I/DEBUG   (  133):     #08 pc 0002ba2b  /system/lib/libgui.so (_ZN7android19BufferQueueProducer11queueBufferEiRKNS_22IGraphicBufferProducer16QueueBufferInputEPNS1_17QueueBufferOutputE+562)
I/DEBUG   (  133):     #09 pc 00037423  /system/lib/libgui.so (_ZN7android7Surface11queueBufferEP19ANativeWindowBufferi+254)
I/DEBUG   (  133):     #10 pc 00036693  /system/lib/libgui.so (_ZN7android7Surface16hook_queueBufferEP13ANativeWindowP19ANativeWindowBufferi+10)
I/DEBUG   (  133):     #11 pc 0000f720  /system/lib/libMali.so
I/DEBUG   (  133):     #12 pc 00010218  /system/lib/libMali.so
I/DEBUG   (  133):     #13 pc 0005e5d8  /system/lib/libMali.so
I/DEBUG   (  133):     #14 pc 0005d70c  /system/lib/libMali.so
I/DEBUG   (  133):     #15 pc 0005bf58  /system/lib/libMali.so (shim_eglSwapBuffers+64)
I/DEBUG   (  133):     #16 pc 000120d7  /system/lib/libEGL.so (eglSwapBuffers+290)
I/DEBUG   (  133):     #17 pc 0000f541  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #18 pc 0001c187  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #19 pc 0001b367  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #20 pc 0001a6eb  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #21 pc 0001a459  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #22 pc 00011127  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+410)
I/DEBUG   (  133):     #23 pc 00011219  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+92)
I/DEBUG   (  133):     #24 pc 00017b95  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #25 pc 0001a04d  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger3runEv+8)
I/DEBUG   (  133):     #26 pc 00000b4d  /system/bin/surfaceflinger
I/DEBUG   (  133):     #27 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  133):     #28 pc 00000c08  /system/bin/surfaceflinger
F/libc    (  261): Fatal signal 7 (SIGBUS), code 1, fault addr 0xffffffff in tid 261 (surfaceflinger)
I/DEBUG   (  133): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

...appears to allude to the ones mentioned in the patch files. Maybe this is the cure we needed, short of using a different HWC which I more or less doubt to be necessary.
 

Attachments

  • logcat_UYT2_19.log
    420.9 KB · Views: 5
Last edited:

pix106

Senior Member
Oct 16, 2010
1,113
594
Xiaomi Mi Pad 4
Xiaomi Mi Pad 4 Plus
Seems like we need to adapt what I saw on this repo as the MediatekHacks.cpp I threw in to fix the missing symbols issue may have accounted for why SurfaceFlinger isn't cooperating.

@pix106 - Did you by any chance use the repo I mentioned above when you built your ROM? I've used the vanilla CM android_frameworks_native repo for one and that may have accounted for why my ROM is spazzing out. Also, I saw a commit by thp1997 (along with a patch of similar intent by @Kirito96) which appears to be a patch/shim set for the MT6572 that seems to tackle the same issue as what I've been experiencing with the Epic. The crash log...

Code:
--------- beginning of crash

F/libc    (  127): Fatal signal 7 (SIGBUS), code 1, fault addr 0xb6400189 in tid 127 (surfaceflinger)
I/DEBUG   (  133): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  133): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/ad8cbe2f60:eng/test-keys'
I/DEBUG   (  133): Revision: '0'
I/DEBUG   (  133): ABI: 'arm'
I/DEBUG   (  133): pid: 127, tid: 127, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  133): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb6400189
I/DEBUG   (  133):     r0 ffffffff  r1 b6400189  r2 00000005  r3 00000000
I/DEBUG   (  133):     r4 b6400189  r5 ffffffff  r6 be827298  r7 b60b30d0
I/DEBUG   (  133):     r8 b6d6dc2c  r9 be826db4  sl 00000000  fp 00000000
I/DEBUG   (  133):     ip b6e02f38  sp be826d60  lr b6e68dbc  pc b6e68dbc  cpsr 80000010
I/DEBUG   (  133): 
I/DEBUG   (  133): backtrace:
I/DEBUG   (  133):     #00 pc 00003dbc  /system/lib/libcutils.so (android_atomic_add+16)
I/DEBUG   (  133):     #01 pc 0000d61f  /system/lib/libutils.so (_ZNK7android7RefBase9decStrongEPKv+10)
I/DEBUG   (  133):     #02 pc 00028f7b  /system/lib/libgui.so (_ZN7android2spINS_13GraphicBufferEEaSERKS2_+22)
I/DEBUG   (  133):     #03 pc 000290af  /system/lib/libgui.so (_ZN7android19BufferQueueConsumer13acquireBufferEPNS_22IGraphicBufferConsumer10BufferItemEx+270)
I/DEBUG   (  133):     #04 pc 0002c411  /system/lib/libgui.so (_ZN7android12ConsumerBase19acquireBufferLockedEPNS_22IGraphicBufferConsumer10BufferItemEx+16)
I/DEBUG   (  133):     #05 pc 00023571  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #06 pc 00023679  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #07 pc 0002849b  /system/lib/libgui.so (_ZN7android11BufferQueue21ProxyConsumerListener16onFrameAvailableERKNS_10BufferItemE+26)
I/DEBUG   (  133):     #08 pc 0002ba2b  /system/lib/libgui.so (_ZN7android19BufferQueueProducer11queueBufferEiRKNS_22IGraphicBufferProducer16QueueBufferInputEPNS1_17QueueBufferOutputE+562)
I/DEBUG   (  133):     #09 pc 00037423  /system/lib/libgui.so (_ZN7android7Surface11queueBufferEP19ANativeWindowBufferi+254)
I/DEBUG   (  133):     #10 pc 00036693  /system/lib/libgui.so (_ZN7android7Surface16hook_queueBufferEP13ANativeWindowP19ANativeWindowBufferi+10)
I/DEBUG   (  133):     #11 pc 0000f720  /system/lib/libMali.so
I/DEBUG   (  133):     #12 pc 00010218  /system/lib/libMali.so
I/DEBUG   (  133):     #13 pc 0005e5d8  /system/lib/libMali.so
I/DEBUG   (  133):     #14 pc 0005d70c  /system/lib/libMali.so
I/DEBUG   (  133):     #15 pc 0005bf58  /system/lib/libMali.so (shim_eglSwapBuffers+64)
I/DEBUG   (  133):     #16 pc 000120d7  /system/lib/libEGL.so (eglSwapBuffers+290)
I/DEBUG   (  133):     #17 pc 0000f541  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #18 pc 0001c187  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #19 pc 0001b367  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #20 pc 0001a6eb  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #21 pc 0001a459  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #22 pc 00011127  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+410)
I/DEBUG   (  133):     #23 pc 00011219  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+92)
I/DEBUG   (  133):     #24 pc 00017b95  /system/lib/libsurfaceflinger.so
I/DEBUG   (  133):     #25 pc 0001a04d  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger3runEv+8)
I/DEBUG   (  133):     #26 pc 00000b4d  /system/bin/surfaceflinger
I/DEBUG   (  133):     #27 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  133):     #28 pc 00000c08  /system/bin/surfaceflinger
F/libc    (  261): Fatal signal 7 (SIGBUS), code 1, fault addr 0xffffffff in tid 261 (surfaceflinger)
I/DEBUG   (  133): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

...appears to allude to the ones mentioned in the patch files. Maybe this is the cure we needed, short of using a different HWC which I more or less doubt to be necessary.
i did not use this repo.
i could build a bootable and usable cm12.1 without any patch.
thp1997 joined afterwards and added patched repos, but they were not strictly needed : they allowed WPS wifi pairing, headset icon, usb mode selection when usb is not plugged.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    If I use hwcomposer.mt8127.so, libgralloc_extra.so, libion_mtk.so and libtz_uree.so from @pix106's Lenovo Tab 2 A7-10F vendor tree]
    Tab2 has 3.10.54 kernel, I don't know if you can use these libs with a 3.4 kernel.

    When missing a symbol, you can grep it in your device stock rom to find what lib provides it.
    From a running device using adv, or using a stock room dumping your computer.

    grep -r _Zazertyuiopqsdfghjklmwxcvbn /path/to/libs
    1
    And I wonder if I could kang libs off another MT8127 device running KitKat which is a little tiny bit of a stretch to hunt for.
    My "mistake", in a way :) : Tab2 also had KitKat with a 3.4 kernel, but I used kernel 3.10 and vendor from Lollipop stock rom to build cm-12.1.

    You can try to download and extract lenovo's kk rom, or I can search my archives later and try to upload a KitKat stock rom dump somewhere, but I'm not home and have slow internet for now.
    1
    So I kanged hwcomposer from @pix106's dump of the A7-10F KitKat ROM, and it looks like I got something else other than the usual sw_sync_timeline failure:

    Code:
    I/SurfaceFlinger(  512): SurfaceFlinger is starting
    I/SurfaceFlinger(  512): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
    D/libEGL  (  512): loaded /system/lib/egl/libEGL_mali.so
    D/libEGL  (  512): loaded /system/lib/egl/libGLESv1_CM_mali.so
    D/libEGL  (  512): loaded /system/lib/egl/libGLESv2_mali.so
    W/libEGL  (  512): eglInitialize(0x1) failed (EGL_BAD_ALLOC)
    I/[MALI][Gralloc](  512): gralloc UREE_CreateSession recount = 0
    I/[MALI][Gralloc](  512): gralloc call UREE_CreateSession
    I/[MALI][Gralloc](  512): UREE_CreateSession fail, ret = -65536
    I/gralloc (  512): [Gralloc] refreshRate = 0, info.pixclock = ffffffff
    I/gralloc (  512): [Gralloc] info.upper_margin = ffffffff, info.lower_margin = ffffffff
    I/gralloc (  512): [Gralloc] info.yres = 258, info.hsync_len = ffffffff
    I/gralloc (  512): [Gralloc] info.left_margin = ffffffff, info.right_margin = ffffffff
    I/[MALI][Gralloc](  512): ro_dpi: 160.000000
    I/[MALI][Gralloc](  512): using (fd=13)
    I/[MALI][Gralloc](  512): id           = mtkfb
    I/[MALI][Gralloc](  512): xres         = 1024 px
    I/[MALI][Gralloc](  512): yres         = 600 px
    I/[MALI][Gralloc](  512): xres_virtual = 1024 px
    I/[MALI][Gralloc](  512): yres_virtual = 1800 px
    I/[MALI][Gralloc](  512): bpp          = 32
    I/[MALI][Gralloc](  512): r            = 16:8
    I/[MALI][Gralloc](  512): g            =  8:8
    I/[MALI][Gralloc](  512): b            =  0:8
    I/[MALI][Gralloc](  512): width        = 163 mm (159.568100 dpi)
    I/[MALI][Gralloc](  512): height       = 95 mm (160.421051 dpi)
    I/[MALI][Gralloc](  512): refresh rate = 60.00 Hz
    I/[MALI][Gralloc](  512): init_framebuffer va: 0xb50f8000 mva: 0xb3700000
    I/hwcomposer(  512): [DPY] Display Information:
    I/hwcomposer(  512): [DPY] # fo devices : 1
    I/hwcomposer(  512): [DPY] -----------------------------
    I/hwcomposer(  512): [DPY] Device id   : 0
    I/hwcomposer(  512): [DPY] Width       : 1024
    I/hwcomposer(  512): [DPY] Height      : 600
    I/hwcomposer(  512): [DPY] xdpi        : 160.000000
    I/hwcomposer(  512): [DPY] ydpi        : 160.000000
    I/hwcomposer(  512): [DPY] vsync       : 1
    I/hwcomposer(  512): [DPY] refresh     : 17179179
    I/hwcomposer(  512): [DPY] connected   : 1
    I/hwcomposer(  512): [DPY] subtype     : 0
    W/hwcomposer(  512): [EVENT] Failed to open vsync device (Permission denied)
    W/hwcomposer(  512): [EVENT] HW VSync State(0)
    W/hwcomposer(  512): [EVENT] Start to listen uevent, addr.nl_pid(512)
    I/6620_launcher(  124): Can't open device node(/dev/stpwmt)
    W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
    W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
    I/SurfaceFlinger(  512): Using composer version 1.2
    I/hwcomposer(  512): [HWC] getConfigs Display(0)
    W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
    I/hwcomposer(  512): [HWC] getAttributes Display(0)
    I/hwcomposer(  512): [HWC] getConfigs Display(1)
    I/hwcomposer(  512): [HWC] getAttributes Display(1)
    E/hwcomposer(  512): [HWC] Failed to get display attributes (dpy=1 is not connected)
    W/SurfaceFlinger(  512): no suitable EGLConfig found, trying a simpler query
    F/SurfaceFlinger(  512): no suitable EGLConfig found, giving up
    F/libc    (  512): Fatal signal 6 (SIGABRT), code -6 in tid 512 (surfaceflinger)
    I/DEBUG   (  129): property debug.db.uid not set; NOT waiting for gdb.
    W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
    I/DEBUG   (  129): HINT: adb shell setprop debug.db.uid 100000
    I/DEBUG   (  129): HINT: adb forward tcp:5039 tcp:5039
    W/hwcomposer(  512): [WKR] Failed to set priority to RR: Operation not permitted
    I/DEBUG   (  129): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    I/DEBUG   (  129): Build fingerprint: 'LeapFrog/cm_narnia/narnia:5.1.1/LMY49J/e2909bc29b:eng/test-keys'
    I/DEBUG   (  129): Revision: '0'
    I/DEBUG   (  129): ABI: 'arm'
    I/DEBUG   (  129): pid: 512, tid: 512, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
    I/DEBUG   (  129): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    I/DEBUG   (  129): Abort message: 'no suitable EGLConfig found, giving up'
    I/DEBUG   (  129):     r0 00000000  r1 00000200  r2 00000006  r3 00000000
    I/DEBUG   (  129):     r4 b6fc1e38  r5 00000006  r6 00000000  r7 0000010c
    I/DEBUG   (  129):     r8 b6482000  r9 00000000  sl 00000000  fp 00000001
    I/DEBUG   (  129):     ip 00000200  sp be8d34a0  lr b6f1a8f5  pc b6f3d8d0  cpsr 60070010
    I/DEBUG   (  129):
    I/DEBUG   (  129): backtrace:
    I/DEBUG   (  129):     #00 pc 000378d0  /system/lib/libc.so (tgkill+12)
    I/DEBUG   (  129):     #01 pc 000148f1  /system/lib/libc.so (pthread_kill+52)
    I/DEBUG   (  129):     #02 pc 0001564b  /system/lib/libc.so (raise+10)
    I/DEBUG   (  129):     #03 pc 00011cc5  /system/lib/libc.so (__libc_android_abort+36)
    I/DEBUG   (  129):     #04 pc 0001005c  /system/lib/libc.so (abort+4)
    I/DEBUG   (  129):     #05 pc 00007a41  /system/lib/libcutils.so (__android_log_assert+88)
    I/DEBUG   (  129):     #06 pc 0002930d  /system/lib/libsurfaceflinger.so
    I/DEBUG   (  129):     #07 pc 00028f09  /system/lib/libsurfaceflinger.so
    I/DEBUG   (  129):     #08 pc 000195e7  /system/lib/libsurfaceflinger.so (_ZN7android14SurfaceFlinger4initEv+174)
    I/DEBUG   (  129):     #09 pc 00000af1  /system/bin/surfaceflinger
    I/DEBUG   (  129):     #10 pc 0000ff19  /system/lib/libc.so (__libc_init+44)
    I/DEBUG   (  129):     #11 pc 00000c08  /system/bin/surfaceflinger

    I would not know how to help you but maybe ggow who has compiled lineage 12.1 for amazon fire mt8127 can help you.
    1
    Does that one run on Kitkat originally? If anything, both the Epic and the MT8127 Amazon Fire tablets are made by the same ODM iirc. I might also try updating the blobs and kernel to version 1.8.45 to see if it helps any, but hwcomposer is apparently still the same.

    Amazon Fire tablets came with lollipop 5.1.
    Have you tried to port the Rom instead of compiling? It is easier :/ . If you send me the stock bootimg and the stock system.img I can port you some ROM.
    1
    ...and I got a tiny bit further with the SELinux whitelist applied, though it's still the same "stuck on LeapFrog logo" moment with no sign of the boot animation springing to life. The backtrace mentions something along the lines of "buffer" in the functions called. Could it be that "BOARD_EGL_NEEDS_LEGACY_FB := true" is at fault here?

    Also, there's an error in the log saying:
    I'd first check permission issues (/dev/stpwmt : iirc I had a few permission errors at early boot, but quick after it should be working fine), and nvram.