[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
Hi @blakegriplingph
I was looking at the latest logcat that you sent in this thread (logcat_UYT2_46.zip) and found interesting things.
Your problem is that the ROM boots up but you can only see wallpaper.
This is related to graphics stuff for sure.
I had a quick peak at the logcat and found you're missing a few graphics libs from the stock ROM.
Code:
Failed to open libwvm.so: dlopen failed: library "libWVStreamControlAPI_L1.so" not found
Failed to open FACTORY_LIB Error : dlopen failed: library "libdashplayer.so" not found
I don't know if it has to do since dashplayer is for qcom :p
btw your hwcomposer crashes a lot so I think it can be the problem too.
Regards.

Edit: First error that I can see from hwcomposer:
Code:
E/hwcomposer(  123): [HWC] Failed to get display attributes (dpy=1 is not connected)
Also as hwcomposer is not working correctly, other stuff like audio/camera hal or memtrack is not working too:
Code:
E/memtrack(  147): Couldn't load memtrack module (No such file or directory)

The two libraries you mentioned doesn't appear to be present on the stock ROM dump I have atm. And I may be wrong but I think the "Failed to get display attributes (dpy=1 is not connected)" error might be of even greater importance.
@Matty1993 - Have you by any chance encountered this issue? Well since you were able to port Android 5 and later to a 3.4.67 kernel and all...
 
Last edited:

Rortiz2

Senior Member
The two libraries you mentioned doesn't appear to be present on the stock ROM dump I have atm. And I may be wrong but I think the "Failed to get display attributes (dpy=1 is not connected)" error might be of even greater importance.

@Matty1993 - Have you by any chance encountered this issue? Well since you were able to port Android 5 and later to a 3.4.67 kernel and all...

So you can try to compile them;)
Regarding to hwcomposer it stills crashes a lot and that's not good.
Also, I noticed you are missing sensors.mt8127.so that is needed to have all sensors working.
Definelety the stock ROM has missing libs for LP.
Regards.
 

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
So you can try to compile them;)
Regarding to hwcomposer it stills crashes a lot and that's not good.
Also, I noticed you are missing sensors.mt8127.so that is needed to have all sensors working.
Definelety the stock ROM has missing libs for LP.
Regards.

Hmm, if only that LeapFrog would just suck it up and do at least an LP ROM for the Epic; Kitkat in 2019 (or 2020 for that matter) is plain stupid no matter how you patch it.

The stock ROM doesn't appear to have sensors.mt8127.so but what about sensors.default.so? Would that suffice?
 

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
So I compiled a new build lately; not much has changed except for the missing sensors library being thrown in. Didn't expect it to boot properly but I flashed it anyway to see if anything has changed at least in the logs.
@Matty1993 Think we could arrange for the demo tablet to be sent your way soon?
 

Attachments

  • logcat_UYT2_52.zip
    137.3 KB · Views: 11

Rortiz2

Senior Member
So I compiled a new build lately; not much has changed except for the missing sensors library being thrown in. Didn't expect it to boot properly but I flashed it anyway to see if anything has changed at least in the logs.

@Matty1993 Think we could arrange for the demo tablet to be sent your way soon?

Cool.
Sad to say but it's kinda the same...
Code:
E/hwcomposer(  123): [HWC] ION is invalid (handle=0xb6073580, num=-1, idx=-1) !!
W/hwcomposer(  123): [HWC] Failed to get ION fd !! (handle=0xb6073580) !!
Basically warnings/errors from hwcomposer..
Now asking for more libs lol:
Code:
E/WVMExtractor(  134): Failed to open libwvm.so: dlopen failed: library "libft.so" not found
Also ffmpeg keeps crashing. Easy fix is use this sources:
https://github.com/CM12-1-Douglas/android_frameworks_av

PS: If you are missing libs, borrow them from the Amazon Fire ;)
Cheers.
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Cool.
Sad to say but it's kinda the same...
Code:
E/hwcomposer(  123): [HWC] ION is invalid (handle=0xb6073580, num=-1, idx=-1) !!
W/hwcomposer(  123): [HWC] Failed to get ION fd !! (handle=0xb6073580) !!
Basically warnings/errors from hwcomposer..
Now asking for more libs lol:
Code:
E/WVMExtractor(  134): Failed to open libwvm.so: dlopen failed: library "libft.so" not found
Also ffmpeg keeps crashing. Easy fix is use this sources:
https://github.com/CM12-1-Douglas/android_frameworks_av

PS: If you are missing libs, borrow them from the Amazon Fire ;)
Cheers.
The "ION is invalid" error appears to be fence/VSYNC related, but I recall trying a few things pertaining to that to no avail.

I presume you're referring to the Fire whose codename is "ford", yes? If you have a ROM dump of the device, kindly let me know.
@Matty1993 You there mate? Just wanted to ask so I could arrange for the Epic to be sent your way.
 

