Help me to get DRM/Widevine on my self compiled LineageOS - Android

Hi guy i'm building LineageOS for Razer Forge TV. The rom works fine but i can't get DRM/Widevine to work.
The board for this device it's apq8084 like shamu, quark and kccat6.
I succesfuly build the vendor tree including this blobs:
Code:
/vendor/lib/libdrmfs.so
/vendor/lib/libdrmtime.so
/vendor/lib/liboemcrypto.so
/vendor/lib/libprdrmdecrypt.so
/vendor/lib/libQSEEComAPI.so
/vendor/lib/libwvdrm_L1.so
/vendor/lib/libWVStreamControlAPI_L1.so
/vendor/lib/drm/libdrmprplugin.so
/vendor/lib/drm/libdrmwvmplugin.so
/vendor/lib/mediadrm/libprmediadrmdecrypt.so
/vendor/lib/mediadrm/libprmediadrmplugin.so
/vendor/lib/mediadrm/libwvdrmengine.so
But nothing seems to work. Boardconfig.mk contains:
Code:
# DRM Protected Video
BOARD_USES_LIBDRM := true
BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 1
I also try using blobs from shamu as many other roms similars for this board, with no luck.
As far i see in logcat the device can't get or create certs and credentials, so it's keep falling back to L3.
With L3 i can't get TV Netflix or casting to work...
Here is the logcat: https://pastebin.com/F43RkkKa
Any help or clue will be appreciated!
Thanks

Well this is hard to solve...as far i see in the logs in some point QSEECOMAPI or OEMCrypto fails to encrypt (or decrypt?) probably certs...
I test it all, even with bullhead blobs, no luck. I also replace the proprietary kestore.qcom.so with the opensource provided by LineageOS and i get the same error....
Code:
WVCdm : Could not read /data/mediadrm/IDM1013/ay64.dat2: No such file or directory
QSEECOMAPI: : Error::send command ioctl failed. ret = -1, errno = 22
DrmWidevineDash: Error: OEMCrypto_Initialize ioctl returns -1
WVCdm : DeviceFiles::RetrieveHashedFile: /data/mediadrm/IDM1013/L3/cert.bin does not exist

Related

Help with BoardConfig.mk