Matty1993

Senior Member
May 7, 2018
629
316
Hey man sorry not been on had to deal with some stuff should hopefully be back on next week sometime ended up dropping and breakin my phone :crying: so havent been able to login finally got it fixed today so that a plus moving into a new place in a day or two so will be able to get settled and back into it again

---------- Post added at 01:25 PM ---------- Previous post was at 01:19 PM ----------

Hi @blakegriplingph
I was looking at the latest logcat that you sent in this thread (logcat_UYT2_46.zip) and found interesting things.
Your problem is that the ROM boots up but you can only see wallpaper.
This is related to graphics stuff for sure.
I had a quick peak at the logcat and found you're missing a few graphics libs from the stock ROM.

I don't know if it has to do since dashplayer is for qcom :p
btw your hwcomposer crashes a lot so I think it can be the problem too.
Regards.

Edit: First error that I can see from hwcomposer:

Also as hwcomposer is not working correctly, other stuff like audio/camera hal or memtrack is not working too:


That hwcomposer error wont stop the gpu or cpu from rendering the display had the same issue on my lineage 13 build via logcat but display still rendered fine, i also receive alot of hwcoposer related errors but surfaceflinger still starts and gui etc etc all still boot and work fine the only thing i could think of was as was mentioned before that the vendor libwvm libraries are not present but ehen i mentioned this to blake orginally he says there not in stock so if there no in stock then they rightfully shouldnt be needed foe the new build, im thinking its mali related somehow, blake whats your egl.config got written in /system/lib/egl/ this could possibly have something to do with it as well
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Hey man sorry not been on had to deal with some stuff should hopefully be back on next week sometime ended up dropping and breakin my phone :crying: so havent been able to login finally got it fixed today so that a plus moving into a new place in a day or two so will be able to get settled and back into it again

---------- Post added at 01:25 PM ---------- Previous post was at 01:19 PM ----------




That hwcomposer error wont stop the gpu or cpu from rendering the display had the same issue on my lineage 13 build via logcat but display still rendered fine, i also receive alot of hwcoposer related errors but surfaceflinger still starts and gui etc etc all still boot and work fine the only thing i could think of was as was mentioned before that the vendor libwvm libraries are not present but ehen i mentioned this to blake orginally he says there not in stock so if there no in stock then they rightfully shouldnt be needed foe the new build, im thinking its mali related somehow, blake whats your egl.config got written in /system/lib/egl/ this could possibly have something to do with it as well

The egl.cfg file in my build looks to be the same as the stock one:
Code:
# NOTICE: This is an autogenerated file, do not edit\n
0 0 android
0 1 mali

It could be Mali-related, but there are plenty more factors to take into account here. All that's certain is that we get an ANR in RenderThread, and something's making it gobble up way too many CPU cycles than it should.

Oh and do you have any leads on whether you'd get your hands on an Epic dev unit soon?
 

Matty1993

Senior Member
May 7, 2018
629
316
The egl.cfg file in my build looks to be the same as the stock one:


It could be Mali-related, but there are plenty more factors to take into account here. All that's certain is that we get an ANR in RenderThread, and something's making it gobble up way too many CPU cycles than it should.

Oh and do you have any leads on whether you'd get your hands on an Epic dev unit soon?


Hmmm i thought it may look like that as suspected your egl is set ti render via mali as default

Set this as the config this will clear most mali issues up should clear some other graphics problems up aswell,

0 0 android
0 0 mali
0 1 gpu

As for the cpu cycles ill see what values are set for the cpu in init.mt8127.rc and init.rc to see how its being scaled, same for graphics aswell ill check the services make sure they are all there, ill have to dig through my packing boxes today and get the lappy out if i got some free time

Still working on a leapfrog unfortunately due ti moving house again and breaking my phone had to save up a bit for lease bond and replacement screen to be sent out to me, when im all settled in though ill be back on the hunt for one :)
 
Last edited:
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Hmmm i thought it may look like that as suspected your egl is set ti render via mali as default

Set this as the config this will clear most mali issues up should clear some other graphics problems up aswell,

0 0 android
0 0 mali
0 1 gpu

As for the cpu cycles ill see what values are set for the cpu in init.mt8127.rc and init.rc to see how its being scaled, same for graphics aswell ill check the services make sure they are all there, ill have to dig through my packing boxes today and get the lappy out if i got some free time

Still working on a leapfrog unfortunately due ti moving house again and breaking my phone had to save up a bit for lease bond and replacement screen to be sent out to me, when im all settled in though ill be back on the hunt for one :)
Moving to a new place sure is no small expense, ain't it?

I'll see if that egl stuff would get things done on my end. Doubt that it would imho but eh...

What I meant about CPU cycles is that RenderThread ate up way too much resources than it should, similar to how an errant process or application in Windows is taking up a hundred percent CPU as shown in Task Manager. Something must be throwing things out of whack hence the issue.

As for the Epic, you mind if I sent you an invite to the Discord server my friends and I are maintaining? We have discussions on MTK tablets from Amazon and whatnot there, and I may be able to pull some strings there so you could get a cheapo Epic. ;)
 
  • Like
Reactions: Rortiz2

Matty1993

Senior Member
May 7, 2018
629
316
Moving to a new place sure is no small expense, ain't it?

I'll see if that egl stuff would get things done on my end. Doubt that it would imho but eh...

What I meant about CPU cycles is that RenderThread ate up way too much resources than it should, similar to how an errant process or application in Windows is taking up a hundred percent CPU as shown in Task Manager. Something must be throwing things out of whack hence the issue.

As for the Epic, you mind if I sent you an invite to the Discord server my friends and I are maintaining? We have discussions on MTK tablets from Amazon and whatnot there, and I may be able to pull some strings there so you could get a cheapo Epic. ;)

Sorry for late reply new screen went dodge on me had to get a replacement express sent out lucky im a certified technician eyy cost me nothing next time ill be buying genuine if this one stuffs up

Tell me bout rental housing is so expensive in Australia daylight robbery if you ask me new place is $350 a week not my cup of tea at all but house is a house i guess lol,

Ahhh i see what you mean now by cpu being eaten by something i doubt this would be ramdisk related but ill double check when i find my laptop ive been through 10 boxes of stuff already its here some where,

Yeah send me the invite would be happy to join more mtk based forums :)
 
  • Like
Reactions: blakegriplingph

Rortiz2

Senior Member
Sorry for late reply new screen went dodge on me had to get a replacement express sent out lucky im a certified technician eyy cost me nothing next time ill be buying genuine if this one stuffs up

Tell me bout rental housing is so expensive in Australia daylight robbery if you ask me new place is $350 a week not my cup of tea at all but house is a house i guess lol,

Ahhh i see what you mean now by cpu being eaten by something i doubt this would be ramdisk related but ill double check when i find my laptop ive been through 10 boxes of stuff already its here some where,

Yeah send me the invite would be happy to join more mtk based forums :)
Here we go:
https://discord.gg/HjmKbM
Cheers.

Enviado desde mi WAS-LX1A mediante Tapatalk
 
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Sorry for late reply new screen went dodge on me had to get a replacement express sent out lucky im a certified technician eyy cost me nothing next time ill be buying genuine if this one stuffs up

Tell me bout rental housing is so expensive in Australia daylight robbery if you ask me new place is $350 a week not my cup of tea at all but house is a house i guess lol,

Ahhh i see what you mean now by cpu being eaten by something i doubt this would be ramdisk related but ill double check when i find my laptop ive been through 10 boxes of stuff already its here some where,

Yeah send me the invite would be happy to join more mtk based forums :)
New screen for your phone? Reminds me of those aftermarket iPhone displays which for some reason (besides the MTK SOCs used on them clones not supporting the resolutions or something) hasn't been used by Goophones.

I guess I should consider myself lucky here in the Philippines lol.

Did you check out the Discord invite? Let me know as you'd be more than welcome there. :D
 

Matty1993

Senior Member
May 7, 2018
629
316
New screen for your phone? Reminds me of those aftermarket iPhone displays which for some reason (besides the MTK SOCs used on them clones not supporting the resolutions or something) hasn't been used by Goophones.

I guess I should consider myself lucky here in the Philippines lol.

Did you check out the Discord invite? Let me know as you'd be more than welcome there. :D

Yep second one now first one i had to wait and save for but wasnt genuine parts seems the digitiser decided to stop working all of a sudden ao got a free replacement sent out as im registered phone tech :D didnt have to pay sqaut for the second thankfully,

Yeah thosse iphone clones and what not use standard lcm drivers but the display reslutions on them are 9/10 set to 854×480 same case on my ubifs took a bit to adjust resolution so everything wasnt so bad on my lineage build as is also is using a standard techsun_x6572 lcm driver with 854x480 res shocking i have to say but it works i guess lol :)

Found my laptop also hidden right at the very bottom of all the bloody packing boxes haha

---------- Post added at 08:03 AM ---------- Previous post was at 08:02 AM ----------

Here we go:
https://discord.gg/HjmKbM
Cheers.

Enviado desde mi WAS-LX1A mediante Tapatalk


Awesome thanks heaps mate cheers for that :)
 

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Yep second one now first one i had to wait and save for but wasnt genuine parts seems the digitiser decided to stop working all of a sudden ao got a free replacement sent out as im registered phone tech :D didnt have to pay sqaut for the second thankfully,