I'm working on a device directory to get CM7 building for the Galaxy Player 5.0 USA. I'm using Entropy512's kernel and copying some things out of vzwtab mostly, but there's some parameters in the BoardConfig.mk that I'm not sure how to find out. The Galaxy Player 5.0 seems to be unique among the example galaxy-based devices I could find in having only mmc partitions. So does anyone know what the proper values should be for:
BOARD_KERNEL_BASE
BOARD_NAND_PAGE_SIZE
BOARD_FLASH_BLOCK_SIZE
BOARD_PAGE_SIZE
As far as I can tell the BOARD_KERNEL_BASE is supposed to be the offset into the boot.img where the kernel can be found? But Samsungs don't use the boot.img so does this paremeter make sense? The various samsung devices all define this value though, and with different values, so maybe it means something else..
I found this in the make file in arch/arm of Entrophy512's code.
I think this is what you need for BOARD_KERNEL_BASE ...
HTML:
# The byte offset of the kernel image in RAM from the start of RAM.
TEXT_OFFSET := $(textofs-y)
Above that textofs-y was defined as
HTML:
textofs-y := 0x00008000
textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
# We don't want the htc bootloader to corrupt kernel during resume
textofs-$(CONFIG_PM_H1940) := 0x00108000
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
endif
I think your value should be 0x00008000 ...
Thanks for that! A bit of googling on TEXT_OFFSET led me to PHYS_OFFSET, which is defined in arch/arm/mach-*/include/mach/memory.h, I think that's the value I need, it matches up in a couple of other kernels anyway. At least it matches up for galaxys2, but for mach-s5pv210 products, the PHYS_OFFSET is 0x30000000 but the kernel base is 0x32000000, I'm not sure why they don't match but I think one of those values should be galaxy player kernel base.
A quick grep turns this up...
./mach-s5pc100/include/mach/memory.h:#define PHYS_OFFSET UL(0x20000000)
s5pc100 is the name of the board for the Galaxy Player 5.0 right?
---------- Post added at 06:50 PM ---------- Previous post was at 06:08 PM ----------
HTML:
> As long as the zImage is placed within the 256MB range from the
> start of the memory, ZRELADDR (Address where the decompressed
> kernel will be placed, usually == PHYS_OFFSET + TEXT_OFFSET)
I think I may have it. It seems like we need both values PHYS_OFFSET +TEXT OFFSET.
So if that is what the BOARD_KERNEL_BASE is supposed to be then the value should be 0x20008000.
It would be nice to find a way to get the address off of our currently running devices. I'm going to look for some command or app that will say what it is.
References
http://www.spinics.net/lists/arm-kernel/msg89507.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017614.html
Meticulus said:
A quick grep turns this up...
./mach-s5pc100/include/mach/memory.h:#define PHYS_OFFSET UL(0x20000000)
s5pc100 is the name of the board for the Galaxy Player 5.0 right?
Click to expand...
Click to collapse
According to /proc/config.gz from Entropy512's kernel it's the s5pv210.
Come on Meticulous, get back in the game! We need you!
Sent from my cm_tenderloin using Tapatalk
ambrice said:
According to /proc/config.gz from Entropy512's kernel it's the s5pv210.
Click to expand...
Click to collapse
According to the build.prop (ro.build.platform) it's s5pc110. I'm betting the boards are pretty close. I'm just trying to help out. This is all new to me...
Meticulus said:
I think I may have it. It seems like we need both values PHYS_OFFSET +TEXT OFFSET.
So if that is what the BOARD_KERNEL_BASE is supposed to be then the value should be 0x20008000.
It would be nice to find a way to get the address off of our currently running devices. I'm going to look for some command or app that will say what it is.
Click to expand...
Click to collapse
The source for the unpackbootimg is at system/core/mkbootimg/unpackbootimg.c, and it has the line:
printf("BOARD_KERNEL_BASE %08x\n", header.kernel_addr - 0x00008000);
So I think in the boot.img header header.kernel_addr is the ZRELADDR and the BOARD_KERNEL_BASE is supposed to be ZRELADDR - TEXT_OFFSET, which would be the PHYS_OFFSET.
Meticulus said:
According to the build.prop (ro.build.platform) it's s5pc110. I'm betting the boards are pretty close. I'm just trying to help out. This is all new to me...
Click to expand...
Click to collapse
I definitely appreciate the help! It's all new to me too..
They are very close:
http://odroid.foros-phpbb.com/t198-differences-between-s5pc110-and-s5pv210
I downloaded the official samsung released YP-G70 sources, and the defconfig has CONFIG_ARCH_S5PV210=y. So maybe they're close enough as far as the build.prop is concerned? I'm not sure what ro.build.platform is used for..
HTML:
./unpackbootimg -i zImage
BOARD_KERNEL_CMDLINE 
BOARD_KERNEL_BASE e19f8000
BOARD_PAGE_SIZE 24061976
Segmentation fault
It looks like that code can not unpack Entrophy512's kernel...
Also regarding the board name, look in "/system/lib/hw/". All the filenames are like "*.s5pc110.so"
I think that "s5pv210" is also the same board as the galaxy s...
I think, but am not sure, but some of those values there are placeholders on Samsung-based devices.
I was a dumbass and accidentally nuked my device tree so I need to rebuild it. I may instead just fork ambrice's to redo it.
Looks like this week/weekend will consist of some fun decobwebbing.
I would appreciate the help. My current state is that it builds an image but an assert fails when flashing the boot.img.
I've done some updates, I have a working kernel and recovery.
When I boot CM7 system_server crashes with this error:
Code:
I/Zygote ( 165): Accepting command socket connections
I/sysproc ( 223): Entered system_init()
I/sysproc ( 223): ServiceManager: 0x76d18
I/SurfaceFlinger( 223): SurfaceFlinger is starting
I/SurfaceFlinger( 223): dithering enabled
I/SurfaceFlinger( 223): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/HAL ( 223): load: module=/system/lib/hw/gralloc.s5pc110.so
E/HAL ( 223): Cannot load library: reloc_library[1311]: 165 cannot locate '__android_log_print'...
E/FramebufferNativeWindow( 223): Couldn't get gralloc module
system_server is linked against liblog.so which defines the __android_log_print, I think maybe this error is misleading. /system/lib/hw/gralloc.s5pc110.so is a library I pulled off the stock image as part of the vendor proprietaries.
stack trace in log shows it's crashing in android:isplayHardware::init(unsigned int) in libsurfaceflinger.so
Any ideas of things to try?
I'm just throwing this stuff out there but, assuming that "gralloc.s5pc110.so" is in the location specified, perhaps the "gralloc.s5pc110.so" is trying to locate "liblog.so" and it is "liblog.so" that is in the incorrect location (from stock). If "__android_log_print" is what it can not find and that is defined in "liblog.so" then that leads me to believe that it's not loaded and may be in the wrong location. So, you could compare the location from stock and put a duplicate there and see if that gets you any further. Maybe it's the "PATH" var in init.rc does not include the path for liblog.so...?
As a last resort you could try pulling a "gralloc.aries.so" and renaming it to match since the boards are so similar and see what that gets you?
In a couple days, I may join you on your quest to get a cm7 port. This is your project and you seem to be doing quite well but maybe I can get lucky help out.

[Q] Why can not open file at /dev/<file> from native HAL in Android 5.0.2

Hi every one,
Currently, I am integrating peripheral for our company's device. This device is developed base on MSM8974AC platform. I have built linux driver and native HAL for that peripheral, these code are worked on Android 4.4.4 KK but when I reuse them on Android 5.0.2, I got a problem as follows:
- Linux driver has created device file at /dev/sfh7776.
- I have set permission 777 in init.rc file and check permission by command "ls -l /dev/sfh7776" then I got mesage "crwxrwxrwx"
- Native HAL open this device file by function ret = open("/dev/sfh7776",O_RDWR); but ret = -1, it means can not open this dev file.
Any one help me resolve this problem? Thank you very much.

[WIP] Compiling TWRP for WI502Q Wren device

Background:
Can't locate a TWRP image for WI502Q device
@T10NAZ has been helping in his TWRP for WI501Q thread. It seems more polite to separate this discussion from his TWRP release thread.
Goal:
Build a booting TWRP image for WI502Q device
I'll be posting step-by-step directions as I make progress and I'll also be posting questions!
Steps
Repo
1) Install repo (sudo apt-get install repo)
1a) repo init -u git://github.com/joeykrim/platform_manifest_twrp_omni_wren.git -b twrp-6.0
1b) repo sync
2) Clone device configuration and kernel files
2a) mkdir -p device/asus/wren (Inside omni directory cloned in 1b)
2b) cd device/asus/ && git clone https://github.com/joeykrim/wren
3) Setup AOSP to compile and Compile
3a) . build/envsetup.sh
3b) lunch omni_wren-eng
3c) mka recoveryimage OR make clean && mka -j9 recoveryimage
Sources:
Referencing Dees_Troy's guide for compiling TWRP: http://forum.xda-developers.com/showthread.php?p=32965365#post32965365
Sparrow Omni ROM/Recovery compile files: https://github.com/asyan4ik/sparrow
Compiling kernel: http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276 & https://source.android.com/source/building-kernels.html & @T10NAZ who compiled the kernel and provided the binary
Dependencies (Not complete list):
My GitHub forks include minor changes in order to compile without errors: https://github.com/joeykrim/platform_manifest_twrp_omni_wren & https://github.com/joeykrim/wren
OmniROM requires OpenJDK 7: sudo apt-get install openjdk-7-jdk (Reference for install, replace version 8 with 7)
Unresolved Issues:
1) Requires pre-compiled or compiling kernel
1a) Unable to pull from device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
1b) ASUS Kernel source: https://www.asus.com/au/support/Download/42/1/0/3/y5tW5D4k3zKBVKf4/32/
Latest version at this time: ASUS ZenWatch2 (WI502Q) Kernel source code V5.20.0.111 (MEC23G)
Requires a prebuilt toolchain - AOSP recommends: git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
make wren_user_msm8226-perf_defconfig - results in many errors, as shown in the multiple posts below
@T10NAZ suggested using wren_defconfig instead of wren_user_msm8226-perf_defconfig, compiled a kernel and posted it: http://forum.xda-developers.com/showpost.php?p=65955638&postcount=13
2) Sparrow (BoardConfig.mk) calls for an older font file: font_7x16.h (bootable/recovery/minui.old/font_7x16.h). For now, disabled as compiling with it results in an error:
"In file included from bootable/recovery/minui/graphics.cpp:35:
bootable/recovery/minui/font_7x16.h:12:14: error: initialization of flexible array member is not allowed
.rundata = {
^"
u should post in the android dev or android orid dev section of the zenwatch 2 i think.
here in q&a it might get lost
just a friendly advice. i have a w501q. for mine there is T10NAZ's version which works perfectly if tethered (a flashable version would be nich to have )
4RK4N said:
u should post in the android dev or android orid dev section of the zenwatch 2 i think.
here in q&a it might get lost
just a friendly advice. i have a w501q. for mine there is T10NAZ's version which works perfectly if tethered (a flashable version would be nich to have )
Click to expand...
Click to collapse
im working on making it flashable
T10NAZ said:
I used this dev tree here so you can modify it to get twrp for the 502
or to practice by using the files available for the 501
all you need is the omni 6.0 source for twrp 3.0.0.0 and the latest kernel source and you are off to the races!
If you need help let me know
Click to expand...
Click to collapse
Summary
I have omni 6.0 source and using asyan4ik's device tree for sparrow, I have the sparrow TWRP recovery.img compiled in out/target/product/sparrow. The 501 device was a good starting point, thanks!
Now to 502, I'm unable to get a kernel binary to use in order to build TWRP. Any suggestions on how to either get the 502 kernel binary or get the 502 kernel source compiling?
Details:
1) I'm not able to get the kernel binary, which asyan4ik provided for the 501/sparrow device on the github repo. I tried but couldn't pull the kernel binary from the 502 device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
2) I do have the kernel source from ASUS's web site, but am seeing multiple errors when compiling with wren_user_msm8226-perf_defconfig or wren_userdebug_msm8226_defconfig.
Example of an error: "kernel/printk.c: In function ‘printk_buffer_rebase’:
kernel/printk.c:1022:38: error: ‘ASUS_SW_VER’ undeclared (first use in this function)
strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
^
kernel/printk.c:1022:38: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/printk.o' failed"
joeykrim said:
Summary
I have omni 6.0 source and using asyan4ik's device tree for sparrow, I have the sparrow TWRP recovery.img compiled in out/target/product/sparrow. The 501 device was a good starting point, thanks!
Now to 502, I'm unable to get a kernel binary to use in order to build TWRP. Any suggestions on how to either get the 502 kernel binary or get the 502 kernel source compiling?
Details:
1) I'm not able to get the kernel binary, which asyan4ik provided for the 501/sparrow device on the github repo. I tried but couldn't pull the kernel binary from the 502 device: /dev/block/platform/msm_sdcc.1/by-name/boot: Permission denied and /dev/block/mmcblk0p11: Permission denied
2) I do have the kernel source from ASUS's web site, but am seeing multiple errors when compiling with wren_user_msm8226-perf_defconfig or wren_userdebug_msm8226_defconfig.
Example of an error: "kernel/printk.c: In function ‘printk_buffer_rebase’:
kernel/printk.c:1022:38: error: ‘ASUS_SW_VER’ undeclared (first use in this function)
strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
^
kernel/printk.c:1022:38: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/printk.o' failed"
Click to expand...
Click to collapse
that error was the most annoying thing ever and i always had an issue with it.
download this Makefile and replace the one in the root of the kernel folder with that one, that will get rid of that error. You may run into more errors, and hopefully they are ones that i had problems with
T10NAZ said:
that error was the most annoying thing ever and i always had an issue with it.
download this Makefile and replace the one in the root of the kernel folder with that one, that will get rid of that error. You may run into more errors, and hopefully they are ones that i had problems with
Click to expand...
Click to collapse
Great, your Makefile cleared up the ASUS_SW_VER error!
Amazing they release kernel source that doesn't compile...
Next error...
1) TIF_MM_RELEASED undecleared
kernel/exit.c: In function ‘exit_mm’:
kernel/exit.c:510:28: error: ‘TIF_MM_RELEASED’ undeclared (first use in this function)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
^
kernel/exit.c:510:28: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'kernel/exit.o' failed
It does appear to be defined...
grep -irs TIF_MM_RELEASED *
arch/arm/include/asm/thread_info.h:#define TIF_MM_RELEASED 23 /* task MM has been released */
arch/arm64/include/asm/thread_info.h:#define TIF_MM_RELEASED 24
drivers/staging/android/lowmemorykiller.c: if (test_task_flag(tsk, TIF_MM_RELEASED))
kernel/exit.c: set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
joeykrim said:
Great, your Makefile cleared up the ASUS_SW_VER error!
Amazing they release kernel source that doesn't compile...
Next error...
1) TIF_MM_RELEASED undecleared
kernel/exit.c: In function ‘exit_mm’:
kernel/exit.c:510:28: error: ‘TIF_MM_RELEASED’ undeclared (first use in this function)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
Click to expand...
Click to collapse
Your grep maybe or maybe not shed light on the issue.
The first 2 are defined but not in the last 2, the last 2 are calling TIF_MM_RELEASED (at least that is my understanding) however it has a number after defining it
anyways travel to the folder kernel and open exit.c, and assuming you can see line numbers on your text editor, go to line 506, and that whole #ifndef config thing, maybe either do this:
Code:
#define TIF_MM_RELEASED 23
#ifndef CONFIG_UML
mm_released = mmput(mm);
if (mm_released)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
#endif
or add the define TIF_MM under the config_UML.
Im almost thinking ASUS has some other things outside of the kernel source to allow it to build cleanly
T10NAZ said:
Your grep maybe or maybe not shed light on the issue.
The first 2 are defined but not in the last 2, the last 2 are calling TIF_MM_RELEASED (at least that is my understanding) however it has a number after defining it
anyways travel to the folder kernel and open exit.c, and assuming you can see line numbers on your text editor, go to line 506, and that whole #ifndef config thing, maybe either do this:
Code:
#define TIF_MM_RELEASED 23
#ifndef CONFIG_UML
mm_released = mmput(mm);
if (mm_released)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
#endif
or add the define TIF_MM under the config_UML.
Im almost thinking ASUS has some other things outside of the kernel source to allow it to build cleanly
Click to expand...
Click to collapse
Defining it either before or inside of CONFIG_UML both worked to clear the error. Thanks!
Now two more errors:
kernel/asusdebug.c: In function 'proc_asusdebug_init':
kernel/asusdebug.c:1405:15: error: 'struct mutex' has no member named 'owner'
fake_mutex.owner = current;
^
kernel/asusdebug.c: At top level:
kernel/asusdebug.c:1418:15: error: expected declaration specifiers or '...' before string constant
EXPORT_COMPAT("qcom,asusdebug");
^
scripts/Makefile.build:308: recipe for target 'kernel/asusdebug.o' failed
joeykrim said:
Defining it either before or inside of CONFIG_UML both worked to clear the error. Thanks!
Now two more errors:
kernel/asusdebug.c: In function 'proc_asusdebug_init':
kernel/asusdebug.c:1405:15: error: 'struct mutex' has no member named 'owner'
fake_mutex.owner = current;
^
kernel/asusdebug.c: At top level:
kernel/asusdebug.c:1418:15: error: expected declaration specifiers or '...' before string constant
EXPORT_COMPAT("qcom,asusdebug");
^
scripts/Makefile.build:308: recipe for target 'kernel/asusdebug.o' failed
Click to expand...
Click to collapse
Whats weird is asusdebug.c is exactly the same on the 501 and 502,
this may be a dumb question but, are you make clean after every edit?
T10NAZ said:
Whats weird is asusdebug.c is exactly the same on the 501 and 502,
this may be a dumb question but, are you make clean after every edit?
Click to expand...
Click to collapse
Yes, I have been using make clean, but the system I'm using might be on newer versions that are causing issues (Ubuntu 16.04).
I'm assuming that since asusdebug.c is the same between devices, you didn't receive the same error?
I'm using the toolchain included with OmniROM: prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- through export CROSS_COMPILE=/tmp/omni/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-
Downgraded gcc to 4.8 (/usr/bin/gcc -> /usr/bin/gcc-4.8)
Anything else I should check? Not sure if I should just grab Ubuntu 14.04, put it in a VM and start again from there...
joeykrim said:
Yes, I have been using make clean, but the system I'm using might be on newer versions that are causing issues (Ubuntu 16.04).
I'm assuming that since asusdebug.c is the same between devices, you didn't receive the same error?
I'm using the toolchain included with OmniROM: prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- through export CROSS_COMPILE=/tmp/omni/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-
Downgraded gcc to 4.8 (/usr/bin/gcc -> /usr/bin/gcc-4.8)
Anything else I should check? Not sure if I should just grab Ubuntu 14.04, put it in a VM and start again from there...
Click to expand...
Click to collapse
only difference i have is i am running 15.10 with linaro 4.9.4 toolchain I wonder if itll get stuck on the same error if i take a crack at it
---------- Post added at 10:06 PM ---------- Previous post was at 09:41 PM ----------
So i tried it, I tar -xvf'd the source, added the path to the linaro chain, used my modified makefile for Sparrow, and typed make wren_defconfig (that might be highly unconventional) and make -j# ARCH=arm
I didnt hit the errors you had, but I ran into issues im more familiar with, starting with
Code:
In file included from drivers/devfreq/devfreq_trace.h:43:0,
from drivers/devfreq/devfreq_trace.c:20:
include/trace/define_trace.h:79:43: fatal error: ./devfreq_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
which you just copy devfreq_trace.h into include/trace
after that I got the next error I encountered for sparrow,
Code:
drivers/hwmon/qpnp-adc-common.c: In function ‘qpnp_adc_scale_batt_therm’:
drivers/hwmon/qpnp-adc-common.c:732:4: error: ‘adcmap_btm_threshold’ undeclared (first use in this function)
adcmap_btm_threshold,
^
drivers/hwmon/qpnp-adc-common.c:732:4: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kref.h:18:0,
from include/linux/of.h:21,
from drivers/hwmon/qpnp-adc-common.c:16:
and that issue, it calls either Sparrow or Wren specific battery voltages in the qpnp-adc-common.c for whatever you are working on. But it doesnt do that!! All you do is find qpnp-adc-common-wren.h
and copy pasta this:
Code:
static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = {
{-300, 1538},
{-200, 1538},
{-100, 1384},
{-90, 1372},
{-80, 1360},
{-70, 1346},
{-60, 1335},
{-50, 1322},
{-40, 1308},
{-30, 1298},
{-20, 1282},
{-10, 1269},
{0, 1255},
{10, 1251},
{20, 1238},
{30, 1225},
{40, 1212},
{50, 1199},
{60, 1186},
{70, 1173},
{80, 1160},
{90, 1147},
{100, 1122},
{110, 1111},
{120, 1097},
{130, 1086},
{140, 1074},
{150, 1060},
{160, 1048},
{170, 1035},
{180, 1021},
{190, 1009},
{200, 998},
{210, 987},
{220, 977},
{230, 966},
{240, 952},
{250, 943},
{260, 932},
{270, 923},
{280, 911},
{290, 902},
{300, 891},
{310, 881},
{320, 871},
{330, 860},
{340, 849},
{350, 839},
{360, 832},
{370, 823},
{380, 813},
{390, 807},
{400, 801},
{410, 790},
{420, 779},
{430, 774},
{440, 769},
{450, 760},
{460, 750},
{470, 742},
{480, 738},
{490, 730},
{500, 721},
{510, 714},
{520, 713},
{530, 707},
{540, 701},
{550, 695},
{560, 689},
{570, 683},
{580, 677},
{590, 671},
{600, 665},
{610, 659},
{620, 653},
{630, 647},
{640, 641},
{650, 635},
{660, 629},
{670, 623},
{680, 617},
{690, 611},
{700, 496},
{710, 490},
{720, 484},
{730, 478},
{740, 472},
{750, 466},
{760, 460},
{770, 454},
{780, 448},
{790, 442}
};
right above static const struct qpnp_vadc_map_pt adcmap_qrd_btm_threshold[] = { at line 56
There are a few more errors that can be easily fixed after that, Im not sure if its your 16.04 or omni's toochain but so far im just running into fixable errors that got in the way on sparrow as well
*Update*
I ran into 3 more issues, they are just indicating exactly where files are by adding /home/user/kernel/etc/etc/etc to things that say they dont know where its at
and I got it to build
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
@joeykrim do you want the zimage that i created so you can mess with twrp for now? I will try and assist in any way i can to get you to build the kernel and twrp up for Wren users!
T10NAZ said:
only difference i have is i am running 15.10 with linaro 4.9.4 toolchain I wonder if itll get stuck on the same error if i take a crack at it
---------- Post added at 10:06 PM ---------- Previous post was at 09:41 PM ----------
So i tried it, I tar -xvf'd the source, added the path to the linaro chain, used my modified makefile for Sparrow, and typed make wren_defconfig (that might be highly unconventional) and make -j# ARCH=arm
I didnt hit the errors you had, but I ran into issues im more familiar with, starting with
Code:
In file included from drivers/devfreq/devfreq_trace.h:43:0,
from drivers/devfreq/devfreq_trace.c:20:
include/trace/define_trace.h:79:43: fatal error: ./devfreq_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
which you just copy devfreq_trace.h into include/trace
after that I got the next error I encountered for sparrow,
Code:
drivers/hwmon/qpnp-adc-common.c: In function ‘qpnp_adc_scale_batt_therm’:
drivers/hwmon/qpnp-adc-common.c:732:4: error: ‘adcmap_btm_threshold’ undeclared (first use in this function)
adcmap_btm_threshold,
^
drivers/hwmon/qpnp-adc-common.c:732:4: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kref.h:18:0,
from include/linux/of.h:21,
from drivers/hwmon/qpnp-adc-common.c:16:
and that issue, it calls either Sparrow or Wren specific battery voltages in the qpnp-adc-common.c for whatever you are working on. But it doesnt do that!! All you do is find qpnp-adc-common-wren.h
and copy pasta this:
Code:
static const struct qpnp_vadc_map_pt adcmap_btm_threshold[] = {
{-300, 1538},
{-200, 1538},
{-100, 1384},
{-90, 1372},
{-80, 1360},
{-70, 1346},
{-60, 1335},
{-50, 1322},
{-40, 1308},
{-30, 1298},
{-20, 1282},
{-10, 1269},
{0, 1255},
{10, 1251},
{20, 1238},
{30, 1225},
{40, 1212},
{50, 1199},
{60, 1186},
{70, 1173},
{80, 1160},
{90, 1147},
{100, 1122},
{110, 1111},
{120, 1097},
{130, 1086},
{140, 1074},
{150, 1060},
{160, 1048},
{170, 1035},
{180, 1021},
{190, 1009},
{200, 998},
{210, 987},
{220, 977},
{230, 966},
{240, 952},
{250, 943},
{260, 932},
{270, 923},
{280, 911},
{290, 902},
{300, 891},
{310, 881},
{320, 871},
{330, 860},
{340, 849},
{350, 839},
{360, 832},
{370, 823},
{380, 813},
{390, 807},
{400, 801},
{410, 790},
{420, 779},
{430, 774},
{440, 769},
{450, 760},
{460, 750},
{470, 742},
{480, 738},
{490, 730},
{500, 721},
{510, 714},
{520, 713},
{530, 707},
{540, 701},
{550, 695},
{560, 689},
{570, 683},
{580, 677},
{590, 671},
{600, 665},
{610, 659},
{620, 653},
{630, 647},
{640, 641},
{650, 635},
{660, 629},
{670, 623},
{680, 617},
{690, 611},
{700, 496},
{710, 490},
{720, 484},
{730, 478},
{740, 472},
{750, 466},
{760, 460},
{770, 454},
{780, 448},
{790, 442}
};
right above static const struct qpnp_vadc_map_pt adcmap_qrd_btm_threshold[] = { at line 56
There are a few more errors that can be easily fixed after that, Im not sure if its your 16.04 or omni's toochain but so far im just running into fixable errors that got in the way on sparrow as well
*Update*
I ran into 3 more issues, they are just indicating exactly where files are by adding /home/user/kernel/etc/etc/etc to things that say they dont know where its at
Click to expand...
Click to collapse
Excellent! Yea, not sure whether it's the not-yet-final Ubuntu 16.04 release, OmniROM's toolchain, or some odd combination. If I try again, I'll do everything in a VM with a fresh and final Ubuntu image...
T10NAZ said:
and I got it to build
@joeykrim do you want the zimage that i created so you can mess with twrp for now?
Click to expand...
Click to collapse
Yes, please!
Once I have the kernel image, I can focus on tinkering with the sparrow build files to get wren compiling and working. Hopefully won't take too much effort and fastboot booting...
joeykrim said:
Excellent! Yea, not sure whether it's the not-yet-final Ubuntu 16.04 release, OmniROM's toolchain, or some odd combination. If I try again, I'll do everything in a VM with a fresh and final Ubuntu image...
Yes, please!
Once I have the kernel image, I can focus on tinkering with the sparrow build files to get wren compiling and working. Hopefully won't take too much effort and fastboot booting...
Click to expand...
Click to collapse
Alrighty, I added both zImage and zImage-dtb just in case, dtb is mainly what you will work with.
And for twrp 3.0.0.0, there are a bit of changes you need to do to Sparrows files. So we will both be helping each other out with getting it stable and working right for sparrow and wren .
https://drive.google.com/file/d/0B_Duyz8Shz-YbmZ2ZE82VUZSR2c/view?usp=sharing
T10NAZ said:
Alrighty, I added both zImage and zImage-dtb just in case, dtb is mainly what you will work with.
And for twrp 3.0.0.0, there are a bit of changes you need to do to Sparrows files. So we will both be helping each other out with getting it stable and working right for sparrow and wren .
https://drive.google.com/file/d/0B_Duyz8Shz-YbmZ2ZE82VUZSR2c/view?usp=sharing
Click to expand...
Click to collapse
Great! Using the kernel you supplied and the slightly modified Build files from: https://github.com/lj50036/platform_manifest_twrp_omni and I forked here: https://github.com/joeykrim/wren
I was able to get the recovery (TWRP-v3.0.0-0) to compile and boot. wren TWRP v3.0.0-0 recovery.img: https://joeykrim.com/android/devices/wren/twrp-v3.0.0-0.jk-v1.recovery.img
Updates now posted in the development thread: http://forum.xda-developers.com/zen...nt/recovery-twrp-3-0-0-0-wi502q-root-t3343366
Bugs (All Fixed):
1) Unable to backup recovery partition - isn't visible from backup menu
2) The screen resolution is small, but it works! Any suggestions on adjusting the screen resolution?
I'll probably start with BoardConfig.mk settings...
fb0 reports (possibly inaccurate):
vi.bits_per_pixel = 32
vi.red.offset = 0 .length = 8
vi.green.offset = 8 .length = 8
vi.blue.offset = 16 .length = 8
setting GGL_PIXEL_FORMAT_RGBA_8888
double buffered
framebuffer: 0 (280 x 280)
I:Checking resolution...
I:Scaling theme width 0.875000x and height 0.875000x, offsets x: 0 y: 0