Yeah thosse iphone clones and what not use standard lcm drivers but the display reslutions on them are 9/10 set to 854×480 same case on my ubifs took a bit to adjust resolution so everything wasnt so bad on my lineage build as is also is using a standard techsun_x6572 lcm driver with 854x480 res shocking i have to say but it works i guess lol :)

Found my laptop also hidden right at the very bottom of all the bloody packing boxes haha
That's the perks of being a certified technician lol.

Assuming they were somehow able to use an original or at least a 1:1 work-alike display assembly, some conversion circuitry may be required - I recall a cheap Vivo clone by my uncle that ran off an MT6572; iirc the chip only supported displays up to 960x540, and since the Vivo's LCD appears to be a higher-resolution unit, it appears as though some upscaling was being done behind the scenes judging from the slightly blurry output.
 

Matty1993

Senior Member
May 7, 2018
629
316
That's the perks of being a certified technician lol.

Assuming they were somehow able to use an original or at least a 1:1 work-alike display assembly, some conversion circuitry may be required - I recall a cheap Vivo clone by my uncle that ran off an MT6572; iirc the chip only supported displays up to 960x540, and since the Vivo's LCD appears to be a higher-resolution unit, it appears as though some upscaling was being done behind the scenes judging from the slightly blurry output.


Grr no notification sorry man,

Haha yeah they tried to say it was my fault at first till i quite calmly told them hey hey hey i got a magic number haha,

They look quite the part though touch isnt to bad aswell as resolution juts they stinged on the actual quality of display id say its pushing SD drivers on a low end display, does the job though haha just pushing an update for my ubifs lineage 13 rom and will jump on the leapfrog forum soon as im done now ive got link

had to reconfigure my entire ramdisk :eek: but i think ive pushed all the lag out of it now hopefully only the beta test will tell :)
 
Last edited:
  • Like
Reactions: blakegriplingph

blakegriplingph

Senior Member
May 13, 2011
1,076
159
Amazon Fire
Realme C3
Grr no notification sorry man,

Haha yeah they tried to say it was my fault at first till i quite calmly told them hey hey hey i got a magic number haha,

They look quite the part though touch isnt to bad aswell as resolution juts they stinged on the actual quality of display id say its pushing SD drivers on a low end display, does the job though haha just pushing an update for my ubifs lineage 13 rom and will jump on the leapfrog forum soon as im done now ive got link

had to reconfigure my entire ramdisk :eek: but i think ive pushed all the lag out of it now hopefully only the beta test will tell :)

So I presume you're close to getting your hands on an Epic as well, yes?
 

Matty1993

Senior Member
May 7, 2018
629
316
So I presume you're close to getting your hands on an Epic as well, yes?

Sorry for late reply i got abit huffy cause i couldnt fix the charging on my 6.0 build still so ive been determined to at least get something out that does work mostly Haha

Couldnt get lineageOS 14.1 to make boot nearly got it though goes as far as internal goes to start via zygote then f***ing BAM media_player died media_service died i got no idea why though as i was only able to get it this far by painstaking adding each service to the init.rc from /system/etc/init and everything is defined as it should be so i just cant figure out why its doing this to me,

So ive spent the last week rebuilding my old old CM 12.1 i did before 6.0 and f**k me what a headache that was storage was an easy fix but symlinks dont work like they do from 6.0 up weirdly even for vendor so ive got /system/vendor which has /lib /bin and / ive got my vendor partition which ive allocated to a swap partition which is made through recovery and set in recovery.fstab for it to be ext4 after formatting it and contains all my vendor apps BUT it wont link to system/vendor even though ive set it out as follows

On init
# Vendor lives on same filesystem as system
Symlink /system/vendor /vendor

#Tmp custom nand filesystem structuring
Mkdir /vendor 0755 system system

# Mount vendor partition start
On fs
Write /proc/bootprof "INIT:vendor start"
Mount ext4 /dev/block/mmcblk0p3 /vendor noatime nosuid nodev noauto_da_alloc discard wait check
Write /proc/bootprof "INIT:vendor end"
# Mount vendor partition end

On post-fs
# chown/chmod vendor so as to run as system:system
chown system system /vendor
chmod 0755 /vendor

# Tmp backwards compatibility
symlink /vendor /system/vendor

# Set SELinux Contexts on upgrade
restorecon /vendor

And added it to factory_init, init.charging.rc, init.mt6572.rc, init.rc and meta_init.rc but vendor still dosent link even when dir are empty in system weirdly my root vendor will only read /app and not /bin or /lib other than that i got it stable i fixed charging finally on it and also fixed my camera problem not capturing images, sadly i wish i could say the same for lineage 13 but i digress,

Anyhow still havent gotten a leapfrog yet sadly they seem hard to come by here in aus but when i see one ill be onto it anyhows any progress with build rendering display ?
 

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.