[Q][DONE] Error when compiling Android 7, mknod typecast problem

Hello,
I am currently trying to compile Android 7.0.0_r6 for the Sony Xperia Z Ultra C6833 (togari). I added the binaries from Sony's AOSP for Xperia project, applied the patches listed on the Sony site and began compiling when an error occured:
Code:
device/sony/common-init/init/init_main.cpp:126:21: error: implicit conversion from 'unsigned long long' to 'dev_t' (aka 'unsigned int') changes value from 17592185041919 to 4293964799 [-Werror,-Wconstant-conversion]
makedev(DEV_BLOCK_FOTA_MAJOR, (unsigned int)DEV_BLOCK_FOTA_MINOR));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bionic/libc/include/sys/sysmacros.h:35:41: note: expanded from macro 'makedev'
(((__minor) & 0xffffff00ULL) << 12) | (((__minor) & 0xffULL)) \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
I dug around a little bit and found the corresponding piece of code causing this:
Code:
mknod(DEV_BLOCK_FOTA_PATH, S_IFBLK | 0600,
makedev(DEV_BLOCK_MAJOR, DEV_BLOCK_FOTA_NUM));
It seems that mknod requires a dev_t (unsigned int) as second argument, but the return from makedev is bigger, thus causing a typecast overflow. I ran a test, just the makedev function with the given constants compiles without any error, the error must be caused by the mknod function. But I cannot seem to figure out how to fix this.
Any help is greatly appreciated.
OS: Ubuntu 16.04 LTS
CPU: Intel i7 6700K
RAM: 8GB
EDIT: So I found out what went wrong. The code stated here is perfectly fine, the problem lies within the if block, checking if this step is necessary:
Code:
if (DEV_BLOCK_FOTA_MAJOR != -1 &&
keycheckStatus != KEYCHECK_RECOVERY_BOOT_ONLY)
The problem here is that it checks the wrong constant. It should check DEV_BLOCK_FOTA_MINOR, which is set as -1 in the init_board.h. The fixed version looks like this:
Code:
if (DEV_BLOCK_FOTA_MINOR != -1 &&
keycheckStatus != KEYCHECK_RECOVERY_BOOT_ONLY)
A fixed version is already in the SonyXperiaDev repo, it was submitted yesterday and my sources have been loaded several days before. So, outdated, bugged source files were the reason. Please close.

kernel builded, installed but i'got a blackscreen when booting and a hude logcat :/

Hello,
i have compiled from source a lineageos kernel, installed it on my device, but when i turn on my device, i see a black screen :/
i have perform a logcat through ADB and i see some errors but i'm not sure if i go in the righ direction...
i tried to understand the log (hard due to lack of experience in this domain) but i see warnings about "/system/vendor/lib/libIMGegl_SGX540_120.so" file (others vendor files).
i read in some tutorial that user who want to compile lineageos rom (kernel too ???) must extract "proprietary blobs" (drivers) for samsung devices.
but where i put these files in my kernel source folder???
maybe i go in the wrong direction!!!!????
my bootlog.txt: https://files.fm/u/cym5w24v"]https://files.fm/u/cym5w24v
please, give me some time to help me, i try and try and try, search and search and search... i progress some times but there, i'm facing to a rock :'(
I remain at your disposal if you want more details in my kernel compilation procedure!
[EDIT]
in my bootlog i can see this:
01-08 11:34:33.358 2692 2692 E ti_hwc : Framebuffer HAL not opened before HWC
01-08 11:34:33.358 2692 2692 E SurfaceFlinger: composer device failed to initialize (Bad address)
01-08 11:34:33.358 2692 2692 E SurfaceFlinger: ERROR: failed to open framebuffer (Not a typewriter), aborting
01-08 11:34:33.358 2692 2692 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 2692 (surfaceflinger)
i tried to google the "SurfaceFlinger" error but without success :/

Categories

Resources